Executing a business process in Business Central
Abstract
Preface
As a business analyst or business rules developer, you can use Business Central to create forms for human tasks, providing a rich interface for collecting data. In this example, you will create a simple pizza order form that a customer (Bill) will complete and send to the pizza place. The pizza place employee (Katy) will process the order and send an order confirmation message containing the total cost for the order.
Prerequisites
- Red Hat JBoss Enterprise Application Platform 7.1.0 is installed. See Red Hat JBoss EAP 7.1.0 Installation Guide.
- Red Hat Process Automation Manager is installed and the Process Server is configured. For more information, see Installing and configuring Red Hat Process Automation Manager on Red Hat JBoss EAP 7.1.
-
Red Hat Process Automation Manager is running and you can log in to Business Central with the
adminrole.
Chapter 1. Creating the Pizza Place project
A project can contain data models, business processes, business rules, and forms that are specific to your project’s requirements. When you create a project in Business Central it is added to the Git repository connected to Business Central.
For this project, you will create a simple business process and create and modify forms.
Procedure
-
Log in to Business Central using the
adminrole and click Menu → Design → Projects. - Click Add Project.
Type
pizzaPlacein the Name field of the Add Project window and click Add.Figure 1.1. Add the pizzaPlace project

The Assets view of the project opens when you successfully create the project.
Chapter 2. Creating users
You can create as many Business Central users as you require. User privileges and settings are controlled by the roles assigned to a user and the groups that a user belongs to. For this example, you must create two new users: Katy who will act as the pizza place employee, and Bill who will act as the customer placing the order. For more information on creating users, see the Creating users chapter of Installing and configuring Red Hat Process Automation Manager on Red Hat JBoss EAP 7.1.
Procedure
-
Click the gear icon
in the upper-right corner, and click Users.
-
Click New user, enter
Katy, and click Next. - Click the Groups tab, click Add to groups.
- Select rest-all and kie-server and click Add to selected groups.
- Click the Roles tab, click Add roles, and select admin and user.
-
Click Add to selected roles and click Create to assign
Katyto the admin and user roles. -
Click Yes to set the password to
katyand click Change. -
Click New user, enter
Bill, and click Next. - Click the Groups tab, click Add to groups.
- Select rest-all and kie-server and click Add to selected groups.
- Click the Roles tab, click Add roles, and select admin and user.
-
Click Add to selected roles and click Create to assign
Billto the admin and user roles. -
Click Yes to set the password to
billand click Change.
Each user must be assigned to at least one role to access Business Central.
Chapter 3. Creating a Business Process
A business process is a graph that describes the order in which a series of steps must be executed using a flow chart. A business process consists of a collection of nodes that are linked to each other using connections. Each of the nodes represents one step in the overall process while the connections specify how to transition from one node to the other. Red Hat Process Automation Manager contains a predefined selection of node types to simplify business process creation.
Prerequisites
- Created the pizzaPlace project. For more information, see Chapter 1, Creating the Pizza Place project.
- Created the required users. For more information, see Chapter 2, Creating users.
3.1. Creating the pizza orders business process
The pizza orders business process determines whether or not the new order contains the required data before proceeding. If all of the specified data requirements are met, the order will be processed.
Procedure
- Log in to Business Central and click Menu → Design → Projects → pizzaPlace.
- Click Add Asset → Business Process.
In the Create new Business Process wizard, enter the following values:
-
Business Process:
pizzaOrders. -
Package: select
com.myspace.pizzaplace.
-
Business Process:
- Click Ok. The process designer opens.
-
In the upper-right corner, click the Diagram properties
icon.
- Scroll down and expand Process Data.
Click
four times next to Process Variables, and define the following variables:
Figure 3.1. Defining variables in the Process Data window

- Click Save.
- In the process designer, click Save, then Save, to confirm your changes.
3.2. Creating the Process Order user task
Create a process order and add variables, such as the pizza ingredients and drink selection.
Procedure
Click the start event to create an outgoing connection from the start event to user task.
Figure 3.2. Outgoing connection from the start event to a user task

Figure 3.3. Convert into a User task

-
In the upper-right corner of the the process designer, click the Diagram properties
icon.
-
Click the user task and enter
Process Orderin the Name field. Expand Implementation/Execution and enter the following values:
-
Task Name:
processOrder Actor:
KatyFigure 3.4. The Diagram properties window

-
Task Name:
-
Click
next to Assignments.
In the Process Order Data I/O window, create the following input assignments:
Figure 3.5. The Process Order Data input and output assignments

- Click Save.
- In the process designer, click Save, then Save, to confirm your changes.
3.3. Creating the Confirmation user task
Create an order confirmation user task, which will return the order details to the customer for confirmation before the final order is placed.
Procedure
Click the Process Order task to create an outgoing connection to a new user task.
Figure 3.6. Outgoing connection from the Process Order task to a user task

Figure 3.7. Convert into a User task

-
In the upper-right corner of the the process designer, click the Diagram properties
icon.
-
Click the user task and enter
Confirmationin the Name field. Expand Implementation/Execution and enter the following values:
-
Task Name:
confirmation Actor:
BillFigure 3.8. The Diagram properties window

-
Task Name:
-
Click
next to Assignments.
In the Confirmation Data I/O window, create the following input assignments:
Figure 3.9. The Confirmation Data input and output assignments

- Click Save.
- In the process designer, click Save, then Save, to confirm your changes.
3.4. Adding an end node
Add an end node to signify the end of the pizza order process.
Procedure
Click the Confirmation user task and connect it to an end event.
Figure 3.10. Outgoing connection from the Confirmation user task

Figure 3.11. Connect to an end event

