How to use the Signal Event

by Ombretta Malinverno
14,485 views Published on Dec 20, 2017
Applies to: 7.2 or higher
Table of contents

Introduction

Modeling a business process may require some kind of communication with other related business processes. The reason for this may be to wake up a process that was waiting for a particular situation to verify or to start a new process. The BPMN notation provides two different concepts for this purpose: the Message and the Signal. Both of them are events; the main difference is that a Message is triggered to a single target while a Signal is broadcast to multiple targets. In other words, the Message is a point-to-point communication while the Signal is a broadcast communication. This article explains how to use a Signal Event in your BPMN Project using WebRatio Platform.

The Signal Event

Signals are commonly used for general communication within and across Process Levels, across Pools and between Business Process Diagrams. A Signal is composed of a name and a set of parameters. These parameters are sent when the signal is thrown; otherwise, they are received when the signal is caught. As the Signal is broadcast, different processes can have catching events listening for the same signal. Of course, there’s also the chance of a process throwing a signal.

The image shows a sample BPMN process modeled in WebRatio, in which some signal events are used. In particular, an Intermediate Throwing Signal Event fires up a signal that is caught by the two Start Signal Events. As you can see, there are different types of Signal event. They can be catching or throwing and they can be placed at the start, at the end or in the middle of a process. The next section shows each event type.

Types of Signal Event

According to what was explained in the previous section, these are the available Signal Event types.

  1. Intermediate Throwing Signal Event.
  2. End Signal Event.
  3. Start Signal Event.
  4. Intermediate Catching Event.

All event types must be associated with a Signal defined in the BPMN Project to work properly.

Intermediate Throwing Signal Event

The Intermediate Throwing Signal event fires up a signal and continues the process execution. A thrown signal can be caught by different catching signal events. Signalling can happen across different processes.

End Signal Event

The End Signal event is a throwing event that fires up a signal at the end of a process.

Start Signal Event

The Start Signal event is a catching event that catches a broadcast signal coming from another process, and triggers the start of the process in which it is modeled.

Intermediate Catching Signal Event

The Intermediate Catching Signal Event is an event that waits for the associated Signal to be thrown.

If used within the main flow, it causes the process to stop and wait for the specified Signal to be triggered.

If placed on an activity boundary, it is used for exception handling, changing the Normal Flow into an Exception Flow.

Examples

Example 1: Use an End Signal event to throw a broadcast signal

In the following example, a Signal is sent from an "Invoice Payment" process to create a payment process and a sending tax process as soon as an invoice is received and approved.

When the "Invoice Payment" process reaches the "Process Payment" end signal event, the "InvoiceInfo" signal is thrown, and the process ends.

There are two events that are waiting to receive a signal and are available in the "Process Payment" process, as a Start Signal. For this reason, a new process payment will be created.

How to define a Signal

Before you can use a throwing or catching signal event you need to define a Signal to associate with the event. The Signal is composed of a name and a set of parameters.

Let's see the procedure:

  1. Right-click on the Signals folder, in the BPMN Explorer View.
  2. Select the New > Signal option.
  3. Select the target BPMN Project and choose a name for the Signal (by default, the name is "Default", in this case set to "InvoiceInfo"), in the opening dialog.
  4. Press the Finish button.

When the procedure is completed, the configuration of the Signal parameters is opened.
If you want to pass information from the throwing signal event to the catching signal event, it is necessary to define them in this configuration dialog.

You can define the parameters by pressing on the Add button and then insert the name and choose the type of parameter. When the parameters are defined, save the configuration.

You can change the Signal parameters any time you want by double-clicking on the signal item created in the Signals folder.

In this example, the “InvoiceInfo” signal is composed of the following parameters:

  • "Invoice Number".
  • "Company".
  • "Invoice File".

These pieces of information are passed from the “Invoice Payment” pool, throwing the signal, to the “Process Payment” pool, catching the signal.

How to configure a Signal Event

You need to do two things to configure a signal event:

  1. Associate the signal to be caught or thrown. For this reason, it is necessary to define a signal (as described in the previous section).
  2. Perform the coupling between the signal parameters and the process parameters. The processes must have parameters set that represent the information managed.

 

"Process Payment" end signal event

The "Process Payment" end signal event can be configured as follows:

You can set the Signal configuration in this way:

  1. Press on the Select Signal button next to the Signal property.
  2. Select the "InvoiceInfo" signal.
  3. Press the OK button to confirm.
  4. Press on the Select button next to the Input Coupling property.
  5. Match the parameters of the "Invoice Payment" pool that you want to send with the Signal.
  6. Then press to the OK button.

 

 

"Payment" start signal event

The "Payment" start signal event can be configured as follows:

You can set the Signal configuration in this way:

  1. Press on the Select Signal button next to the Signal property.
  2. Select the "InvoiceInfo" signal.
  3. Press the OK button to confirm.
  4. Press on the Select button next to the Input Coupling property.
  5. Match the parameters of the Signal that you want to send to the  "Process Payment" pool.
  6. Then press the OK button.

 

"Send tax" start signal event

The "Send tax" start signal event can be configured as follows:

