The convedo Tech Talk Blog

Part 2: Inter-process communication and unrelated processes (OT PS)

Written by Sascha Cutura | 17 June 2015

With the Send Message event, there are two more options to define to which process the message of the Send Message event should be sent, either a specific process that you next select from the available list of processes (defined in the workspace) or any process.

Send Message to a Specific process

When you select a specific process, you next select which process available in the collaborative workspace and which message should be sent. You can identify the specific process instance(s) in two ways:

  1. By its unique process instance id or Process IDentification string (PID) referring to one single instance. In this case through the Process Instance field you select the XML element included in the message map that contains the value of the PID, typically its value will be defined by one of the elements contained in the input message of the process. In the workspace you can explore this way of communication between two unrelated processes in the two processes FinishMe and CompleteFinishMeByPID.
  1. Using the Business Identifier document to refer to the process instance(s) identified by the value of the Business Identifier. This requires that both processes, the sender and receiver process include the same Business Identifier and in the message map of these processes the value of the Business Identifier is assigned before the Send and Receive Message event are used in the flow. The Business Identifier can be any kind of  value of data type string or integer for example, a customer number, or an order number to identify the specific process instance(s) that apply to the given customer or order. This is illustrated by the two processes FinishMe and CompleteFinishMe included in the workspace.

In the example the Business Identifier used here simulates the PID of a process by means of defining a private process instance id number called theProcessIDNumber, and which is associated to both processes in the Business Identifiers tab page of the (Business Process) Model properties. Using the input messages of both sender and receiver processes, you assign the identifier its value.

Send Message to Any process

You can send a message to any process instance uniquely identified by means of the process instance id (PID). But how do you refer to the message to be received if you are not relating to a specific sender process? And thus cannot select the receive message or output message as there is no related process.

  1. Defining an identical message with both sender and receiver process as process specific message by copying the XML message (Show XML) form one process and pasting the XML as Message in the other. However, this does not work, the receiver process instance receives the message as you can clearly see in the message map contents when opening the process instance in the Process Instance Manager artifact and checking the message map contents. However, the process instance keeps waiting at the Receive Message event as it seems not to have received the message yet. How can you work around here?
  1. Using the same web service operation in both sender and receiver process and thus you have exactly the same message passed between the sender and receiver processes.

As an example we have used GetBasicUserDetails from the LDAP 1.0 method set included in the workspace by creating a runtime reference to the given interface. Using the consolidated view of the message map, you can copy the input message from the GetBasicUserDetails web service operation to create another assignment downstream to assign the right input for the message that will be sent through the Send Message event. Here, the input message of the web service operation is used as the message to be sent and received. While in the message map you are able to pass any message contents by using the “Replace XML as string” operation to use your own specific XML message here. In the receiver process with the Receive Message event you can next use the “Replace with Children” operation to store the XML string into the appropriate message structure and use this in the receiver process. This is illustrated by two more processes in the workspace: AnyProcessFinishMe and CompleteAnyProcessbyPID. You can use the consolidated view on the message map of both processes to overlook the appropriate assignments.

Download a copy of a workspace to illustrate these scenarios

 

The OpenText Process Suite (OpenText Cordys) Boot Camp Tour starts September 2015. Register your interest today for a chance to qualify for our Early Bird price plan.

Coming up in this blog series:

  • Part 3: Business scenario: Inter-process communication
  • Part 4: Inter-process communication workspace

Previous post from this blog series: