BPM Tutorial: The process of applying for leave (Part 2 – Implement the process)

Tram Ho

Part II: Implement the process

Lesson purpose:

  • Create a Business object to store process-specific data
  • Add Teams by adding Lane and assigning team to Process
  • Implement timer intermediate events
  • Implement gateways

1. Create the Business Object

Business Object represents the business data related to the current process

  • absenceRequest
  1. In the Library, click the plus icon next to Data and choose Business Object
  2. Enter AbsenceRequest then click Finish
  3. In the Parameters section, click on the plus sign to create parameters
  4. Enter fullName and keep the variable type of the variable as String . To change, click Select under Variable Type and choose the data type from the list.
  5. Continue to create the following parameters:
  • department (String)
  • empNumb (String)
  • absenceType (String)
  • reasonAbsence (String)
  • startDate (Date)
  • endDate (Date)
  1. Save
  2. Reopen Process Absence Management , tab Variables
  3. Change the Variable type of the private absenceRequest variable to AbsenceRequest by clicking the Select button / selecting AbsenceRequest . Your private variable will look like this:
  4. Save
  5. Go back to Process Absence Management , tab Definition to open Process Diagram.

2. Implement timer intermediate events

The Approval Overdue Timer that you attached to the Leave approval activity in the previous lesson will be installed in this section, you will set the following properties:

  • Trigger on – Specifies the time when the timer intermediate event is fired
  • Before or After difference – Specify the amount of time before or after the specified time above to run the event. **** How to proceed
  1. Click the timer intermediate event that is attached to Approve leave
  2. Open Implementation item
  3. In the Event Properties section
  • Trigger on – Before due date. Event will run before the task expires.
  • Before or after difference – 1 Hour. Event will run 1 hour before the task expires.
  1. Save

3. Implement gateways

Will we use the process variables to set up the two Approval Transfer gateways ? and Approved? These variables control which direction the business flows in. How to proceed

  1. Reopen Process Absence Management , tab Definition
  2. Switch gateway settings approved? :
  • Click Switch to approve gateway
  • In the Properties tab select Implementation
  • In the Decisions section, we see the flow order as follows: Need approval and default flow Cancel application .
  • Click on the icon Variable Picker
  • Select absenceRequest / reasonAbsence
  • Change the comparison operation from None to! =
  • In the last box, fill “cancel” (this logic means that if the reason is “cancel” then cancel the submission to the manager)
  1. Save
  2. Approval Gateway Settings ? :
  • Click Switch to approve gateway
  • In the Properties tab select Implementation
  • In the Decisions section, we see the following thread order: Agree ; Reject and default flow Require correction .
  • For Stream Agree Click Variable Picker
  • Select managerDecision
  • Change the comparison from None to ==
  • Enter the comparison result as “accept”.
  • Likewise for the Deny thread is == “reject”
  1. Save

4. Summary

Looking at the diagram, we can see that we have installed the process overview as well as the main usage flow of the process:

  • User creates an application for leave
  • If the leave has a reason other than “cancel”, it will be transferred to the manager.
  • Manage receive tasks.
  • Management makes one of three decisions: Agree -> Update HR information -> End; Reject -> Send mail notification -> End; Request to edit -> return Create leave
Share the news now

Source : Viblo