Travel Order BPM Tutorial

by Mario Bruno
5,110 views Published on Aug 30, 2012
Applies to: All versions
Table of contents

Introduction

This tutorial will explain step by step how to create a simple Business Process Model. First the process to be modeled is introduced and explained, then you'll see how to realize it with WebRatio.

The Travel Order Process

The process of Travel Order starts when any customer of the travel agency starts a new travel order selecting a travel. If the customer cancels his order the process ends and the order is aborted. If the customer confirms he must provide personal data, then the travel order is send to the Sales Department of the Agency where an operator must check the availability of the travel, meanwhile an Administrative Dep. operator checks the customer's solvency. Then the Sales Dep. operator can book the travel and the Administrative Dep. finally edit the bill, which ends the process.

Step 1: Define the process

According to the BPMN notation, the first step is to define the process and the actors the cooperate in it. After this step it's necessary to define the tasks accomplished by each actor in the process.

If you're not in the BPM perspective, select Window > Open Perspective > BPM from the main menu.

Open BPM Perspective

1. Let's create a new Project. This project will contain all the process models we would like to cooperate. In the Main Menu:

  1. Click on File > New > BPM Project.
  2. Enter "Travel Order Example" as project name and click Finish.

Create the New Project

2. Now it's possible to create a new Process Model within the Project. In the BPM Explorer View:

  1. Right-click on the project and select New > Process
  2. Enter "TravelOrder" (avoiding spaces) as process name.
  3. Press Finish.

Create a new Process Model

3. In the Process Model created you will define the representation of the process of the Travel Order using the BPMN.By default every new Process Model is created with a Pool already defined. We have to change it's name according to our process:

  1. Double-click on the Pool tab "Pool 1" at the top of the edit area.
  2. Enter "Customer" as Pool name.

Change Pool name

4. The Pool is already created with a Lane within. It's necessary to change the name to the first Lane and add all the other Lanes of the process.To change the Lane name:

  1. Double-click on the Lane tab "Lane 1" at the left of the edit area.
  2. Enter "Customer" as Lane name.

Change Lane name

5. To add the other Pools:

  1. Right-click within the Pool and select Add Pool.
  2. Enter the name of the Pool.

Add a Pool to the Process

according to our process we have to create the "Travel Agency" Pool.

To add the other Lanes:

  1. right click within the Pool in which you want to add and lane and select Add Lane
  2. enter the name of the Lane

Add a Lane to the Process

according to our process we have to create the "Sales Department" and the "Administrative Deparment" lanes.

Add all the Lanes to the Process

6. Now it's possible to define the single steps of the process in the Lanes, assigning each task to the right actor. Within the first Pool a simple process has been already created. Since the process is started by the Customer we can leave the Start Event in the Customer Lane and change the name of the first Task:

  1. Double-click on the Task element.
  2. Enter "Select Travel" as Task name.

Since the Start Event represents the first item activated by the Customer to start the Process, it's necessary to change it's name:

  1. Double-click on the Start Event element.
  2. Enter "New Travel Order" as Task name.

Finally, since the process doesn't ends here, it's necessary to delete the End Event automatically created.

Change the name of the Task and of the Start Event. Delete the End Event

7. After having selected his travel, the Customer must verify his order and decide whether he confirms or cancels it. Let's add a "Confirm Order" Task:

  1. Click on the "Select Travel" Task.
  2. In the Pie Menu on the Task, click on the User Task Icon.
  3. Drag the new User Task in the Customer Lane.
  4. Enter "Confirm Order" as Gateway name.

Create a Confirm Order User Task

8. Basing on the responses of the customer, we will define a different path to be followed whether the travel order is confirmed or not, therefore we will use a Gateway element. To add a Gateway connected to the "Confirm Order" Task:

  1. Click on the "Confirm Order" Task.
  2. In the Pie Menu on the Task, click on the Exclusive Gateway icon.
  3. Drag the new Gateway in the Supervisor Lane.
  4. Enter "Verify Customer Confirmation" as Gateway name.
  5. In the Properties panel, in the Execution Property, select "Service" (since this element must be executed by the application).

Add a Service Exclusive Gateway

