Using Conversations

Conversations are used for stateful business processes, which means that for completion, processes require correlation of message exchanges. Such processes can be reentrant and so the previous process context is maintained for continuity.

Conversations are always initiated by one activity and joined by other activities. All operations that are part of the stateful process must generate a conversation ID and reply to the original client that contains the conversation ID.

For example, an operation Submit Purchase Order in a stateful process gets the Purchase Order ID in response. If the client wishes to cancel the purchase order, the client must use this correlation ID (Purchase Order ID) to invoke the Cancel Purchase Order operation.

Building a Conversation

Procedure

  1. Right-click the activity that needs to initiate the conversation and select Conversation > Create New Conversation.
    The Conversations tab in the Properties view displays the conversation name and action 'Initiate'.
  2. Right-click the activity that needs to join the conversation and select Conversation > Join Conversation > Conversation_Name.
    The Conversations tab in the Properties view displays the conversation name and action 'Join'.

    The Conversations tab of any activity that participates in conversations lists all the conversations it is participating in.



  3. Click on the conversation name to specify the key data.

    The initiating key is returned as a part of the response, and the client must provide the same key when calling a related operation the next time. This ensures that the first and second operations are called by the same client and the two operations are part of the same conversation.