Workflow
Definition
Workflows are used to implement a validation process requiring one or several step(s) of validation to validate an activity.
Each step is represented by a task, which can require a human intervention (UserTask) or be fully autonomous (ScriptTask).
![](../../__attachments/700842026/Workflow.jpg?inst-v=23d06e63-6973-4052-aaa5-c79093e792e5)
How to configure
You can access the Workflow configuration :
by clicking on "Portal" → “Workflows”
by clicking on "System" → "Configurations" → "Business Model" and perform an import/export.
Global Parameters
Property name | Type | Mandatory | Description |
---|---|---|---|
id |
| YES | The id is the unique identifier of the Workflow. It is case sensitive and no special characters (except - or _) are allowed. |
name |
| YES | The Workflow name. The name may be different from the identifier. |
description |
| NO | Allows to describe the purpose of the Workflow. |
The workflow configuration is then built on two mains children :
<bpmn> : the Activiti workflow, which describes the logic flow and the relations between the steps
<configuration> : the Memority bindings to allow users and Memority to interact during the workflow (GUIs, optional or required comments, links with identities, …)
<ctdbum:Workflow>
<bpmn></bpmn>
<configuration></configuration>
</ctdbum:Workflow>
Process part
The procedure details how to implement the tasks of the process. The procedures are called to solve data (duration of a timer, user who can perform a user task) and to execute actions.
The process describes the logic flow of the Workflow.
Domain | Code |
---|---|
Version and encoding: each Workflow starts by announcing the version and encoding. |
XML
|
Definitions: each Workflow starts by announcing the Definitions. | |
Process |
Properties
For some properties it is possible to configure them either by GUI (GUI column) or in the BPMN (Code column).
If the tags are not configured in the BPMN, they are displayed in the GUI.
Property name | Description | GUI | Code |
---|---|---|---|
id | The id is the unique identifier of each Process. It is case sensitive and no special characters (except - or _) are allowed. |
|
XML
|
name | The Process name. |
Children
Property name | Description | GUI | Code |
---|---|---|---|
startEvent | Used to define the starting point of the Workflow with an id which is usually "start". |
|
XML
|
endEvent | Used to define the ending point of the Workflow with an id, which is usually "end". |
XML
| |
userTask | A user task is used to model work that needs to be done by an actor. Used to define a user task for the Workflow. | ||
scriptTask | The task script allows a user task not to be sent (in this example, if the modified user is a "VIP" the first validation user task will not be sent). It is possible to send a notification with a script task. | ||
boundaryEvent | Allows to define events triggered by events or actions during a task execution. | ||
sequenceFlow | Used to link all configured tasks of the Process. |
startEvent
Used to define the starting point of the Workflow with an id which is usually "start".
Property name | Description | GUI | Code |
---|---|---|---|
id | The id is the unique identifier of each event. It is case sensitive and no special characters (except - or _) are allowed. |
|
XML
|
endEvent
Used to define the ending point of the Workflow with an id, which is usually "end".
Property name | Description | GUI | Code |
---|---|---|---|
id | The id is the unique identifier of each event. It is case sensitive and no special characters (except - or _) are allowed. |
|
XML
|
userTask
A user task is used to model work that needs to be done by an actor.
Used to define a user task for the Workflow.
If the Workflow must include several user tasks, you will duplicate the <userTask> tag.
Property name | Description | GUI | Code |
---|---|---|---|
id | The id is the unique identifier of each User task. It is case sensitive and no special characters (except - or _) are allowed. |
| Case with configuration by GUI:
XML
Case with configuration by BPMN:
XML
|
name | The User task name (optional). |
| |
skipExpression | The skip expression is used to decide whether or not a User Task should be skipped (when evaluated to The skip expression can be set either as an attribute on the User Task in the BPMN template, or as a tag on the User Task configuration in the Workflow. The skip expression is an UEL expression which has access to the Execution Variables. |
| |
dueDate | Each task has a field, indicating the due date of this task. The due date is purely informative. Everything related to expiration should be handled with Timer Boundary Events. |
|
scriptTask
The task script allows a user task not to be sent (in this example, if the modified user is a "VIP" the first validation user task will not be sent).
It is possible to send a notification with a script task.
Property name | Description | GUI | Code |
---|---|---|---|
id | The id is the unique identifier of the Script task. It is case sensitive and no special characters (except - or _) are allowed. |
|
XML
|
name | The Script task name (optional). |
Configuration information about cancellation by requester are detailed in the dedicated page.
boundaryEvent
Allows to define events triggered by events or actions during a task execution.
Refer to the activity documentation (https://www.activiti.org/userguide/ ) to configure all types of events.
A boundary event is defined by:
a unique identifier (id)
a reference to the activity to which the event is attached through the attachedToRef attribute (id of a User task).
Property name | Description | GUI | Code |
---|---|---|---|
id |
| Example with an errorEventDefinition:
XML
Example with a timeout:
XML
| |
attachedToRef | |||
cancelActivity |
sequenceFlow
Used to link all configured tasks of the Process.
A sequence flow is defined by:
a sourceRef (id of the start task)
a targetRef (id of the end task)
Property name | Description | GUI | Code |
---|---|---|---|
sourceRef |
|
XML
| |
targetRef |
Task configurations
Comments
Allows to define the actions for which a comment is mandatory.
Property name | Description | GUI |
---|---|---|
key | Used to put the id of the user task. |
|
value | ||
commentMandatory | Used to declare the actions for which a comment is mandatory or not. | ![]() |
claim | Used to define if the comment is mandatory or not when an actor claims the user task. | |
complete | Used to define if the comment is mandatory or not when the user task is finished. | |
delegate | Used to define if the comment is mandatory or not when an actor delegates the user task. | |
reject | Used to define if the comment is mandatory or not when an actor rejects the user task. | |
unclaim | Used to define if the comment is mandatory or not when an actor unclaims the user task. |
Example
<configuration>
<taskConfigurations>
<entry>
<key>validation_step</key>
<value xsi:type="ctdbum:UserTaskType">
<commentMandatory>
<claim>true</claim>
<complete>true</complete>
<delegate>true</delegate>
<reject>true</reject>
<unclaim>true</unclaim>
</commentMandatory>
</value>
</entry>
<taskConfiguration>
</configuration>
Delegation
Allows to define if delegation is authorized and for whom.
Property name | Description | GUI |
---|---|---|
key | Used to put the id of the user task. |
|
value | ||
delegation | Used to declare the properties of the delegation of the user task. | |
allowed | Used to define if the delegation is authorized or not. | ![]() |
autoApproveAfterResolution | Allows to define the result of the user task when the actor approve it:
| |
autoRejectAfterResolution | Allows to define the result of the user task when the actor reject it:
| |
scope | Allows to limit the search results. The objectKind must be IDENTITY. | |
searchWidget | Allows to configure how the delegates can be searched by using an AdvancedObjectReference widget. | ![]() |
Example
Identity links
Allows to define which type of actors can perform actions on the Workflow.
It is possible to configure several identity links.
Property name | Description | GUI |
---|---|---|
key | Used to put the id of the user task. |
|
value | ||
identityLinks | Used to declare which actors can perform actions on the Workflow. | |
scope | Allows to limit the search results. The objectKind must be IDENTITY. | ![]() |
type | Allows to choose a type of actor:
It is better to always configure an administrator to manage the Workflow (if the candidate is deleted for example). |
Example
Notifications
Allows to configure notification(s) on actions on the Workflow using:
notification id
action scripts
It is possible to configure the same email definitions for different actions.
Before configuring a Notification in a workflow, it is mandatory to have configured notifications (emails part).
Properties name | Description | GUI |
---|---|---|
key | Used to put the id of the user task. |
|
value | ||
notifications | Used to configure which notification should be sent on which actions. | |
initializationActions | Used to define the notification actions to be executed when launching a Workflow. | ![]() |
interruptingTimerBoundaryEventActions | Used to define the notification actions to be executed when the timer boundary event is interrupted. | |
claimActions | Used to define the notification actions to be executed when an actor claims a user task. | |
unclaimActions | Used to define the notification actions to be executed when an actor unclaims a user task. | |
delegateActions | Used to define the notification actions to be executed when an actor delegates a user task. | |
resolveActions | Used to define the notification actions to be executed when an actor approves a user task. | |
completeActions | Used to define the notification actions to be executed when a user task is finished. | |
rejectActions | Used to define the notification actions to be executed when an actor rejects a user task. | |
resolveWithRejectionActions | Used to define the notification actions to be executed when a user task is resolved with a rejection | |
skipActions | Used to define the notification actions to be executed when a user task is skipped. |
Cancellation actions
It is possible to define cancellation actions on the whole workflow who will be triggered in order of declaration when the workflow is cancelled.
Notifications must be of type CITADEL_WORKFLOW__FEATURE_EXECUTION
or CITADEL_WORKFLOW__ROLE_ASSIGNMENT_OPERATION_EXECUTION
Example
Configuration using notificationId | Configuration using Action script |
---|---|
XML
|
XML
|
User interface
For each configured user task, you must configure a User Interface.
A User interface allows to configure a validation screen for the actor of the Workflow.
Property name | Description | GUI |
---|---|---|
Version and encoding | Each User interface starts by announcing the version and encoding. |
|
Definitions | Each User interface starts by announcing the Definitions. | |
Edit widget | It is possible to configure an edit widget. In this case, the actor can perform an update on the pre-filled value. | |
Display widget | It is possible to configure a display widget. In this case, the actor can just see the pre-filled value. | |
Role request widget | It is possible to configure a role request widget. In this case, the actor can see role information, perform an update on dimensions or not (according to the configuration). |