9. Once the Gateway has been placed, it's necessary to place the Flow Connectors representing the paths selected basing on the condition to be evaluated by the Gateway. Since this Gateway will evaluate the result of the execution of the "Confirm Order" Task, it's necessary to add two Flow Connectors: one in case the customer cancels his order and one in case he confirms it. The former will lead to the end of the process, the latter will activate the "Provide Customer Data" Task. Let's add the Flow Connector for the case in which the customer cancels his order, we will simultaneously create the End Event:

  1. Click on the "Verify Customer Confirmation" Gateway element.
  2. In the Pie Menu on the Gateway, click on the End Event icon.
  3. Drag the new End Event in the Customer Lane.
  4. Enter "Customer Abortion" as End Event name.
  5. Double-click on the newly created Flow Connector.
  6. Enter "Order cancelled" as Flow Connector name.
  7. In the Flow Connector Properties Panel check the Default Property (stating that this is the Connector followed by default).

Add a Flow Connector representing the case in which the customer cancels his order

Let's add the Flow Connector for the case in which the travel order is confirmed:

  1. Click on the "Verify Customer Confirmation" Gateway element.
  2. In the Pie Menu on the Gateway, click on the User Task Icon.
  3. Drag the new User Task in the Customer Lane.
  4. Double-click on the newly created User Task.
  5. Enter "Provide Customer Data" as User Task name.
  6. Double-click on the newly created Flow Connector.
  7. Enter "Order confirmed" as Flow Connector name.

Add a Flow Connector representing the case in which the customer confirms the order

10. After the execution of the "Provide Customer Data" Task the customer's process ends sending a message. It's necessary to add an End Message Event that states the end of the process and the sending of the message:

  1. Click on the "End Events" icon in the Menu.
  2. Select a End Message Event.
  3. Drag the new End Message Event in the Customer Lane.
  4. Enter "Travel Order Emission" as End Message Event name.

It's then necessary to link the "Provide Customer Data" Task to the newly created End Message Event:

  1. Click on the "Provide Customer Data" Task.
  2. In the Pie Menu on the Task, click on the Flow Connector icon.
  3. Drag the new Flow Connector to the "Travel Order Emission" End Message Event.

Add the End Message Event. Link the User Task to it

11. It is now necessary to complete the Travel Agency Pool. Let's add a New Start Message Event that will be activated by the activation of the End Message Event we've just created:

  1. Click on the "Starts Events" icon in the Menu.
  2. Select a Start Message Event.
  3. Drag the new Start Message Event in the Sales Department Lane.
  4. Enter "Travel Order Reception" as Start Message Event name.

Since this event must be activated by the End Message Event previously created, it's necessary to link them.

  1. Click on the "Travel Order Emission" Start Message Event.
  2. In the properties panel click on the target selection button.
  3. Select "Travel Order Reception".

Define the Target Event

12. Once the Travel Order has been received, a Sales Dep. operator must check the availability of the travel. Meanwhile an Administrative Dep. operator must check the solvency of the customer. Therefore we will use a Parallel Gateway element.

  1. Click on the "Gateways" icon in the Menu.
  2. Select a Parallel Gateway element.
  3. Drag the Parallel Gateway element in the Sales Dep. Lane.
  4. Enter "Perform the parallel checks" as Gateway name.
  5. To link the Start Event to the Gateway, click on the "Travel Order Reception" Task.
  6. In the Pie Menu on the Task, click on the Flow Connector icon.
  7. Drag the new Flow Connector to the newly created Gateway.

Add a Parallel Gateway

13. Once the Gateway has been placed, it's possible to add the next task.

  1. Click on the "Perform the parallel checks" Gateway.
  2. In the Pie Menu on the Gateway, click on the User Task Icon.
  3. Drag the new User Task in the Sales Dep. Lane.
  4. Enter "Check availability" as User Task name.

Let's add the paralelly task:

  1. Click on the "Do the parallel checks" Gateway.
  2. In the Pie Menu on the Gateway, click on the User Task Icon.
  3. Drag the new User Task in the Administrative Dep. Lane.
  4. Enter "Check solvency" as User Task name.

Add the parallel tasks

14. Once the parallel tasks are achieved, the process can continue normally. Therefore it's necessary to add an other Parallel Gateway element:

  1. Click on the "Gateways" icon in the Menu.
  2. Select a Parallel Gateway element.
  3. Drag the Parallel Gateway element in the Sales Dep. Lane.
  4. Enter "Parallel checks performed" as Gateway name.

It's then necessary to add the destination of the Flow Connectors.

  1. Click on the "Check availability" Task.
  2. In the Pie Menu on the Task, click on the Flow Connector Icon.
  3. Drag the new Flow Connector to the "Parallel checks performed" Gateway.
  4. In the same way, click on the "Check solvency" Task.
  5. In the Pie Menu on the Task, click on the Flow Connector Icon.
  6. Drag the new Flow Connector to the "Parallel checks performed" Gateway.

Add the other Parallel Gateway

