Skip to main content

Business Status

Target audience: Modelers

Available from: 3.11

Overview

There is often a requirement to label or categorize specific case or process instances with a status that has a meaning towards the end-users. In Flowable, this persisted field is called the 'business status'. It is free-form and is meant as a sort of meta-data stored on the instance.

This business status can be declared and then set, either by the user or automatically. In this how-to we describe how you can define your business status and how you can change it.

Declaring a business status

To declare the business status press for a case on the outside (the Case Diagram) and for a process on the outside of a diagram. You will see in the properties section the option to specify Status values. Clicking on those, allows you to specify different status values. In case you have translations enabled, you can also specify directly the translations to other languages.

Business Status Values

Once you press "OK", you have the status defined in your case/process and can set a default status:

Initial Status Values

The default status will be set when you start a new instance.

Updating the business status as a user

When you started a new instance, you have the option to update the business status through Flowble Work:

Business Status in Work

This can be disabled in the security policy either globally or for a specific definition:

Change Status in Security Policy

For CMMN the permission is Change case status and for BPMN the permission is Change process status.

Updating the business status automatically

You can also update the business status inside the process with a task listener, execution listener, lifecycle listener or a service task. Therefore, you can use the following expression:

BPMN:

${runtimeService.updateBusinessStatus(root.id, 'execution')}

CMMN:

${cmmnRuntimeService.updateBusinessStatus(root.id, 'finalization')}

In case you have a simple process, and you would like to move to the status Execution on task assignment and to Finalization on the completion of the task. In this case you can have the following task listener configuration:

Task Listener configuration

Note that you need to use the value of the status as defined in the Status values configuration above.

Recap

You can use a translatable business status to track a status which is also exposed to the user. The status can be either changed automatically or manually through the user, and both can be combined for more advanced use-cases.