Red Hat Training

A Red Hat training course is available for Red Hat Process Automation Manager

Executing a business process in Business Central

Red Hat Process Automation Manager 7.2

Red Hat Customer Content Services

Abstract

This document describes how to use Business Central to create a user interface for a pizza ordering process.

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

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

  1. Log in to Business Central and click MenuDesignProjects.
  2. Click Add Project.
  3. Type pizzaPlace in the Name field of the Add Project window and click Add.

    Figure 1.1. Add the pizzaPlace project

    Adding the pizzaPlace project window

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.

Procedure

  1. Click the gear icon gear icon in the upper-right corner, and click Users.
  2. Click new user , enter Katy, and click Next.
  3. Click the Groups tab and click add groups .
  4. Select rest-all and kie-server in the Group selection for Katy window and click Add to selected groups.

    Figure 2.1. Group selection for Katy

    Selecting group assignments for Katy
  5. Click the Roles tab and click Add roles.

    Figure 2.2. Add roles for Katy

    Add roles menu location
  6. Select admin and user and click Add to selected roles.
  7. Click Create to assign Katy to the admin and user roles.
  8. Click Yes to set the password to katy and click Change.
  9. Create another New user, enter Bill, and click Next.
  10. Click the Groups tab and click add groups .
  11. Select rest-all and kie-server and click Add to selected groups.
  12. Click the Roles tab and click Add roles.

    Figure 2.3. Add roles for Bill

    Add roles menu location
  13. Select admin and user and click Add to selected roles.
  14. Click Create to assign Bill to the admin and user roles.
  15. Click Yes to set the password to bill and click Change.
Note

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

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

  1. Log in to Business Central and click MenuDesignProjectspizzaPlace.
  2. Click Add AssetBusiness Process.
  3. In the Create new Business Process wizard, enter the following values:

    1. Business Process: pizzaOrders.
    2. Package: select com.myspace.pizzaplace.
  4. Click Ok. The process designer opens.
  5. In the upper-right corner, click the Diagram properties diagram properties icon.
  6. Scroll down and expand Process Data.
  7. Click btn plus four times next to Process Variables, and define the following variables:

    Figure 3.1. Defining variables in the Process Data window

    Defining variables in the Process Data window
  8. 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

  1. Click the start event to create an outgoing connection to a new task.

    Figure 3.2. Outgoing connection from the start event to a user task

    Creating an outgoing connection from the start event to a user task
  2. Convert the new task to a user task.

    Figure 3.3. Convert into a User task

    Converting in to a user task
  3. Click the user task and enter Process Order in the Name field.
  4. Expand Implementation/Execution and enter the following values:

    • Task Name: processOrder
    • Actor: Katy

      Figure 3.4. The Diagram properties window

      Input the Task Name and Actor in to the Diagram properties window
  5. Click btn assign next to Assignments.
  6. In the Process Order Data I/O window, create the following input assignments:

    Figure 3.5. The Process Order Data input and output assignments

    Input values in to the Process Order Data input and output assignments window
  7. Click Save.
  8. 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

  1. Click the Process Order task to create an outgoing connection to a new task.

    Figure 3.6. Outgoing connection from the Process Order task to a user task

    Creating an outgoing connection from the Process Order task to a user task
  2. Convert the new task to a user task.

    Figure 3.7. Convert into a User task

    Converting in to a user task
  3. Click the user task and enter Confirmation in the Name field.
  4. Expand Implementation/Execution and enter the following values:

    • Task Name: confirmation
    • Actor: Bill

      Figure 3.8. The Diagram properties window

      Input the Task Name and Actor in to the Diagram properties window
  5. Click btn assign next to Assignments.
  6. In the Confirmation Data I/O window, create the following input assignments:

    Figure 3.9. The Confirmation Data input and output assignments

    Input values in to the Confirmation Data input and output assignments window
  7. Click Save.
  8. 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

  1. Click the Confirmation user task and connect it to an end event.

    Figure 3.10. Outgoing connection from the Confirmation user task

    Creating an outgoing connection from the Confirmation user task
  2. 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

  1. Log in to Business Central and click MenuDesignProjectspizzaPlacepizzaOrders.
  2. Select Generate all forms from the Form Generation menu.

    Figure 4.1. Generate all forms menu

    Selecting menu option to Generate all forms

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

  1. Log in to Business Central and click MenuDesignProjectspizzaPlace.
  2. Click the pizzaPlace.pizzaOrders-taskform form.
  3. Click dots in the upper-right corner of the Price row and click Remove.
  4. Click dots in the upper-right corner of the ExtraIngredients row and click Edit.
  5. Select TextArea from the Field Type menu.
  6. Change both the Label and PlaceHolder fields to Extra Ingredients.
  7. Click Ok.
  8. Sort the remaining rows by dragging them to reflect the following order:

    Figure 5.1. Sort the form rows

    Sorting the form rows
  9. 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

  1. Click MenuDesignProjectspizzaPlace.
  2. Click the processOrder-taskform form.
  3. Click dots in the upper-right corner of the Inputs row, select Edit, and change Inputs: to Order Info:. Click Ok.
  4. Click dots in the upper-right corner of the Outputs: row and click Remove.
  5. Click dots in the upper-right corner of the ExtraIngredients row and select Edit.
  6. From the Field Type menu, select TextArea.
  7. Change both the Label and PlaceHolder fields to Extra Ingredients.
  8. Click Ok.
  9. Sort the remaining rows by dragging them to reflect the following order:

    Figure 5.2. Sort the form rows

    Sorting the form rows
  10. 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

  1. Click MenuDesignProjectspizzaPlace.
  2. Click the confirmation-taskform form.
  3. Click dots in the upper-right corner of the Inputs row, select Edit, and change Inputs: to Your Order Info:.
  4. Click dots in the upper-right corner of the ExtraIngredients row and select Edit.
  5. From the Field Type menu, select TextArea.
  6. Change both the Label and PlaceHolder fields to Extra Ingredients.
  7. Click Ok.

    Note

    Confirm that the Pizza, Extra Ingredients, Drink, and Price rows are marked as Read Only by clicking dots in the upper-right corner of each and selecting Edit. The Read Only box should be selected. If not, select it and click Ok.

  8. Sort the remaining rows by dragging them to reflect the following order:

    Figure 5.3. Sort the form rows

    Sorting the form rows
  9. 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.

