Use Send and Receive

Send and receive activities are usually designed as pairs to communicate between two asynchronous processes.

The following steps outline a possible scenario for using send and receive activities to communicate between two asynchronous processes.

  1. Process A starts.
  2. The flow of Process A reaches the send activity.
  3. The send activity starts Process B.

    The send activity implementation specifies which process is started.

  4. The flow of Process A continues to the next activity.
  5. Process B runs.
  6. Depending on the specific behavior of both processes, the following scenarios may occur:
    1. If the flow of Process A reaches a receive activity paired with a send activity from Process B, the flow of Process A waits until a response is received.

      After the response is received, the flow of Process A continues to the next activity.

    2. If the flow of Process B reaches a send activity paired with a receive activity in Process A, Process B sends a response to Process A.

      The flow of Process B continues to the next activity.

  7. Both business processes continue running.

You can use subsequent send and receive pairs to define subsequent communication between the two processes.

Send and receive activities can be also used to set up correlation and communicate between asynchronous processes. See Example of Using Correlation with Send and Receive.