Vacation Request BPM Tutorial

by Laura Cigardi
12,456 views Published on Oct 24, 2011
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 Vacation Request Process

The process of Vacations Request starts when any employee of the organization submits a vacation request, once the requirement is registered, the request is received by the immediate supervisor of the employee requesting the vacation, the supervisor must approve or reject the request, if the request is rejected the application is returned to the applicant/employee who can review the rejection reasons. If the request is approved a notification is generated to the Human Resources Representative, who must complete the respective management procedures. This process focuses in controlling the requests of Vacations of the organization, from the initial request up to its approval or rejection.

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

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 "Example Project" as project name and press Finish.

Create the New "Example" Project

Create the New "Example" 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 "VacationRequest" (avoiding spaces) as process name.
  3. Press Finish.

Create a new Process Model

Create a new Process Model

3. In the Process Model created you will define the representation of the process of the Vacation Request 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 "Vacation Request" as Pool name.

Change 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 "Employee" as Lane name.

Change Lane name

Change Lane name

To add the other Lanes:

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

Add a Lane to the Process

Add a Lane to the Process

according to our process we have to create the "Supervisor" and the "Human Resources Assistant" Lanes.

Add all the Lanes to the Process

Add all the Lanes to the Process

5. 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 Lane a simple process has been already created. Since the process is started by the Employee we can leave the Start Event in the Employee Lane and change the name of the first Task:

  1. Double-click on the Task element.
  2. Enter "Register Vacation Request" as Task name.

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

  1. Double-click on the Start Event element.
  2. Enter "New Vacation Request" 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

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

6. The following step consists on a test of the availability of the vacation days executed by the application. To accomplish this we need to define an automatic procedure that given the Vacation Request will state if the vacations days are available or not for that Employee (eventually connecting to the Information System). To represent this automatic procedure we need a Service Task:

  1. Click on the "Register Vacation Request" Task.
  2. In the Pie Menu on the Task, click on the User Task icon.
  3. Drag the new User Task in the Supervisor Lane.
  4. Enter "Verify Available Vacation Days" as Task name.
  5. In the Task Properties Panel, select Service for the Execution Property (since this is an automatic procedure performed by the application).

Add a Service Task

Add a Service Task

7. Basing on the result of the automatic procedure, we will define a different path to be followed whether the vacation days are available or not, therefore we will use a Gateway element. To add a Gateway connected to the "Register Vacation Request" Task:

  1. Click on the "Verify Available Vacation Days" 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 Days Availability" 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

Add a Service Exclusive Gateway

8. 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 "Verify Available Vacation Days" Task, it's necessary to add two Flow Connectors: one in case the vacation days are available and one in case the vacation days are unavailable. The former will activate a new Task for the approval of the vacation, the latter will re-activate the "Register Vacation Request" Task. Let's add the Flow Connector for the case in which the vacation days are available, we will simultaneously create the Task for the Supervisor approvation of the vacation:

  1. Click on the "Verify Available Vacation Days" Gateway element.
  2. In the Pie Menu on the Gateway, click on the User Task icon.
  3. Drag the new User Task in the Supervisor Lane.
  4. Enter "Approve Vacation Days" as Task name.
  5. Double-click on the newly created Flow Connector.
  6. Enter "Days Available" 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 vacation days are available

Add a Flow Connector representing the case in which the vacation days are available

Let's add the Flow Connector for the case in which the vacation days are not available:

  1. click on the "Verify Available Vacation Days" Gateway element
  2. in the Pie Menu on the Gateway, click on the Flow Connector icon
  3. drag the new Flow Connector to "Register Vacation Request" Task
  4. double-click on the newly created Flow Connector
  5. enter "Days Not Available" as Flow Connector name

Add a Flow Connector representing the case in which the vacation days are not available

Add a Flow Connector representing the case in which the vacation days are not available

9. The approvation of the Supervisor must be checked by a Gateway that will define a path if the vacation has been approved and a path if the vacation hasn't been approved:

  1. Click on the "Approve Vacation Days" Task.
  2. In the Pie Menu on the Task, click on the Exclusive Gateway icon.
  3. Enter "Verify Approvation Vacation Days" as Gateway name.
  4. In the Properties panel, in the Execution Property, select "Service" (since this element must be executed by the application).

Add the "Verify Approvation Vacation Days" Exclusive Gateway

Add the "Verify Approvation Vacation Days" Exclusive Gateway

