Professional Documents
Culture Documents
com)
2. The first thing to do is to give the diagram a more descriptive name. Select the diagram
outside the pool, then go to the Details panel and click Edit next to the Name field.
Enter the new name in the popup, for example Simple Travel Request and click OK.
You can see in the tab at the top of the whiteboard that the diagram name has changed.
3. Now give the Pool a more descriptive name. Select the pool, then go to the Details
panel and click Edit next to the Name field. Enter the new name in the popup. When
you have renamed the diagram and the pool, the diagram looks like this:
4. Now add the tasks and decision points to the diagram. This process starts when an
employee fills in a request form. You do not need to create a task for this because it is
this action that triggers the process to start. This is known as process initiation. A
form for process initiation is defined at the pool level.
5. The next thing that happens in this simple process is a branch depending on whether
the request preapproved. This is defined as a gateway (an exclusive or, or XOR
gateway). To add this to the diagram:
a. Select the Step1 element that was added automatically. To do this, right-click on
the task icon, and choose delete from the pop-up menu.
b. Select the XOR gateway icon from the palette and drag it on to the whiteboard.
c. Change the name of the gateway by clicking on it and typing the new name.
d. Connect the gateway to the process flow. To do this, select the start icon, which
displays the context palette. Then, with the mouse, click and hold the flow arrow in
the context palette (the mouse pointer changes to a flow arrow with a round end),
the drag the pointer onto the gateway icon and release the mouse button. The flow
line is added from the start icon to the gateway.
6. Define what happens after the gateway. You can think of an exclusive gateway as a
question. In this case, the question is "Is this travel preapproved?" so there are two
possible answers, Yes and No.
7. If the response is No, the next task is for the manager to review the travel request and
approve or refuse it. Add a task by dragging the icon for a human task from the palette.
Click on the task name and change it to a descriptive name, for example Manager review
. Then add a flow element from the gateway to the task.
8. In a future evolution of this process, the next task would be to send the travel request
details to the admin team so they can handle the booking. For now, though we are just
interested in getting the first part of the process working, so add an end after the
approval task. You can do this by dragging the end icon from the palette to the
whiteboard, and then connecting to the Manager review task with a flow element.
9. Add the other flow out of the gateway. For now, this also just goes to an end. You can
do this as you did in the previous step, but as an alternative, you can use the context
palette of the preceding element, as follows:
a. Select the gateway. The context palette is displayed.
b. Drag and drop the event icon from the context palette (circle icon). When you drop
the icon, a popup of event types is displayed.
c. Select the end event, which is the solid red icon at the bottom right. The end event
is added, and the flow element connecting the gateway to the end is added
automatically.
10. Finally, label the flows out of the gateway Label so that it is clear when each one is
taken. To do this, select each flow in turn flow, and enter the name in the Details panel,
General pane.
Now the diagram is complete, but there is an icon that indicates an error on the gateway. We
cannot fix this until some variables are defined so we will come back to it later. This diagram
looks like this:
Define variables
In this stage, we define the variables needed for the process. In a real process, you define a
data model that takes account of data from external sources, and of how business data is
used across all your business applications. For this tutorial, if you are using a Subscription
edition version 6.3 or later, you will use business data. If you are using the Community edition
(as in the video) or an older version of a Subscription edition, you use process data.
Subscription edition
If you are using a Subscription edition (Performance, Efficiency, or Teamwork), there are two
stages: first you define the business data model, and then you specify how the process
handles objects of the model. The model is defined as Java objects, and the process uses
instances of objects. If you are not familiar with the terminology, all you need to remember is
that the model is the global definition, with a collection of structured variables. For your
process, you select the subset that is relevant.
First, we will create the business data model, which will then be available for all processes.
We will use a model with two objects:
Employee identifies the person submitting the travel request. In a real process, the
employee information could be stored in an external database and accessed using a
connector, but for this first example, we will use a business object as a temporary
shortcut.
TravelRequest contains the details of the travel that is being requested and its approval
status.
To define the business data model:
1. Go to the Development menu, choose Business Data Model, and then choose
Manage.... This opens the dialog to manage the business data model.
2. Beside the list of business object types, click Add. A temporary type name, such as
BusinessObject1 is added to the list.
3. Click on the temporary name, and change it to Employee.
4. Select the Employee business object type, and add its attributes:
a. In the Attributes tab, click Add. A temporary attribute name is added to the Name
column.
b. Change the temporary name to name.
c. Verify that the Type is STRING
d. Check the box to specify that this attribute is mandatory.
The Employee object type is now created.
5. Create the TravelRequest object type, by clicking the Add button that is beside the list of
business object types.
6. Specify these attributes of the TravelRequest object type:
Variable
Data type
Mandatory
depatureDate
Date
yes
numberOfNights
Integer
yes
hotelNeeded
Boolean
no
destination
String
yes
reasonForTravel
String
yes
isPreApproved
Boolean
no
approvalNumber
Long
no
approval
Boolean
no
responseReason
String
no
1.
2.
3.
4.
5.
6.
7.
8.
You have now defined the variables that will be used in the process. You can complete the
diagram.
Community edition
To add a variable:
1. Select the pool.
2. Go to the Details panel, Data pane and click Add beside the Process data box.
3. For each variable, specify the name, a description (optional), set the datatype, and enter
the default value if there is one. Then click Finish & Add (or Finish for the last variable).
The table below shows the variables to add, with their data types and default values:
Variable
Description
Data type
name
Text
depatureDate
Date
numberOfNights
Integer
hotelNeeded
destination
Destination of travel
Text
reasonForTravel
Text
isPreApproved
Boolean
approvalNumber
Long
approval
Boolean
responseReason
Text
Default
value
0
no
no
You have now defined the variables that will be used in the process. You can go to the next
section and complete the diagram.
Create forms
Now that the process diagram is finished and the variables are defined, you need to create
the forms. A form is a collection of widgets. You can add each widget separately, or you can
pre-load your form with widgets corresponding to the variables that are relevant, which is what
we are going to do. This process has two forms, a request form for the person submitting the
travel request, which initiates the process, and a review form for the manager reviewing the
request and deciding whether to approve it.
This is how to define the request form:
1. Select the pool and go to the Details panel, Application tab.
2. Check the Pageflow and then click the Add button to add a form.
3. If some forms are already defined for the process, the popup gives you the choice of
creating a new form or duplicating an existing form. Check the box for Create a new
form, and then click Next to go to the Add a new form screen. If there are no existing
forms, there is no choice to make, and the Add a new form screen is displayed directly.
4. In the Add a new form, specify a name and (optionally) a description for the form.
5. Then select the variables to be used in the form. In the request form, all the variables
that you defined are used except for approval and responseReason. Select all the
variables except these two.
If you are using a Subscription edition, select the variables in the Business data
tab, by checking the box for each attribute, for example departureDate, not the
container (request).
If you are using the Community edition, select the variables in the Process data
list, by checking the box for each variable.
6. Then click Finish. A form layout is created, with a widget for each variable.
7. Change the form layout so that the arrangement of the widgets is more logical, and to
make it more attractive. To move a widget, drag it into an empty cell in the layout. To
change the column layout of the form, click the + and - icons. It is easier to see the form
layout if you use the whole screen, so click the expand icon at the top right corner of the
whiteboard.
8. Modify the widget labels. By default, the widget label is the name of the associated
variable. Change them to text that explains how to fill in the form. To change a widget
label, double-click on the label and type your new text. When you have entered the new
label, click elsewhere on the form.
This is what the finished form definition looks like:
The procedure for defining the manager review form is the same, but the form uses all the
variables except isPreApproved.
You have now defined all the forms needed for the process.
Specify actors
The next stage is to define who carries out the steps in the process. This is done by assigning
actors
. An actor is a placeholder for the person who will do a task. When you configure a process,
you make the connection between the actors defined in the process definition and the realworld people who will do process steps. Bonita BPM Studio comes with a test organization,
called ACME, which you can use for testing. In this example, we have two people, the
employee who initiates the process, and the employee's manager. The managers are also
employees, so I will use one actor for all steps, but use a filter to specify who does the
approval step. This is how it works:
1. In the diagram, select the pool. This is where you define all the actors for the process.
By default, there is already an Employee actor in the ACME organization, which is
defined for testing. You can change the organization and the actors later, but for initial
testing, this will work fine. The default settings mean that any employee in the
organization can start a case of the travel request process. You do not need to change
anything.
2. Next, select the review step and define who can do this. This step will be done by the
manager of the person who initiated the request. All the managers are also employees,
and the employee actor is defined for the lane, so check the button for Use the actor
defined in the lane.
3. To make sure that the review task is sent to the right manager, I use an actor filter:
a. Click the actor filter Set button.
b. Open up the list of process actor filters.
c. Select initiator-manager. This means that the review task is to be done by the
manager of the person who submitted the request that initiated the process.
d. Specify a name for the actor filter definition, and click Finish.
The process is now defined. The next section shows you how to configure and run it.
1. Click Run in the coolbar. This logs you in to the Bonita BPM Portal as the test user,
Helen Kelly, and displays the form to start a case of the process.
2. Fill in the form: for this test, suppose that the travel request is not preapproved. When
you have completed the form click Submit.
3. Click Logout. The Bonita BPM Portal login screen is displayed.
4. Log in with username william.jobs and password bpm.
5. William's list of tasks is displayed. Click on the Review request task to select it, and click
Do it. The form for travel request review is displayed, showing the information that
Helen entered in her form.
6. Complete the form and click Submit.
In this tutorial, you have seen how to create a process diagram, create forms, add variables,
specify who performs activities in the process, and how to configure and run a process for
testing. For a real process, the next steps are to define the data model, complete the diagram
to cover the whole process, and add connectors to external services such as email.