Workflow engine and server side validation

When a workflow uses server side validation, interactions are validated before they are sent to the database and can therefore be returned immediately to the user if validation fails. Therefore, the workflow engine processes interactions that meet specific criteria only.

For example, an employee might submit a Safety Boot Request Form (that is, Interaction) that uses server side validation to determine whether the requested shoe size is available before the interaction is processed by the database and the form is sent to the employee’s supervisor for approval. If the shoe size is not available, the Safety Boot Request Form is returned immediately to the employee for re-submittal and is not processed by the database—thereby saving processing time and improving system performance.

Validation actions

When creating workflows with server side validation, developers do not have to rewrite workflow actions for them to be used within a validation branch. When the user constructs a workflow, the user can optionally designate some actions at the beginning of the flow to be validation actions. The user, who marks the actions appropriately, determines how far the chain of validation actions goes.

Validation nodes

Workflow developers can indicate if a validation fails by branching to a rejected node in the workflow. If validation fails, the API returns the Interaction with an explanation message displayed to the user with options to return to the previous form or cancel completely.

Because multiple rejected nodes can be placed on any workflow, users can have multiple rejected nodes with different messages indicating why the validation failed. Alternatively, the validation node can return an exception status and the corresponding message is displayed to the user.

Note: In order for an action to be used within the validation portion of a workflow, the action must not pause the workflow. Server side validation pauses for actions that have the Person attribute set to true (box is checked). Nodes in the validation chain that require a pause and human interaction can be Employee, Role, or similar custom nodes. Form Studio does not permit a flow to be saved if the validation chain has pauses in the workflow. Other than this exception, the action in a workflow that uses server side validation is identical to any other action in the workflow Engine.