hub.eb?material_id=600&track_id=602

Workflow Sub-Processes


A Workflow Sub-Process node links to another process defined in your workspace. When a process reaches a sub-process node, the linked process is started. Once the sub-process completes the parent process resumes.

Using sub-process nodes allows for a modular workflow design where processes can be reused.

Starting a sub-process creates a new job for the linked process. Mappings between process attributes and Input and Output Parameters of the linked process can be configured by opening the configuration dialog of the sub-process node. Process attribute values are passed in when the sub-process starts and process output parameters are passed back when the sub-process completes. 

A sub-process node can have configured escalators to fire after a specified time frame.

Steps


1

Create a workflow process called sumProcess.

Add integer process attributes: n1, n2 and result.

Set n1 and n2 as input parameters and result as an output parameter. 

2

Create a System Activity called additionActivity and add the following code: 

fields.result.value = fields.n1.value + fields.n2.value;

Add a System Task Node and link it to additionActivity (make sure the task node is linked to the Start and End nodes). 

3

Create a new process called myParentProcess.

Add integer process attributes: n1, n2 and result.

Set n1 and n2 as input parameters. 

4

Add a Sub-Process Node to myParentProcess and link it to sumProcess.

Map the input and output parameters of the sub-process node using the auto-map button.

5

Run the Test Harness and step through myParentProcess, inputing values for n1 and n2.  

Current Module

Related