- In the process designer, click Save, then Save, to confirm your changes.
Chapter 4. Generating forms
Red Hat Process Automation Manager enables you to automatically generate all forms. For this business process you will generate the Process, Process Order, and Confirmation forms.
Prerequisites
You have created the pizza orders business process. For more information, see Chapter 3, Creating a Business Process.
Procedure
- Log in to Business Central and click Menu → Design → Projects → pizzaPlace → pizzaOrders.
Click the following menu option and select Generate all forms.
Figure 4.1. Generate all forms menu

Chapter 5. Customizing forms
Automatically generating forms saves time for basic form creation, but for most business processes, you will customize the forms to reflect exactly what you intend for the user to view and interact with.
Prerequisites
You have automatically generated the forms. For more information, see Chapter 4, Generating forms.
5.1. Customizing the pizza order form
Customize the pizza order form to ensure ease of use by defining the field types and locations.
Procedure
- Log in to Business Central and click Menu → Design → Projects → pizzaPlace.
- Click the pizzaPlace.pizzaOrders-taskform form.
-
Click
in the upper-right corner of the Price row and click Remove.
-
Click
in the upper-right corner of the ExtraIngredients row and click Edit.
- From the Field Type pull-down menu, select TextArea.
-
Change both the Label and PlaceHolder fields to
Extra Ingredients. - Click Ok.
Sort the remaining rows by dragging them to reflect the following order:
Figure 5.1. Sort the form rows

- Click Save, then Save, to confirm your changes.
5.2. Customizing the process order form
Customize the process order form to ensure ease of use by defining the field types and locations.
Procedure
- Click Menu → Design → Projects → pizzaPlace.
- Click the processOrder-taskform form.
-
Click
in the upper-right corner of the Inputs row, select Edit, and change Inputs: to Order Info:. Click Ok.
-
Click
in the upper-right corner of the Outputs: row and click Remove.
-
Click
in the upper-right corner of the ExtraIngredients row and select Edit.
- From the Field Type pull-down menu, select TextArea.
-
Change both the Label and PlaceHolder fields to
Extra Ingredients. - Click Ok.
Sort the remaining rows by dragging them to reflect the following order:
Figure 5.2. Sort the form rows

- Click Save, then Save, to confirm your changes.
5.3. Customizing the order confirmation form
Customize the order confirmation form to ensure ease of use by defining the field types and locations.
Procedure
- Click Menu → Design → Projects → pizzaPlace.
- Click the confirmation-taskform form.
-
Click
in the upper-right corner of the Inputs row, select Edit, and change Inputs: to Your Order Info:.
-
Click
in the upper-right corner of the ExtraIngredients row and select Edit.
- From the Field Type pull-down menu, select TextArea.
-
Change both the Label and PlaceHolder fields to
Extra Ingredients. Click Ok.
NoteConfirm that the Pizza, Extra Ingredients, Drink, and Price rows are marked as Read Only by clicking
in the upper-right corner of each and selecting Edit. The Read Only box should be selected. If not, select it and click Ok.
Sort the remaining rows by dragging them to reflect the following order:
Figure 5.3. Sort the form rows

- Click Save, then Save, to confirm your changes.
Chapter 6. Deploying the pizzaPlace project
The following chapter instructs you how to build and deploy a new instance of the pizzaPlace order business process in Red Hat Process Automation Manager.
Prerequisites
The Process Server is deployed and connected to the Business Central. For more information, see Installing and configuring Red Hat Process Automation Manager on Red Hat JBoss EAP 7.1.
Procedure
- Log in to Business Central and click Menu → Design → Projects.
- Click the project you want to deploy, for example pizzaPlace.
- Click Deploy.
If you deploy the project more than once, the Build & Deploy window opens prompting you to create a new container Id. Make changes or keep the default values, and click OK.
Chapter 7. Executing the pizzaPlace order process
Now that you have deployed the project, you can execute the project’s defined functionality. For this example, you will be acting as the customer (Bill) and fill out the pizza order form. The pizza place employee (Katy) will add the order price and send the order confirmation to your task inbox.
Prerequisites
- The Process Server is deployed and connected to the Red Hat Process Automation Manager. For more information, see Installing and configuring Red Hat Process Automation Manager on Red Hat JBoss EAP 7.1.
- You have deployed the pizzaPlace process. For more information, see Chapter 6, Deploying the pizzaPlace project.
Procedure
Log in to Business Central as the customer:
-
Username:
Bill -
Password:
bill
-
Username:
- Click Menu → Manage → Process Instances.
- Click New Process Instance, select pizzaPlace.pizzaOrders from the Process definition pull-down menu, and click Start.
Type the following values:
-
Pizza:
Large pizza -
Extra Ingredients:
Anchovies Drink:
BeerFigure 7.1. Input the order information

-
Pizza:
- Click Submit to start the process instance. After starting the process instance, the Manage Process Instances view opens.
Click anywhere in the pizzaOrders row to view the process details.
Figure 7.2. View the process details

Click the Diagram tab to view the process flow within the process diagram. The state of the process will be highlighted as it moves through each task.
Figure 7.3. View the process flow

Log out and log back in again to Business Central as the employee:
-
Username:
Katy -
Password:
katy
-
Username:
- Click Menu → Track → Task Inbox. This will take you to the order form. This is the form that the pizza place employee (Katy) will take ownership of and return an order confirmation containing the order price.
- Click anywhere in the Task row to open the order form.
Click Start, type the the order total in the Price field, and click Complete.
Figure 7.4. Adding the order total price

Log out and log back in again to Business Central as the customer:
-
Username:
Bill -
Password:
bill
-
Username:
- Click Menu → Track → Task Inbox. This will take you to the order confirmation form containing the order’s total price.
Appendix A. Versioning information
Documentation last updated on: Monday, October 1, 2018.
