Process Aware Forms

  • Updated

A process aware form is a form that shows, hides, or locks parts of its content depending on how the process model and form are configured. Your form displays different sections depending on where it is in the process and which role is watching it.

This helps ensure information security in your process application and ensures that the correct user can view and edit the right information at the right time.

The functions used to control forms are called View modes and Data states.

The difference between View Mode and Data state

A View mode is set on a data object in the process model and will show its contents according to the view mode settings in the task(s) that the data object is connected to.

A Data state is set on a data object in the same way, but works a little differently. The form's state is set once it leaves the activity that it is connected to. For example, a data object with the state Reviewed is connected to a task called Review Case. The data object 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 a step actively changes it by giving it a new state in the same way.

When to use View mode

View mode is the most common feature that is used to create process aware forms. It is easier to understand since it is a one-to-one relationship between what the View mode says it is and how it works. However, you will have to have a defined View mode on every single task and data object.

Read more about how to configure View modes.

When to use Data state

A Data state is used in those cases where 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 View mode 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.

Using View modes

View modes allow you to decide which parts of a form will be displayed depending on where in the process the form is accessed. You can use it to show, hide, and lock a specific field, or a set of fields in a form. 

  1. First, define your view modes in the process. Every time you refer to the specific form you want to use the View Mode functionality for, you need to set a View Mode. Open your process model in Process Studio.

  2. Double-click on the data object and the available settings are shown. 

  3. Name your mode under the section View mode and confirm. This is all you have to do in the process model. 

  4. The best practice is to give the View Mode the name of the performer, in capital letters. This makes it easier for you as a configurator to remember and refer to the correct mode when setting up the View mode functionality for the form. 

  5. Now you have to configure the settings in the fields in the form. Go to the form template you have connected to the model. You can access it directly from the process, open the Asset Browser, hover over the form template, and click on the Edit symbol.EditFormTemplate.png

  6. For each field you want to influence with View Modes, you have to define in which View Modes the field should be locked or hidden. Use the settings lockInViewModes and hideInViewMode.

  7. Write the name of the mode(s). To choose more than one View mode, separate them with a comma and do not use any spaces. When the form is presented in its View Mode, the fields will act according to your setup for each form field. 


  8. If you want to hide a layout and its underlying fields, you have to set the hideInViewMode for both the layout and each object underneath it. 

  9. Try out the settings before deploying the application by using your own account as a performer for every step. In this way, you can verify that the form is functioning as you intended.

Example

You have three different view modes for a support question process:

The form grows as the process develops and previous data is visible, but disabled for the users.

  1. Create- for the creation moment 
  2. Review- for the review task
  3. Answer- for the answer task

three_view_modes.png

1. View mode: Create - The first part of the form is visible and editable for the question initiation.

ViewMode1.png

2. View mode: Review - The creation part of the form is visible but disabled and a new section is shown, but the whole form is still not visible.

ViewMode2.png

This is shown when the process is in the Review Question task, because this is where the form with the View mode: Review is connected.

3. View mode: Answer - A new section for the answer is visible and editable and the previous part is the same as in the View mode: Review.

ViewMode3.png

This is shown when the process is in the Answer Question task because this is where the form with the View mode: Answer is connected.

Using Data state

Data state has two purposes

  • When modeling
    Visually describe the state that a data object has when leaving the element (tasks or events) it is connected to.
  • When creating a process application
    Data state can be used to steer how a form will be shown depending on where it has been in the process before being accessed. You can use it to show, hide and lock a specific field or a set of fields in a form. 
  1. Open your process model in Process Studio. You need to define your states in the process. Every time you refer to the specific form you want to use the Data state functionality for, you need to set a Data state. 

  2. Double-click on the data object and the available settings are shown. 

  3. Name your mode under the section Data state and confirm. This is all you have to do in the process model.

    Best practice is to give the Data state the name of the Data name, in capital letters. This makes it easier for you as a configurator to remember and refer to the correct state when setting up the Data state functionality for the form.
    The Data state will be set after the user completed the task where it is set. As in the example above, the state will not be set until the process flow has passed the task Creator, and will be set as Created. The Data state will not change until it has passed another task. The Data state will be changed again after the task is completed.
    The difference between Data state and View mode is that the Data state will retain its state, while a View mode is only active in the task where it is set.

  4. Now you have to configure the settings in the fields in the form. Go to the form template you have connected in the model. You can access it directly from the process, open the Asset Browser, hover over the form template, and click on the Edit symbol.HI0w31qcG42w6FWTm2YOeqFIIu6-R8LZyg.png

  5. For each field, you want to influence with Data state you have to define in which Data state the field should be locked or hidden. Use the settings lockInStates and hideInStates.

  6. Write the name of the mode(s). To choose more than one View mode, separate them with a comma and do not use any spaces. When the form is presented in its Data State, the fields will act according to your setup for each form field. 


  7. If you want to hide a layout and its underlying fields, you have to set the hideInViewMode for both the layout and each object underneath it. 

  8. Try out the settings before deploying the application by using your own account as a performer for every step. In this way, you can verify that the form is functioning as you intended.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.