In-Process Consumer Activity Overview

Context

Use the In-Process Consumer Activity to consume a Web service listener from another workflow, which enables you to pass complex objects between workflows. This activity also promotes encapsulation and modularity, which enables multiple workflows to consume the same Web service. The child workflow is executed in-process, not through HTTP protocol. 

The In-Process Consumer works like a standard Web Service Consumer, except that it consumes a Web Service Listener from another workflow. The Web Service Listener is a standard Web Service Listener, except that its Access Mode property must be set to In-Process so that it can be consumed by an In-Process Consumer.

We'll walk you through an example to help understand how to set up and execute the In-Process Consumer.

Steps

  1. Create a Web Service Listener in workflow A.
  2. Create an In-Process Consumer in workflow B.
  3. Connect the In-Process Consumer in workflow B to the Web Service Listener in workflow A.
  4. Define data field bindings.

Example

In this example of a Mortgage Claim workflow, the In-Process Consumer of the main workflow consumes a Web Service Listener in a second workflow, which calculates the Credit Score. This score is returned to the main workflow.

1. Add an In-Process Consumer activity to the main workflow.

InProcessConsume345.png

2. Double-click the In-Process Consumer to define its properties. Provide an activity Name, Alias and Description. Click Next

InProcessCons3737.png

3. Click New. The In-Process Consumer Details screen appears.

ProcCons67676a.png

4. Enter a Name for the In-Process Consumer, and select a Web Service Listener from the list of available Listeners. You can create or edit a Listener from Administration > Global Settings > Web Service Listener table. Click OK.

InProcessConsumer29292.png

5. If the Web Service Listener is at the start of the second workflow:

In the Headers > ActivityMetadata > WorkflowSpaceName field, enter the Workflow Space name of the second workflow.

If the Web Service Listener is in the middle of the second workflow:

In the Headers > ActivityMetadata > , enter a unique identifier of the listener, for example enter its ActivityInstanceId.

CreditScore7777.png

Ensure that in the second workflow, the Web Service Listener has its Access Mode property set to In-Process. (The Remote Server and Local Server options may also be checked if needed).

CreditScore WebserviceAA.png

6. In the In-Process Consumer Request Bindings screen, in the Body section, define input values for the data fields. You can enter values manually, select workflow fields from the tree, or define values as the result of an expression.

ProcConsm888444a.png

7. Click Finish

The In-Process Consumer is defined, and will call the Web Service Listener when it is reached in the flow.