The workflow process takes over after the front-end form is submitted (normally). Workflow has the ability to update and retrieve from numerous other systems, perform calculations (using Ruby), and dynamically determine process steps.
The goals for the article are:
- Learn the basic terms around the Workflow Engine
- Understand the purpose and basic function of the consoles
Task Engine The Task Engine is a workflow engine that takes input from applications and walks through a predefined set of tasks also known as a task tree. Tasks can perform data lookups, add approvals, create entries in other systems, send notifications, and much more.
Builder Graphical process builder that allows configuration and sequencing of tasks.
Handler Standalone collection of code designed to perform a business task. Handlers take parameters, return results and can throw exceptions in the event of an error.
Available from the Plugins portion of the New Community.
Node (also referred to as a Task) Configured parameters applied to a specific instance of a Handler on a task tree.
Connector Link between two Nodes. Can have logic applied to limit processing.
Task Tree A Task Tree is a process defined by nodes and connectors. It can be called/run from an external application accepts inputs and reference values from the external application.
Routine A tree that is meant to run independent of a Form. Often used to perform repeatable processes.
Before we dig in and look at creating workflow, we'll walk through an overview of the other consoles. Most of them are only referenced at setup or are just an overview of current activity, so we wont need to reference them during class after this.
Allows workflow administrators to set Users and their information. You can also define who can access which consoles, and groups of Handlers (Categories).
This console lets you modify a few workflow settings.
Engine Status. You can stop and start the workflow engine. This is required for some updates to deploy handlers or confirm changes to the fields listed below.
Sleep Delay. Number of seconds the engine waits to look for new triggers to process. There are many times the engine processes new triggers right away, but this is a good guideline. If you set Sleep Delay to zero, that also shuts off the engine.
Max Threads. Number of threads that are able to process triggers.
Trigger Query. If you want the workflow engine to only operate for certain handlers, add a criteria (for example: 'Selection Criteria'="Product Ordering").
Example of Engine Setup settings:
This console includes consoles for building Trees and Routines, along with the displays for Runs, Triggers and Errors.
The contextual filtering in the right panel is helpful to find any of the items on the different consoles.
Next we construct some basic trees, and learn more about nodes and connectors.