Creating a Scripted Transition Processor
A transition processor is used in the dataflow engine to manipulate the process entity or objects belonging to it when it reaches a configured node or edge. You can attach such a processor to the following components:
- node:
onEntered
list propertyonLeft
list property
- edge:
onTransit
list property
For more information about dataflow engine, see Dataflow Engine.
Creating a Scripted Transition Processor in Control Center
-
In Control Center, navigate to Transition Processors entry point.
-
On the Action Bar, click New and select ScriptedTransitionProcessor. A new modal window opens.
-
In the modal window, provide an externalId, name, and click the Assign link next to the script label. A new modal window opens.
-
Select the script type which you want to code in and click Finish. The script properties window opens.
-
In the script properties window, there is only one property:
source
. Paste or write your custom script there, for example:if($.getProcess().getProcessEntity().getProcessStepNumber()=="3"){ $.getProcess().getProcessEntity().setProcessStepNumber("4"); $.continueWithState("nextStep"); } else { $.continueWithState("error"); }
For more information on the available functionality and syntax of a script, see Scripting.
-
Apply your changes. You can now assign your new scripted transition processor to a node or an edge in the process designer.
For more information on the process designer and the different components of a process, see Process Definition Components.