10. Once the Gateway has been placed, it's necessary to add the destination of the Flow Connectors. If the vacation days are not approved we want to notify it to the Employee, if the vacation days are approved we want to activate a Task executed by the Human Resource Assistant that manage the vacation request.

Let's define the case in which the vacation are approved:

  1. Click on the "Verify Approvation Vacation Days" Gateway.
  2. In the Pie Menu on the Gateway, click on the User Task icon.
  3. Drag the new User Task in the Human Resource Assistant Lane.
  4. Enter "Make Administrative Task" as Task name.
  5. Double-click on the newly created Flow Connector.
  6. Enter "Approved" as Flow Connector name.

Let's define the case in which the vacation are not approved:

  1. Click on the "Verify Approvation Vacation Days" Gateway.
  2. In the Pie Menu on the Gateway, click on the User Task icon.
  3. Drag the new User Task in the Employee Lane.
  4. Enter "Inform Reject Reason" as Task name.
  5. Double-click on the newly created Flow Connector.
  6. Enter "Not Approved" as Flow Connector name.

Add the "Make Administrative Task" and "Inform Reject Reason" User Tasks

Add the "Make Administrative Task" and "Inform Reject Reason" User Tasks

11. After the execution of the "Make Administrative Task" Task the process ends. It's necessary to add an End Event that states the end of the process:

  1. Click on the "Make Administrative Task" Task.
  2. In the Pie Menu on the Task, click on the End Event icon.
  3. Drag the new End Event in the Employee Lane.
  4. Enter "Vacation Request End" as End Event name.

Add the End Event

Add the End Event

12. After the execution of the "Inform Reject Reason" Task the process ends. It's necessary to add a Flow Connector from the Task to the "Vacation Request End" End Event:

  1. Click on the "Inform Reject Reason" Task.
  2. In the Pie Menu on the Task, click on the Flow Connector icon.
  3. Drag the new Flow Connector to the "Vacation Request End" End Event.

Complete Process Representation

Complete Process Representation

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 vacation request parameter. The vacation request is composed by multiple properties such as the request date, the start date and the end date. Since the vacation request 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 "VacationRequest.bo" as Business Object name.

Create the Vacation Request Business Object

Create the Vacation Request Business Object

In the "VacationRequest" Business Object window, we will insert all the properties that define a vacation request:

  • Request Date: contains the date in which the request is created.
  • Start Date: contains the start date of the vacation.
  • End Date: contains the end date of the vacation.
  • Notes: contains notes added by the Employee.

Let's add all the properties to the Vacation Request Business Object. In the VacationRequest Business Object widow, for every property:

  1. Press 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. Press on tha "Add" button.
  2. In the "Property Name" field enter "Request Date".
  3. In the "type" field select"date".

Add the properties to the Vacation Request Business Object

Add the properties to the Vacation Request Business Object

Once the Vacation Request 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 click on the "Add" button.
  3. Enter Vacation Request as parameter name.
  4. Press on the Business Object icon.
  5. Select the VacationRequest Business Object.

Add the Vacation Request process parameter

Add the Vacation Request process parameter

Now it's possible to state that during the "Register Vacation Request" Task, the Employee must edit the Vacation Request parameter:

  1. Click on the "Register Vacation Request" Task.
  2. In the properties panel select the Vacation Request parameter.
  3. Check the properties Visible, Editable, Required.

Set the Register Vacation Request Task parameters

Set the Register Vacation Request Task parameters

In the "Approve Vacation Days" task, the Supervisor will decide whether to approve or not the vacation days requested. In the Task, the Vacation Request will be Visible. It's necessary to add a new parameter, to represent the decision of the supervisor:

  1. Right-click on the pool.
  2. Select Edit Process Parameter.
  3. In the Edit Process Parameter windows press the "Add" button.
  4. Insert Approvation 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: "Approved" or "Not Approved". 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 "Approved" as value.
  4. Again, click the Add button.
  5. Insert "Not Approved" as value.

Define the Approvation parameter case values

Define the Approvation parameter case values

If the Supervisor rejects the Vacation Request might want to provide reject reasons to the Employee. To do this it's necessary to define a new parameter named "Reject Reason":

  1. Right-click on the pool.
  2. Select Edit Process Parameter.
  3. In the Edit Process Parameter windows press the "Add" button.
  4. Insert Reject Reason as parameter name.
  5. Insert text as parameter type (since the reject reason might be a long text).