15. To complete the process, two other User Tasks must be added. Firstly the Sales Dep. operator must book the travel.

  1. Click on the "Parallel checks performed" Gateway.
  2. In the Pie Menu on the Gateway, click on the User Task Icon.
  3. Drag the new User Task in the Sales Dep. Lane.
  4. Enter "Book the travel" as User Task name.

Next the Administrative Dep. operator can edit the bill.

  1. Click on the "Book the travel" Task.
  2. In the Pie Menu on the Task, click on the User Task Icon.
  3. Drag the new User Task in the Administrative Dep. Lane.
  4. Enter "Edit the bill"as User Task name.

Add the two last User Tasks

16. After the execution of the "Edit the bill" Task the process ends. It's necessary to add an End Event.

  1. Click on the "Edit the bill" Task.
  2. In the Pie Menu on the Task, click on the End Event Icon.
  3. Drag the new End Event in the Administrative Dep. Lane.
  4. Enter "Travel Order End"as End Event name.

Add the End Event

Step 2: Process Data

Once the steps of the process have been entirely defined we can focus on the definition of the parameters of the process. Here we will define the internal structure of every parameter, if it's a simple parameter or a complex one (in this case we will create a Business Object). In this phase we will also define which process parameters are managed by every single Element in the process (Task, Event, Gateway). The first process parameter to define is the order parameter. The order is composed by multiple properties such as the destination, the travel reference, the start date and the end date. Since the order is a complex parameter we must define a Business Object:

  1. In the BPM Explorer view, right-click on the Business Objects project element.
  2. Select New -> Business Object.
  3. Enter "Order.bo" as Business Object name.

Create the Order Business Object

In the "Order" Business Object window, we will insert all the properties that define a customer order:

  • Destination: contains the destination of the travel.
  • Travel reference: contains the catalogue reference of the travel.
  • Price: contains the price of the travel.
  • Start date: contains the start date of the travel.
  • End date: contains the end date of the travel.
  • Comments: contains notes added by the Customer.

Let's add all the properties to the Order Business Object. In the Order Business Object window, for every property:

  1. Click on the "Add" button.
  2. In the "Property Name" field enter the name of the property.
  3. In the "type" field select the type of the property.

as an example:

  1. Click on the "Add" button.
  2. In the "Property Name" field enter "Start date".
  3. In the "type" field select"date".

Add the properties to the Order Business Object

Once the Order Business Object has been defined, it's possible to use it as process parameter:

  1. Press on the Edit Process Parameters icon next to the Pool name.
  2. In the Edit Process Parameters window press on the "Add" button.
  3. Enter Order as parameter name.
  4. Click on the Business Object icon.
  5. Select the Order Business Object.

Add the Order process parameter

Now it's possible to state that during the "Select travel" Task, the Customer must edit the Order parameter:

  1. Click on the "Select travel" Task.
  2. In the properties panel select the Order parameter.
  3. Check the properties Visible, Editable, Required.

Set the Select travel Task parameters

In the "Confirm Order" task, the Customer will decide whether to confirm or to cancel the travel ordered. In the Task, the Order will be Visible. It's necessary to add a new parameter, to represent the decision of the Customer:

  1. Right-click on the pool.
  2. Select Edit Process Parameter.
  3. In the Edit Process Parameter windows press the Add button.
  4. Insert Confirmation as parameter name.
  5. Insert string as parameter type.

This parameter is particular since we want the Supervisor to choose only among these two values: "Confirmed" or "Cancelled". In order to define statically the available parameter values:

  1. Click on the gray dot next to the type field.
  2. In the Case Values Editing window press the Add button.
  3. Insert "Confirmed" as value.
  4. Again, click the Add button.
  5. Insert "Cancelled" as value.

Define the Confirmation parameter case values

Once the new paramaters has been set, it's possible to define in the "Confirm Order" Task the Order parameter as Visible and the Confirmation parameter as Required.

Set the Confirm Order Task parameters

If the Customer confirms his order, he must provide personnal data before the emission of his travel order. Therefore we need an other Business Object with the following properties:

  • Name: contains the name of the Customer.
  • Surname: contains the surname of the Customer.
  • Sex: contains the sex of the Customer (M or F).
  • Birth date: contains the birth date of the Customer.
  • Credit Card Number: contains the Credit Card Number of the Customer.
  • Credit Card End of validity: contains the end date of the Credit Card validity.
  • Credit Card Validation number: contains the Credit Card validation Number.
  1. Again, in the BPM Explorer view, right-click on the Business Objects project element.
  2. Select New -> Business Object.
  3. Enter "Customer.bo" as Business Object name.
  4. Repeat the previous steps to complete this new Business Object and to create the corresponding process parameter.

