Export (0) Print
Expand All

Communicating with Other Workflows

Workflows can communicate with each other if the instances of the workflows are exposed as Web services. When one workflow has to communicate with the other workflow, it makes a Web service call to the other workflow.

Follow these steps to communicate between workflow instances:

  • Publish both workflows as Web services.

  • Make sure that a WebServiceInputActivity activity is included appropriately in the workflow. For more information, see Using the WebServiceInputActivity Activity.

  • If the interface methods have return values, make sure that you use the appropriate WebServiceOutputActivity activity.

  • After the workflows are published, they are ready to communicate. In the calling workflow, use the InvokeWebServiceActivity activity to call the target workflow by using the target workflow’s proxy, which is generated from the Web Services Description Language (WSDL). For more information about WSDL, see the MSDN library.

When one instance of the workflow wants to communicate with another instance, it uses the proxy for the other instance. It makes the Web service call over the proxy by using the InvokeWebServiceActivity activity. On the receiving workflow side, a WebServiceInputActivity activity receives the call. At this point, the workflow can perform an action and then use the WebServiceOutputActivity activity to send return values back to the calling workflow. The WebServiceOutputActivity activity uses the same session that has been established by the WebServiceInputActivity activity.

For more information, see Deploying a Workflow as a Web Service and Invoking Web Services from a Workflow.

See Also

Community Additions

ADD
Show:
© 2015 Microsoft