Workflow - Key Concepts
Overview
In Paygate, workflows allow you to automate tasks so that they run autonomously.
Key concept 1 - Workflows must be invoked by a trigger.
Key concept 2 - Triggers are time based and usually run on a reoccurring schedule.
Key concept 3 - When triggered, a workflow is placed on a queue. Once on the queue, the workflow is guaranteed to run but may not run immediately. The system monitors resources and will automatically run a workflow from the queue when sufficient resources are available.
A basic overview of how Workflows work.
Paygate automation uses the concept of triggers to start the workflow execution process. A workflow attached to a particular trigger is known as a bound workflow.
When a trigger fires, any bound workflows of that trigger will be eligible to be executed. To continue the execution process the trigger will place any bound workflows onto a special queue were they will wait to be picked up by one of many workflow runners.
Workflow Runners are self-contained, independent systems that have one purpose - to execute workflows. They do no other work than executing workflows and each runner will only execute one workflow at any one time.
This process of a trigger firing, passing the workflow to the queue and runners taking workflows from the queue is shown in the following diagram:
Workflow Diagrams
In Paygate, workflows are created as diagrams using a tool called the Workflow Designer. The Workflow Designer is available from within the Paygate client using a standard browser.
A workflow Diagram consists of individual blocks called nodes. Each node carries out a specific piece of work such as copying a file or downloading BACS reports.
For example, consider the workflow in the diagram below:
The workflow starts at the Start node on the left. It then flows, step-by-step, to the right:
- Firstly the workflow connects to BACS using a HSM and downloads all reports for the last processing day.
- If the report download fails, for whatever reason, an email will be sent. The workflow will stop here.
- If the report download succeeded, the reports are zipped up into a single, password protected zip file.
- Lastly the workflow takes the zip file and emails it, as an attachment, to several of your finance staff.
It’s a simple workflow that can save hours of time, each month.
Other concepts
When a Workflow is executed, the workflow engine loads up a workflow diagram and finds the ‘Start Node’, the origin of all workflows. The engine will then follow the arrows in the diagram, one at a time and completing each node before moving onto the next.
Workflow nodes are never run in parallel.