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.

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 and if it should be shown in the progress bar or not. If a workflow has state that is only entered in rare cases it makes sense to not show it in the overview of the workflow. A good practice is to only show these states in the progress bar that are part of the ‘happy flow’, the ideal flow for a case. This way, a user knows what to expect. States in the progress bar appear in the order specified in the configuration, meaning they can be reordered in any way needed.

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.

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:

OUTCOME_INSTANCE.is_employed = true

Last updated