Verne workflow engine is the tool that allows to automate business requirements whereby a piece of work or a particular process passes through a sequence of steps from initiation to completion. Workflow engine provides a generic framework that can be used in various areas, such as automation of compliance routines or business services workflow.
In order for Verne to automate a workflow, the candidate process needs to be broken down into "workflow building blocks" and described using Verne workflow configuration. Workflow configuration will allow instances of a workflow to be created and run for every occurrence of this process.
Example: An annual return compliance routine requires an instance of annual return process to be automated for every company that must file annual return this year. A workflow instance is created for each company for this year. Every instance starts as a " future obligation", then it transitions into "due obligation" when the filing time is reached, ultimately a user triggered activity such as company de-registration or filing of annual return transitions the workflow of the annual return into "completed obligation" or "stopped obligation" accordingly. At every step of the workflow some activities happen, for example communications sent to the interested parties, future-dated activities scheduled should the company not fulfill the obligations, company data updated.
The following are the "building blocks" of the workflow configuration:
- Step is a stage that the process goes through where certain actions happen to the subject of the workflow
- Listener is the mechanism that listens for user activity on the subject of the workflow, executes actions and can move the workflow to another step
- Event is the mechanism that allows to automatically execute delayed actions on the subject of the workflow that can move the workflow to another step
- Action is a change to the subject of the workflow that is performed by Verne to enforce business requirements associated with the workflow process
- Trigger is a collection of actions with conditional logic and parameters, those actions are grouped together for the purpose of code re-use.

Step
Step is a stage that the process goes through where certain activities happen to the subject of the process. When workflow instance lands on a specific step, the actions that are associated with this step are executed automatically. After that the workflow instance can either transition to the next step or can stay at this step awaiting for the next external activity that would trigger transitioning. Workflow configuration must nominate one initial step that the workflow instance lands at when it is created.
Example: When "business service workflow" instance transitions to the "task rejected" step it executes a number of actions, including setting the status of the service instance to "Rejected", triggering a communication to the presenter of the service and finally transitioning the workflow to its final step "workflow instance closed".
Listener
Listener is the mechanism that listens for the specific user activity that can move the workflow to another step. In other words it is an ad-hoc event that happens as a result of a user action. Once the listener detects the users activity that it is designed to listen for, Verne executes all actions associated with the listener.
Example: When a user saves a newly created business service instance, the listener defined for the "business service workflow " picks up this activity and creates a workflow instance for this service instance with one scheduled event, that is the service expiry reminder.
Event
Event is the mechanism that allows Verne to automatically execute delayed activity that can move the workflow to another step. Event can be created (scheduled) by the listener that creates the workflow instance, or it can be scheduled when executing actions of a specific step or another event. Scheduled events can be deleted/disabled should they be no longer applicable to the workflow instance in its current status.
Example: When an annul return workflow instance is created, all of the annual return reminders including final company removal are created as separate workflow events with the future due dates calculated based on the business rules captured in the workflow configuration. Once the annual return is filed, the listener pick up this activity and transitions the workflow to the final step that deletes all the remaining scheduled events as they are no longer needed.
Action
Action is a change to the registry data that needs to be performed by Verne to enforce the business requirements associated with the workflow. The actions include but are not limited to the following:
- create a new workflow instance
- schedule an event for the workflow instance
- transitioning the workflow instance to another step
- set the status of the workflow instance
- apply changes to the subject of the workflow instance (e.g. update entity or service instance details, most commonly their status)
- execute the trigger
- etc.
Trigger
Trigger is a collection of actions with conditional logic and parameters grouped together for the purpose of code re-use.
Example: When a service instance is submitted, the listener picks up this activity and transitions the corresponding workflow instance to the "form submitted" step. That step has only one action, that is to execute the trigger called "create review task if required". This trigger in its turn would check if the task needs to be created, if so it would create the task and transition the workflow to the "review task created" step, otherwise it would transition it to the "workflow instance closed" step.