Once the new paramaters has been set, it's possible to define in the "Approve Vacation Days" the Vacation Request parameter as Visible, the Approvation parameter as Required and the Reject Reason parameter as Editable.

Set the Approve Vacation Days Task parameters

Set the Approve Vacation Days Task parameters

The "Inform Reject Reason" Task function is only to provide to the Employee the Reject Reason of his Vacation Request. The Task is set only with the Inform Reject Reason parameter as Visible.

Set the Inform Reject Reason Task parameters

Set the Inform Reject Reason Task parameters

The "Make Administrative Task" Task will simply take the Vacation Request and perform all it's needed to register the vacation days. To accomplish this the task will only have the Vacation Request as Visible.

Set the Make Administrative Task Task parameters

Set the Make Administrative Task Task 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 Available Vacation Days" Task will automatically evaluate the availability of the vacation days requested. According to this definition, this Service Task will evaluate the Vacation Request Parameter (wich will be set as Visible in the Activity Parameters Property). Moreover, the Service Task will provide the result of his execution in a new Process Parameter ("Availability", wich will be added to the Process Parameters and set as Visible, Editable and Required in the Activity Parameters Property, with "Available" and "Unavailable" as fixed Case Values).

The Verify Available Vacation Days Service Task Parameters

The Verify Available Vacation Days Service Task Parameters

The "Verify Days Availability" Gateway will automatically evaluate the result of the "Verify Available Vacation Days" Service Task execution . If the days availability is confirmed will activate the "Approve Vacation Days" Task, else it will return to the "Register Vacation Request" Task.

The Verify Days Availability Gateway

The Verify Days Availability Gateway

Let's configure this Gateway:

  1. Click on the "Verify Available Vacation Days" 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 Availability Process Parameter).

Configure the Verify Available Vacation Days Gateway

Configure the Verify Available Vacation Days Gateway

Now we need to define the Flow Connector to be followed for each value defined for the Availability Process Parameter:

  1. Click on the "Verify Available Vacation Days" Gateway.
  2. In the Properties Panel, in the Condition Value Property, press the "Browse" button.
  3. Select the Availability Process Parameter in the Parameter field.
  4. Select the Available case value for the Flow Connector that leads to the "Approve Vacation Days" Task.
  5. Select the Unavailable case value for the Flow Connector that leads to the "Register Vacation Request" Task.

The "Verify Approvation" Gateway will automatically evaluate the Approvation parameter, defining which path should be followed basing on the parameter's value.

  1. Click on the "Verify Approvation" Gateway element.
  2. In the Properties panel, in the Condition type Property, select "Literal" (since the evaluation is based on the parameter's value).

Once the Gateway has been configured, we should associate to each outgoing flow connector the right parameter's value:

  1. Click on the "Verify Approvation" Gateway.
  2. In the Properties Panel, in the Condition Value Property, press the "Browse" button.
  3. Select the Approvation Process Parameter in the Parameter field.
  4. Select the Not Approved case value for the Flow Connector that leads to the "Inform Reject Reason" Task.
  5. Select the Approved case value for the Flow Connector that leads to the "Make Administrative Task" Task.

Configure the Verify Approvation Gateway

Configure the Verify Approvation 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 Supervisor Role might act as Supervisor in a Vacation Request Process instance, but he might start a Vacation Request Process himself, or he might act as Employee in a Expense Report 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: Employee, Supervisor and Human Resource Assistant:

  • Employee Role: is related to the Employee Lane in the Vacation Request Process Model.
  • Supervisor Role: is related to the Superisor ane Employee Lane (since a Supervisor user might ask for vacations himself).
  • Human Resource Assistant: is related to the Human Resource Assistant Lane in the Vacation Request Process Model (we assume that a Human Resource Assistant user will use a different Process for his Vacation Requests).

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

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

Create the BPM Project Roles

Now we can associate the newly created Roles to the Vacation Request Process Model Lanes:

  1. In the Process Model click on the Employee Lane.
  2. In the Properties panel, click on the Roles Property Select Roles button.
  3. Choose the Employee and the Supervisor Roles.

Define the Roles that can act as Employee in the Vacation Request Process Model

Define the Roles that can act as Employee in the Vacation Request Process Model

It's possible to repeat this steps to associate the Supervisor Role to the Supervisor Lane and the Human Resource Assistant Role to the Human Resource Assistant 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