Extending the Equipment Purchase Request Process: Adding BPMN Events

Note

This article continues working with the business process created in the Equipment Purchase Request. Including DMN in the Process section.

In this section, we will extend the business process by adding two types of BPMN events:

  1. Signal — launches an event subprocess that sends a notification to the approver when the request receives the “Under Approval” status.

  2. Timer — if the approver does not make a decision on the request within the specified time, it will automatically move to the “Rejected” status.

The final process diagram:

../_images/018.png

Signal

Between the Status “Under Approval” and User Task “Under Approval by Approver” components, add an intermediate “Signal” event:

../_images/event_01.png

Select the event type Signal Intermediate Throw Event:

../_images/event_02.png

Specify the event properties:

  • NameSend notification

  • Signal namesendEmail

  • Event filter by documentCurrent document

../_images/event_03.png

Add a “Signal” event subprocess — a subprocess triggered by an event. To do this, first create a standard subprocess, then change its type to Event Sub Process:

../_images/event_04.png

Inside the subprocess, replace Start Event with Signal Start Event (non-interrupting):

../_images/event_05.png

Specify the start event properties:

  • Manual configuration — enable (checkbox)

  • Signal namesendEmail

  • Event filter by documentCurrent document

../_images/event_06.png

Add a Notification component to the start event:

../_images/event_07.png

Specify the notification properties:

  • NameNotification to approver

  • TitleApprove the request

  • Message bodyPlease approve the equipment purchase request

  • ToApprover

../_images/event_08.png

Add an End Event (1) component and publish the business process (2):

../_images/event_09.png

Testing the Signal

Create a request so that the process follows the branch with employee approval. Specify equipment not listed in the DMN table, or use the following data:

  • Equipment nameLaptop

  • Cost65000

  • Initiator — current user

  • Approver — any user with an email address specified in their profile

If Citeck is installed using the cross-platform launcher, go to Mailhog to view test emails:

../_images/mailhog_01.png

Mailhog — a tool for testing email, allowing you to view emails without actually sending them to mail servers:

../_images/mailhog_02.png

Open the email and verify that the notification was delivered:

../_images/mailhog_03.png

You can also check the notification in the administrator workspace: in the Notification Configuration section, open Notifications.

Note

If the process was created in a local workspace, navigate directly to the Notifications section of the current workspace.

Select the required notification from the list:

../_images/notification_01.png

The notification form will open. It displays all the settings configured in the Send Task component:

../_images/notification_02.png

Timer

Add a boundary “Timer” event to the User Task “Under Approval by Approver” component:

../_images/timer_01.png

Drag the event onto the User Task “Under Approval by Approver” component:

../_images/timer_02.png

Select the event type Timer Boundary Event:

../_images/timer_03.png

Specify the event properties:

  • TypeDuration

  • ValuePT1M in ISO 8601 format (PT1M — 1 minute; see time formats for more details)

../_images/timer_04.png

Route the flow from the timer to Gateway (1) and publish the business process (2):

../_images/timer_05.png

Testing the Timer

Create a request so that the process follows the branch with employee approval. Specify equipment not listed in the DMN table, or use the following data:

  • Equipment nameLaptop

  • Cost65000

  • Initiator — current user

  • Approver — any user with an email address specified in their profile

When the process reaches the approval step, do not make a decision on the task — after 1 minute, the request will automatically move to the “Rejected” status.

The Final Process Diagram

../_images/027.png