To create a custom workflow you need to connect to the database in Configurator, expand the Database, expand the Entities, and expand the required entity to see the Workflow property:
State defines the status of the entity within its workflow.
To create a state right-click on the Workflow property and select the Add State option (besides the newly created state the program will also create State and Reason properties automatically):
Enter settings of entity’s initial state and save the changes:
Add and save other states the entity will have:
Transition defines the shift from one state to another.
To create a transition right-click on the Workflow property and select the Add Transition option:
To create initial transition, you need to select initial state for the ‘To’ field, while leaving the ‘From’ field empty, and save the changes:
Then create all other transitions between the states, for example, entity ‘Order’ can move from ‘Submitted’ state to either ‘Cancelled’ or ‘Completed’:
Reason defines why the entity shifts from one state to another.
To create a reason right-click on the initial transition and select the Add Reason option:
Enter initial reason’s name and save the changes:
Important! If you check the Default option, the reason will become default for the given state:
Tip: Each transition should have at least one reason, but if you have a simple workflow and don’t want to specify the reason each time you shift from one state to another, you can create one default reason for each transition so that the field ‘Reason’ can be entered automatically once the entity gets this state.
Right-click on other transitions and add their reasons (Note that transitions can have several reasons, for example, entity ‘Order’ can get state ‘Cancelled’ because it is ‘Declined by Client’ or ‘Rejected by Security Team’):
Action defines what property should be filled in automatically when the entity shifts from one state to another.
To create an action right-click on state, transition or reason and select the Add Action option:
1. If you add an action to a state, this action will take place when entity gets into this state regardless the transition (as there can be several transitions to one state).
2. If you add an action to a transition, this action will take place when entity gets into the state by exactly this transition regardless the reason (as there can be several reasons for one transition)
3. If you add an action to a reason, this action takes place only when entity gets into the state exactly with this reason.
Select the property which will be filled in with a value and the expression which will be used for calculating the value (for example, when entity ‘Order’ gets state ‘Submitted’ the program can automatically fill in the property ‘Date Submitted’ with current date & time or property ‘Submitted By’ with current user):
Hint: In most cases you can leave the ‘Expression context type’ property with the ‘Calculate by new values’ option. ‘Calculate by old values’ is used in rare cases (when you need the program to fill in the value which was actual before the recent change).
Add other actions and commit the changes:
The properties ‘State’ and ‘Reason’ will be available on entity’s main view and detail view: