The Maestro Workflow Engine for Drupal 8 is now available as a Beta download! It has been many months of development to move Maestro out of the D7 environment to a more D8 integrated structure and we think the changes made will benefit both the end user and developer. This post is the first of many on Maestro for D8, which will give an overview of the module and provide a starting point for those regardless of previous Maestro experience.
If you can flowchart it, we can automate it!
What is Maestro?
Maestro is a business process workflow automation engine which ships with a process template editor and end user task console. Maestro's slogan is: "If you can flowchart it, we can automate it". With Maestro's template editor, you can visually design a workflow which has human-interaction-required tasks and machine-executed tasks, complete with logic, looping, branching and variables.
Maestro's first generation release was back in 2003 where a rudimentary version of our current workflow engine was developed. Over the intervening 14 years, Maestro has been steadily updated and in 2011, Maestro was released as a full version module on Drupal 7. Maestro's D7 release heralded a new beginning for the engine with Nextide's focus for Maestro being solely centred on Drupal. Maestro for D8 is now more integrated with Drupal, provides a rich Drupal 8 development environment while still delivering the basic functionality out of the box.
Maestro's workflow engine is known as the "Orchestrator". The Orchestrator is responsible for marshaling workflow processes through their templated paths. The maestro module contains the workflow engine, the entities and the API used for managing workflow processes. The Orchestrator is designed to run independently from the rest of Drupal in a similar fashion to Drupal Cron, thus allowing the workflow process to proceed without having to wait for a user to hit the site and bootstrap Drupal.
Maestro for D8 now uses Drupal 8 config entities for the templates and content entities for the in-production templates (called processes). The introduction of native Drupal 8 entities for the engine means that site builders can now use Views as a means to create interfaces and reports for active processes. Maestro ships with a few out-of-the-box views for showing outstanding and in-production tasks to help administrators with their daily routines.
Maestro's API has been revamped and updated to provide a much more streamlined development experience. A separate blog post will be used to highlight the basic API. The maestro_engine provides the basic API for use in your own Maestro-related applications.
The Template Builder is the interface workflow administrators will spend a great deal of time. As shown in the image in the "What is Maestro" section, the interface allows administrators to drag-and-drop tasks on to a visual workflow designer. The Maestro D8 template builder is an SVG-based tool that works on all platforms, including iOS and Android browsers. The editor interface has been updated to allow single-click operations for editing and moving of tasks in the interface.
Developers using the new template builder will be pleased to know that the edit screens for tasks are now full Form API driven interfaces, giving developers the ability to inject their own form fields and manage that data as they see fit.
Maestro for D8 has introduced the concept of validated templates. In order for a template to be put into production, it must first be validated by the engine. The validation routine ensures that tasks have the appropriate fields or task pointers in place to allow a template to function as error free as possible.
Ultimate end users of the workflow engine are not administrators, but rather the users in your environment that must complete assigned tasks in order for the workflow to continue. The task console is the default application provided by Maestro to show users their tasks. Tasks are assigned to users based on the template and the configuration provided for the task.
The task console provides users with a simple interface to execute their tasks. Maestro developers can customize the functionality, look and feel of the tasks to suit the business' requirements. A number of APIs and hooks exist for the Maestro Engine and the task console to augment and customize the text and appearance of the console columns themselves.