Workflows define the allowable states and state transitions for records in a table. Workflows are specific to a table. To create or edit a table's workflow, navigate to the Workflow tab of the Table wizard.
Once you have created and saved your table's Workflow,
Agiloft automatically creates a choice field,
wfstate, containing all the workflow states you defined.
Note: Older versions of
Agiloft rely on a Java applet to open the Workflow editor. If you don't have Java, you will be prompted to install it. We recommend upgrading to the latest version of
Agiloft to take advantage of the improved DHTML editor.
In the workflow editor the first thing to do is add the different states of your workflow.
Say we have the following states in a choice field: Order received, Sent to Partner, Updated by Partner, Fulfilled, and Canceled.
- Type the state names in the text entry box.
- Click Add States.
States are added with simple, but not necessarily realistic, transitions and set automatically, as shown below:
Modifying States and Transitions
- To add a state transition: select a state's corner and drag to another state; for example: Order received -> Cancelled.
- To delete transitions: select the arrow between two states and click Delete; for example: Send to Partner -> Order received. This prevents the record from being moved from one transition state to another.
- To arrange your workflow chart: select a state, then drag and drop it anywhere in the editor.
- To set the default state and state properties: select a state and select the appropriate checkboxes to allow records to be created or deleted in that state, and to set the default.
- Selecting the Creatable checkbox will make the workflow state accessible when creating a new record.
- If the Deletable checkbox is selected for a state, the system will allow records to be deleted when in that state. Otherwise, it will prevent users from deleting records based on the workflow state. By default, all states are designated as deletable.
- There must be a single default state, and it must also be a creatable state.
Your workflow might now look something like this:
Example: You need to add an action to send an email when a record is canceled, or when a new order is received.
- To trigger an action between state transitions, double click on the arrow between the states to open the action dialog. To trigger an action when records are created, click on the triangular caret above the state to open the dialog. If no 'creatable' caret is available, you must first make the state creatable.
- Choose Action from the Create New Action drop-down.
- For this action you'll need to specify that an action should only be executed if search condition is met. A condition is a guard applied to an action rather than a state transition and prevents the action from occurring if its criteria are not met. Double click the caret to open the action.
- Select the action.
- Hover over the No Condition drop-down and select Define Simple Condition.
- The Move Up and Move Down buttons are available in the workflow's transition wizard to specify the order actions and guards execute in.
Suppose you need to add a guard to the transition to Fulfilled that prevents it from being changed to Fulfilled unless the field labeled Shipped Date has been given a value.
- Double click the transition.
- Select the Guard tab.
- Hover over Create New Guard and select New Simple Guard:
You can define the guard based on search criteria for other fields. For example, you might create a guard to specify that the Solution field is not empty. The guard condition must be true for the state change to be allowed.
Saving the Workflow
Click the Finish button to save and apply changes. No matter how complete the diagram looks, it is not saved until you click Finish. Now, when you navigate back to the Fields tab of the table setup, you will see a field called Workflow State or
wfstate. The choices in this field map to those in the Workflow diagram you just set up; there is no need to create a separate choice field.
Give User Groups the Option to Override Workflow Actions
The Overrides Settings tab in the Workflow wizard defines which groups have the option to cancel workflow actions or override guards when executing state transitions. There are two columns, each corresponding to a workflow permission setting. Checking the 'Visible' column allows users in the selected group to see on screen the names of the actions that will be triggered when the record is saved in a new state. If the 'Optional' column is checked, the users will be able to deselect the actions and guards before saving the record.
- On the Override Settings tab, select the checkboxes for each groups that should have permission to view or override workflow actions.
- Click Finish to save the settings.