Procedure

  1. Log in to Business Central and click MenuDesignProjects.
  2. Click the project you want to deploy, for example pizzaPlace.
  3. Click Deploy.
Note

If you deploy the project more than once, the Build & Deploy window opens prompting you to create a new deployment unit ID (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

Procedure

  1. Log in to Business Central as the customer:

    • Username: Bill
    • Password: bill
  2. Click MenuManageProcess Instances.
  3. Click New Process Instance, select pizzaPlace.pizzaOrders from the Process definition menu, and click Start.
  4. Type the following values:

    • Pizza: Large pizza
    • Extra Ingredients: Anchovies
    • Drink: Beer

      Figure 7.1. Input the order information

      Inputting the order information in to the order form
  5. Click Submit to start the process instance. After starting the process instance, the Manage Process Instances view opens.
  6. Click anywhere in the pizzaOrders row to view the process details.

    Figure 7.2. View the process details

    Viewing the process details in the Manage Process Instances view
  7. 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

    Viewing the process flow in the process diagram
  8. Log out and log back in again to Business Central as the employee:

    • Username: Katy
    • Password: katy
  9. Click MenuTrackTask 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.
  10. Click anywhere in the Task row to open the order form.
  11. Click Start, type the order total in the Price field, and click Complete.

    Figure 7.4. Adding the order total price

    Employee adds the order total to be returned to the customer
  12. Log out and log back in again to Business Central as the customer:

    • Username: Bill
    • Password: bill
  13. Click MenuTrackTask Inbox. This will take you to the order confirmation form containing the order’s total price.

Appendix A. Versioning information

Documentation last updated on Friday, May 22, 2020.

Legal Notice

Copyright © 2020 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.