Workflow navigation
In order to work with Casewhere workflows efficiently, you, as the solution developer, need to understand how the workflow engine works, especially how it navigates from one activity to another.
After adding an activity to a step, click Edit Activity Definition to set up the activity definition.
The navigation settings can be found in the Navigation tab, which is available for all activity definitions.
Activity navigation
Inclusion logic
The inclusion logic controls whether the workflow engine should execute the activity or not. You can configure by choosing one of the following options:
- Always Include: The workflow engine will always execute the activity.
- Included Until Completed: After executing the activity, the workflow engine will exclude it from the execution path. If the activity is a UI activity, you will see it disappear in the workflow wizard.
- Included When: The workflow engine will execute the activity when the expression returns true. You can learn more about the syntax here.
- Excluded When: The workflow engine will skip the activity when the expression returns true. You can learn more about the syntax here.
For UI activities, the default setting is Always Include while it is Included Until Completed for automated activities.
Required logic
The required logic determines whether the activity is required to complete the workflow. A workflow completes when all required activities are completed. You can configure the logic by choosing one of the following options:
- Required When Included: The activity is only required when it is included.
- Always Required: The activity is always required.
- Optional: The activity is optional and does not impact the workflow completion.
- Required When: The activity is required when the expression returns true. You can learn more about the syntax here.
- Optional When: The activity is optional when the expression returns true. You can learn more about the syntax here.
The default value is Required When Included.
Editable logic
The editable logic controls whether or not the activity is available for user input. This setting is applicable for UI activities only. You can configure the logic by choosing one of the following options:
- Non-Editable until all prior Included Required Activities are Completed + Set Non-Editable when Completed
- Non-Editable until all prior Included Activities are Completed + Keep Editable when Completed
- Editable Until Completed: The activity is set to non-editable after it is completed.
- Always Editable: The activity is always editable.
- Editable Until: The activity is editable until the expression returns true. You can learn more about the syntax here.
- Non-Editable Until: The activity is non-editable until the expression returns true. You can learn more about the syntax here.
The default value is Non-Editable until all prior Included Required Activities are Completed + Set Non-Editable when Completed.
Completion logic
Notes: These settings are rarely used and kept for the compatible reason only.
Auto Complete Activity Without User Interaction: When enabled, the workflow engine will evaluate the validation rules and automatically complete the form when all rules are passed.
Workflow wizard buttons
The workflow wizard provides a set of buttons for end-users to submit data, navigate back and forth. You can customize these navigation buttons from Casewhere Admin as part of the Navigation logic of the Form Activity Definition.
Below are the navigation buttons' default behaviors, but you can always override them by using Force Hide or Force Show.
- Back: Allow the user to move to the previous activity. This button does not save data.
- Forward: Allow the user to move to the next activity in the current execution path. This button does not save data.
- Cancel: Close the workflow wizard and discard all unsaved changes. This button always appears.
- Reset: Clear the unsaved changes and reload the activity.
- SaveAndLock (
deprecated
): This button only appears at the last required activity in the current execution path. After saving data successfully, Casewhere will lock the workflow from running again. Locking workflows have been deprecated since version 2.5. - SaveAndNext: After saving data successfully, Casewhere will navigate the user to the next activity in the current execution path. This button will disappear at the last activity.
- Save: This button will appear at the last activity in the current execution path instead of the SaveAndNext button.
- SaveAndClose: After saving data successfully, the workflow engine will close the workflow wizard. This button will only appear at the last activity of the current execution path.
Here you can also customize the buttons' appearance:
- Label: Casewhere accepts text resource keys for button's label.
- Icon: CSS classes. For example, you can use Font Awesome to customize the icon.