Overview of Inter-Process Communication
ActiveMatrix BusinessWorks allows two executing process instances to communicate. You may need process instances to communicate if you wish to synchronize process execution or if your processes must execute in a specific order.
ActiveMatrix BusinessWorks provides the Wait and Notify activities and the Receive Notification process starter to handle inter-process communication. These activities are similar to semaphores in programming. A process containing a Wait activity waits for another process to execute a corresponding Notify activity. Alternatively, the Receive Notification process starter creates a new process instance when another process executes the corresponding Notify activity.
The data sent between the activities is defined by a Notify Configuration shared configuration resource. The Notify activity only sends information to the Receive Notification process starter or Wait activity that specifies the same Notify Configuration resource. The schema supplied to the Notify Configuration resource can be empty, if you do not wish data to be sent between processes. However, the Notify Configuration resources must be the same for the Notify, Receive Notification, or Wait activities if they are to be used to communicate with each other.
A string-based key is used to coordinate between Wait/Notify/Receive Notification activities to determine when a Notify activity corresponds to a Wait or Receive Notification. The key is supplied to the Notify activity, and any Wait activity that matches that key is executed when the Notify occurs.
When a Notify activity executes its information is stored until a matching Receive Notification or Wait activity accepts the information. The Notify activity executes immediately and transitions to the next activity. The Notify activity cannot be used to determine when a corresponding Receive Notification or Wait has received the information.
In general, using inter-process communication consists of these steps:
Procedure
-
Define the data that must be passed between the processes by creating a Notify Configuration shared configuration resource.
-
Determine the key that correlates processes with Notify activities with the corresponding processes with Receive Notification process starters or Wait activities.
-
Create process definitions that use the Receive Notification, Wait, and Notify activities. These activities are located in the General Activities palette. See
for more information about the configuration requirements for each of these activities. -
If your process engines are on different machines, a database must be used to store process instance information. Wait/Notify information is stored in a database so that process engines on different machines can share information.
The following sections describe these steps in more details. See Examples of Inter-Process Communication for more specific examples of when inter-process communication is useful.