In-Process Consumer Activity Overview

8.3 and earlier

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.

Important Notes

  • If the source process was deleted or aborted, the output activity fails to execute.
  • If the output returns the result to the parent workflow while it is in executing state, redirect is not executed.
  • If there are two outputs in the function process, the output that is executed second will fail.
  • The user that executes the output activity is the user that is defined in the Update By property for the In-Process Consumer Activity.

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.

8.4 and later

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.

Define the In-Process Consumer Activity as Blocking

You can define the In-Process Consumer Activity as a blocking activity. This means that the activity will wait for a response from the target workflow. If the response is received in the same execution, the behavior is not-blocking. If not, the activity status is set to Pending, and will wait until the target workflow returns an output by executing a web service activity or fault activities. To define the activity as blocking, select the Blocking check box in the Properties panel.

Important Notes

  • If you define the activity as Blocking and One Way, the activity fails to execute with the exception Invalid operation.
  • If the source process was deleted or aborted, the output activity fails to execute.
  • If the output returns the result to the parent workflow while it is in executing state, redirect is not executed.
  • If there are two outputs in the function process, the output that is executed second will fail.
  • The user that executes the output activity is the user that is defined in the Update By property for the In-Process Consumer Activity.

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. (If you select the Blocking feature, you should also use a Web Service Listener input and output)
  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

About this Article
  • Created: 04/19/2017 8:15 am EDT
  • Last updated: 11/06/2017 2:29 am EST
In This Article