Best practices and details about all nodes configuration (tasks, gateways, events).
Best practices / Tips
All the included nodes of workflow and process must have a name (better to have a significant name) - the name helps to understand the process when checking the process design and while executing the process version - on the logs.
TASKS
To be used whenever an action is to be done by a user. When the process instance execution arrives at the User task node, a new task is created in the task list of the group(s) and/or user(s) assigned to that task. When assigned to a group, the task can be executed.
NAME - user task name shown on the process version diagram.
TASK NAME - user task name shown in the Tasks view associated to an execution of the process version (instance).
FORM - a user task is composed of a form based Read Only fields and editable ones. The following actions are possible for the form:
Generate form: creates a form with the default fields. Inputs will be added as Read Only fields and Outputs as editable fields.
Edit form: the form can be adjusted.
[X]: delete form.
ASSIGNMENTS GROUPS - assign to group(s) and/or user(s) the User Task. When the process instance is running and arrives to the task, the task will appear on the tasks of these persons.
INPUTS - input data received by the node (Optional)
OUTPUTS - output data sent out from the node (Optional)
On Entry - initializes input variables before node execution (Optional).
On Exit - script called after the node execution (Optional).
Automated activity executed when the process execution arrives to the task. The script is
NAME - node name shown on the process version diagram.
SCRIPT - script section.
Supported languages: JavaScript (js) and TypeScript (ts) - automatically detected
Apply JavaScript / TypeScript rules
Tips:
to persist a variable: this.variables.variableName.setValue(variableValue)
to update the properties of object: this.variables.seller.value().vatNumber = "NR"
to get the variable value use: this.variables.variableName.value()
to create a new variable use “let”: let newVariable = "string value";
to save logs inside the invocation logs: this.logStacktrace("my message").
An action can be added only if the related service is added. On the process version diagram, an Action node is identified by the service logo on the top left of the node.
To add an action, you have to click the icon in your properties panel - the available services are shown in the configuration panel, you can search by module or by action on the search
The functionality of the parallel gateway is based on the incoming and outgoing sequence flow(s):
fork: all outgoing sequence flows are followed in parallel, creating one concurrent execution for each sequence flow.
join: all concurrent executions arriving at the parallel gateway wait at the gateway until an execution has arrived for each of the incoming sequence flows. Then the process continues past the joining gateway.
NAME - name of the node shown on the diagram.
Allows to make a decision based on data. Needs to have at least two segments that you can configure.Segments allows to apply conditions on the route. in the gateway cases, it allows to execute an extra action or to double check if the route taken is the good one.
NAME - name of the node shown on the diagram.
DEFAULT ROUTE - indicates the default path that will be taken if all conditions fail.
FLOWS
The sequence flow is used to connect flow nodes in a process version. Conditions can be set when used with exclusive gateways.
NAME - flow identification (Id, Name, Documentation)
CONDITION SCRIPT - a script can be defined in case of use with gateways. The script should be javascript or typescript. All JS/TS rules and syntax can be used. For data comparison you can use: this.variables.iteration.value() < this.variables.size.value().
EVENTS
The first node of the process version, is a start event. Only one Start event for each process version can be set. A start event can also be a start catch event (see below how to configure a Catching event).
NAME - name of the node, will be shown on the diagram. A Start event can also be a catching event - the process instance will be started with an event (internal or external).
A process leads to at least one end event. It can be a throw end event.
NAME - name of the end node, shown on the diagram. The end event can also be a throwing event - the final node will send an event either external or internal (see below how to configure a Throwing event).
Event occurring between a start and an end event. The intermediate event can catch or throw event.
NAME - node name will be shown on the diagram. The intermediate event can catch or throw event (see below how to configure a Catching/Throwing event).
The throwing event allows to send an event value.
It can be intermediate or end event. Never a start event.
NAME - name of the throwing event will be shown on the diagram.
SIGNAL - technical Id of the throw event.
INPUTS - the input is the data that will be sent on the throw event. Each input is defined by the following informations:
Name - should be data
Type - type of the data to be sent
Source - process variable source of the data.
EVENT TYPE - select the type of the event the process version will throw - can be External event - the signal will be sent to the operator webhook or Internal event - the signal will be sent to another process within your environment.
External event
SERVICE - select the operator service to which the event will be sent.
Internal event
INTERNAL EVENT TYPE - select either you will start a process instance or you'll trigger a process instance:
Start process instance - you need to define which process version you want to start by completing the following data
PROCESS TARGET - select one of the processes deployed on the environment
PROCESS TARGET VERSION - select either one of the process version or define that you want to use the last deployed version
TARGET DATA - select the process variable in which the sent data will be stored in the started instance
Trigger process instance - you need to identify which instance by its process version and a correlation variable - to do so you need to complete following data
CORRELATION VARIABLE SOURCE - select the variable that will be used as a link between the two processes
PROCESS TARGET - choose a process to launch or continue.
PROCESS TARGET VERSION - select either one of the process version or define that you want to use the last deployed version.
CORRELATION VARIABLE TARGET - choose the variable that will be used to target the correct instance.
TARGET DATA - choose the variable from the target process version that will contain the event data sent.
Catch an event from either another process or from a service event - it can be a partner event or an operator event.
It can be start or intermediate event. Never end event.
A signal can be only used once in a process version.
NAME - name of the catching event. Will be shown on the diagram.
SIGNAL - technical Id of the catch event.
OUTPUTS - the output is to be used if data will be received on the event and will be stored on the instance (optional). For each output added you need to set the following informations:
Name - the name of the Output should be data if the whole content of the signal will be stored and data.attribute if just a part of the signal content will be store.
Type - the type of the data to be saved (File, Object, string...).
Target - the process variable in which the data will be saved.
SOURCE - select the source of the event that will be catched - the source can be Another process or a Service event.
Another process
CORRELATION VARIABLE - select the correlation variable between process version and the service event sent
Service event
SERVICE - select the service that will send the event partner or operator - only the activate services on the operator environment are available.
EVENT - select the event associated to the selected service.
CORRELATION VARIABLE - select theprocess variable that will make the correlation with the service event.
CORRELATION OPERATOR - select the correlation operator either “=” if the correlation variable should be exactly the value or “in” - to search on a list or on a table.
CORRELATION PATH - define the path of the data to be captured from the event received and that will be checked with the correlation variable. Note: the event received is the body of a JSON file - and the path will indicate which data will be checked.