You can set the Signal configuration in this way:

  1. Press on the Select Signal button next to the Signal property.
  2. Select the "InvoiceInfo" signal.
  3. Press the OK button to confirm.
  4. Press on the Select button next to the Input Coupling property.
  5. Match the parameters of the Signal that you want to send to the "Process Payment" pool.
  6. Then press the OK button.

 

Publish and test the process

Once the business process is defined, along with the association of all signals and parameters, to the several signal events inside it, you can proceed in testing the business process behavior. This is what you have to do:

  1. Press on the Publish Process button placed in the toolbar.

At the end of the publishing process, a browser window is opened. You can see the list of the demo users in the home page.For each role specified in the process, the generated Web application proposes two demo users.

  1. Press on the select link beside the "John Doe" secretary user.
  2. Press on the Login button to access the Web application.
    Once logged in, you are in the "Control View" area which contains all the activities related to the "Secretary" role.
  3. You can start a new "Invoice Payment" process by pressing on the Start Invoice Payment link on the left side area of the desktop.

Once pressed, the process starts and the user is redirected to a page named “Receive Invoice” in which he has to specify the information about the invoice.

  1. Insert the invoice information.

  1. Press on the Finish button to complete the activity.

Now the activity is complete and the process continues its flow to the "Requester" user until it reaches the "Process Payment" end signal. When the "Process Payment" end signal is activated, it throws the "InvoiceInfo" signal. This signal is received both from the "Payment" start signal event and the "Send tax" start signal event.

  1. Log out from the application.
  2. Press on the select link beside the "Douglas Martin" account payable assistant user.
  3. Press on the Login button to access the Web application.

The "Payment" start signal event has received the signal from the "Process Payment" end signal event and it is automatically activated. The "General Check" and the "Bank Transfer" tasks are waiting to be done.

Instead, to take charge the send tax process activated by the signal:

  1. Press on the select link beside the "James Robson" administrative department operator user.
  2. Press on the Login button to access the Web application.

The "Send tax" start signal event has received the signal from the "Process Payment" end signal event and it is automatically activated. The "Check Documentation" task is waiting to be done.

Example 2: Use an Intermediate Throwing Signal Event to interrupt the process

In the following example, a Signal is sent from an "Invoice Payment" process to cancel the "Bank Transfer" task when the check of the general company information is not approved.

When the process reaches the "Interruption payment options" intermediate throwing signal event shape, the "InvoiceInfo" signal is thrown to look for a Catch Signal event.

This event is available in the process, as an Intermediate Catching Signal event on a Task. For this reason, this Task is canceled.

Signal Events Configuration

As in the previous example, the "InvoiceInfo" signal is composed with the following parameters:

  • "Invoice Number".
  • "Company".

These pieces of information are passed from the "Interruption payment options" intermediate throwing signal event to the "Cancelled" catching signal event.

 

"Interruption payment options" intermediate throwing signal event

The configuration of the "Interruption payment options" intermediate throwing signal event is as follows:

 

"Cancelled" intermediate catching signal event

The configuration of the “Cancelled” intermediate catching signal event is as follows:

Publish and test the process

Once the business process is defined, along with the association of all signals and parameters, to the several signal events inside it, you can proceed to test the business process behavior. This is what you have to do:

  1. Press on the Publish Process button placed in the toolbar.
  2. At the end of the publishing process, a browser window is opened.

For each role specified in the process, the generated Web application proposes two demo users. Access to the Web application:

  1. Login with "John Doe" secretary user.
  2. Press on the Start Invoice Payment link to start the "Invoice Payment" process.

Once pressed, the process starts, and the user is redirected to a page named “Receive Invoice” in which he has to specify the information about the invoice.

  1. Insert the invoice information.
  2. Press on the Finish button to complete the activity.

Now the activity is complete and the process continues its flow to the "Requester" user until the "Account Payable Assistant" and the "Commercial" users are involved in checking and defining the payment options.
If the "General Check" task returns a negative outcome, the "Interruption payment options" intermediate throwing signal event is activated and throw a signal to the broadcast. When the "Cancelled" intermediate catching signal event receives the signal from the "Interruption payment options" intermediate throwing signal event, it is automatically activated. The "Bank Transfer" task is cancelled, and the flow back to the "Check Company" task.

How to use the sample project

You can use the "InvoicingProcess.zip" sample project attached to this article to test the proposed processes using the signal event.

Follow these steps to use the project:

  1. Import the sample project into the WebRatio Platform. You can learn how to do this by watching the "Organize the Workspace" online lesson.
  2. Open the first example: move to the WebRatio Explorer View, expand the project node and then the "Processes" folder. Double-click on the "Invoice Payment.bpm" item.
  3. Press the Yes to open the BPMN perspective.
  4. Publish the process by pressing the Publish Process button placed in the toolbar.
  5. Visit http://localhost:8080/InvoicingProcess/page1.do or http://freeXXXXX-freeapp.eu.webratio.net/page1.do, with any browser and follow the procedure.
  6. Repeat the steps 2-5 for the "Invoice Payment_v2" process.
 
 

Attachments