Add the Customer process parameter

Once the new parameter has been set, it's possible to define in the "Provide customer data" Task the Customer parameter as Visible, Editable and Required.

Set the Provide Customer Data Task parameters

Since the process parameters are specific to each pool, we need to create the same "Order" and "Customer" parameters in the pool and to couple them with the corresponding ones in the "Customer" pool:

  1. Right-click on the "Travel Agency" pool
  2. Select Edit Process Parameter.
  3. In the Edit Process Parameter windows press the "Add" button.
  4. Insert Order as parameter name.
  5. Again, press the "Add" button.
  6. Insert Customer as parameter name.
  7. Click on the "Travel Order Emission" End Event.
  8. In the properties panel click on the Input Coupling button.
  9. Use the Guess Coupling button to complete the table.

Couple each pool's parameters

The "Check availability" Task will simply take the order and verify the availability of the travel. To accomplish this the task will only have the Order parameter as Visible. In the same way, the "Check solvency" task will only have the Customer parameter as Visible.

Set the Check tasks parameters

The "Book the travel" and "Edit the bill" Tasks will need particular sets of information. It requires to select the appropriate parameters within each Business Object parameter.

Set the Edit the bill parameters

Step 3: Business Rule

Once all the process parameters has been defined, it's possible to define the Business Rules. In this step we will define the behaviour of the process' Gateways defining the conditions for the proceeding of the process.

The "Verify Customer Confirmation" Gateway will automatically evaluate the result of the "Confirm Order" User Task execution. If the travel order is confirmed it will activate the "Provide customer data" Task, else it will return to the "Customer abortion" End Event.

The Verify Customer Validation Gateway

Let's configure this Gateway:

  1. Click on the "Verify Customer Validation" Gateway.
  2. In the Properties Panel, in the Condition Type Property, choose Literal (since we want the Gateway to evaluate the value contained in the Confirmation Process Parameter).
  3. In the Properties Panel, in the Condition Value Property, press the "Browse" button.
  4. Select the Confirmation Process Parameter in the Parameter field.
  5. Select the Confirmed case value for the Flow Connector that leads to the "Provide customer data" Task.
  6. Select the Cancelled case value for the Flow Connector that leads to the "Customer abortion" End Event.
Configure the Verify Customer Confirmation Gateway
 

Step 4: Business Process Users

By defining the Process Lanes we are defining all the actor categories of a process. With the Roles we are defining the Group of users that will use the Process. A Role might correspond to several Lanes in the same Process or in different Processes (e.g.: a user belonging to the Sales Dep. Role might act as Sales Dep. Operator in a Travel Order Process instance, but he might start a Travel Order Process himself, or he might act as Customer in a Travel Order Process Instance). The Roles are defined within a BPM Project (since the Roles are shared in all the Process Models contained in the BPM Project). In this project we are creating three Roles: Customer, Sales Dep. Operator and Administrative Dep. Operator:

  • Customer: is related to the Customer Lane in the Travel Order Process Model.
  • Sales Dep. Operator: is related to the Customer Lane and Sales Dep. Lane (since a Sales Dep. Operator might ask for a travel order himself).
  • Administrative Dep. Operator: is related to the Administrative Dep. Lane in the Travel Order Process Model (we assume that an Administrative Dep. Operator will use a different Process for his Travel Orders).

To add the user Roles to the Project, in the BPM Explorer window double click on the "Roles" node, or right-click on this node, than on Open With -->Roles Editor.

Open Roles Configuration Panel

Once the Roles configuration panel has been shown it's possible to create the Roles:

  1. Press on the "Add" button.
  2. Insert the Role name.

Create the BPM Project Roles

Now we can associate the newly created Roles to the Travel Order Process Model Lanes:

  1. In the Process Model click on the Customer Lane.
  2. In the Properties panel, click on the Roles Property Select Roles button.
  3. Choose the Customer and the Sales Dep. Operator Roles.

Define the Roles that can act as Customer in the Travel Order Process Model

It's possible to repeat this steps to associate the Sales Dep. Operator Role to the Sales Dep. Lane and the Administrative Dep. Operator Role to the Administrative Dep. Lane.

Step 5: Publish the Process

Now we have completely defined the process. It's possible to validate the process model by activating the Publish Process functionality.

This functionality will automatically create a Java Web Application that supports the process modeled and permits to verify the model correctness browsing it.

 
 

Related Learning Objects