This article relates to BPMN 2.0 process. Looking for the BPMN 1.0 article? Click here!
A process aware form is a form that shows, hides or locks parts of its content depending on how the process model and form is configured. Your form displays different parts depending on where in the process it is and which role is watching it.
This helps ensure information security in your process application and ensuring that the right person can see and edit the right information at the right time.
The functions used to control forms is called Viewmodes and States
The difference between View Mode and Data state
A Viewmode is set on a dataobject in the process model and will show its contents according to the viewmode settings in the task(s) that the dataobject is connected to.
State is set on a dataobject in the same way but works a little differently. The forms state is set once it leaves the activity that it is connected to. For example, a dataobject with the state "reviewed" is connected to a task called "Review Case". The dataobject will have the state "reviewed" when the task "Review Case" is completed. The form will also continue to have the state "reviewed" until the process in some step actively changes it by giving it a new state in the same way.
When to use View Mode
Viewmodes is the most common feature that is used to create process aware forms. It's easier to understand since it's a one-to-one relationship between what the viewmode says it is and how it works. However, you will have to have a defined viewmode on every single task and dataobject.
Read more about how to configure Viewmodes in a BPMN 2.0 process application
When to use Data state
State is used in those cases that you have a long process with multiple tasks where you want the form to look the same in several sequential tasks. In that case you can set the viewmode in the beginning and the form will continue to present itself in the same way in the following tasks.
Read more about how to configure Data States in a BPMN 2.0 process application