Extending a Workflow¶
Introduction¶
The workflow is what defines the paths a case can move on from start to finish. Depending on how the workflow is designed there can be more than one path. It consists of states and transitions.
State¶
States are the stations or steps a case can go through. Every case usually starts with an entry state, which usually is a draft, and ends with a final state, e.g. approved. In between there can be as many states as necessary. All of these states in between can, but don’t have to, be entered on the way to a final state. The order in which the states are moved through is defined by the workflow's transitions.
Transition¶
Transitions are the connections between states. Each transition acts like a gate that allow a user to enter from one state to another state. This way it can be clearly steered which state a user can enter next.
Seeing the Workflow as a Diagram¶
Info
New in Atfinity 18.
The Workflow tab shows the states and transitions of the workflow as a diagram. The layout is automatic and starts from the entry state. Layout draws the workflow from top to bottom, which is the default, or from left to right. Transitions hides the arrows, shows them, which is the default, or shows each of them labelled with its key.
A successful final state is marked green and a failed one red, and a transition with a condition is dashed. A transition without a from state or a to state has no arrow, but the search still finds it.
Selecting a state shows only its transitions, even while transitions are hidden, and fades the states they do not connect it to. Click the point where the arrows enter or leave a state to show only its incoming or only its outgoing transitions. Selecting a transition hides the other transitions and fades every state but the two it connects. Changing Transitions clears the selection. Hovering a state shows its transitions, and hovering a transition shows its key even while labels are off.
The search finds states and transitions by key or ID, and shows a matching transition even while transitions are hidden. Press Enter to close the list of results and keep the matches highlighted.
Adding new Steps to a Workflow¶
When a workflow needs an extra station to go through a new state needs to be added to it. Adding an extra state starts as usual with giving it a key and a name.
It can then further be decided if a state should be a final state.
For every individual state it can be defined which permissions each user role has, so who is allowed to edit information, upload files, delete uploaded PDFs, etc.
Adding Transitions between Workflow States¶
A transition has a key and a name as well. It also has a state it transitions from and a destination state where it transitions to. Also, it can be stated which user role has permission to execute the transition. In a draft case, a configurator can execute every transition regardless of these permissions.
Additionally, a transition can have a condition that defines when it can be executed. This is useful in case a state should only be entered if a specific condition is met, e.g. a special approval is required because the client is a US-citizen. In that case a transition's condition could look like this:
Granted Permissions¶
Info
New in Atfinity 18.
A state you add grants no permissions, and a transition you add is allowed for no role, until you grant them.
As soon as any role is granted anything, the state or transition is marked next to Configure permissions as having granted permissions, and the mark goes away once every grant is taken back. A state or transition without the mark is therefore one no role can use yet. The states and transitions of a new workflow are created with permissions, so they carry the mark from the start.
A final state only offers Download booklet, Change owner and Create comments, and only those count towards the mark.
Showing a Transition that cannot be Executed¶
Info
New in Atfinity 18.
A transition the user cannot execute is hidden from the case, whether their role lacks permission or its condition is not met. The user then cannot tell a transition that does not exist from one they are not allowed to use yet.
Set Show button even if disabled and the button stays in the case header in both cases, greyed out. Add Show tooltip with a Tooltip if disabled to explain why, for example which information is still missing. The button then carries an information icon, and hovering it shows the tooltip. The tooltip is translated like the button title, and it is only shown while the button is disabled.
The setting applies only to a transition offered as a button. A transition that runs on its own, for example once all information is provided, is never shown to a user whose role may not execute it.
A greyed-out button counts towards the buttons in the case header, so with more than three, the first ones move into the menu next to them.
Requiring Several Approvals for a Transition¶
Info
New in Atfinity 18.
A button transition can wait for several users to approve it before it moves the case. Set Multiple votes required for transition and the Number of votes required, between 2 and 16.
The button then shows the approvals so far, for example 1/3. Every user allowed to execute the transition can approve once and revoke their own approval. Approvals stay in place when the case changes, but only count while their user may still execute the transition. When the condition of the transition is no longer met, its approvals are cleared and the activity log records it. The last approval runs the transition and clears all approvals, the activity log records each approval and revoke. With Show who voted, the button opens a dialog listing who approved and when.
The API and the MCP server refuse such a transition. A transition action of a rule moves the case without approvals and clears those given so far.