Workflow Editor

Last updated on
9 March 2018

The Template Builder is the interface workflow administrators will spend a great deal of time. We also refer to the Template Builder as the Workflow Editor - its the maestro UI for adding and editing workflow templates. It's 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 native Drupal forms. With the Drupal 8 release, Maestro 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.

The Template Builder allows you to expand the size of the canvas for the tasks to support larger workflows or give you more room to organize your workflow. The drag and drop interface makes it easy to re-position tasks and keeps the task pointers connected as you move the tasks around. There is an inherit snap to grid behaviour so aligning your tasks and connectors is simplified.

Clicking on the task menu button, brings up a context aware menu of actions. For the Start and End tasks, the only options are to Draw a Line or to Remove a Line, but for an IF task, you have actions to edit as well as draw the False and True branch connecting lines.

Add a new Template:

Clicking on Add Template button from the main template listing page of the Template Builder - maestro/templates/list, brings up the dialog to define the name for your workflow. All that's needed at this initial point is to provide a label (name) for your workflow template.

Upon save of this form, default process variables will be created. One is called initiator and this variable is set to the user id (uid) of the user that launches the workflow. Assigning interactive tasks to initiator is a common practice during initial development so you don't have to keep switching users to test - all the tasks will be assigned to you. In practice, you will still use this process variable frequently for assigning interactive tasks. The other three process variables are created to control the visual status bar that is used to show the current stage this workflow instance is at - within the overall workflow process. The number of workflow stages, the current stage as well as the message to show for the current stage can be dynamically controlled via code should developers need. Their associated workflow task are all configured in the workflow template builder.

Adding a new Task:

Once you open up the template inside the Template Builder, clicking on Add Task button will bring up the dialog to select the type of task you want to add. It will be added to your canvas in the upper left and then you can drag it to where you want it and then click on the task edit icon to bring up the context menu and select edit to configure the task.

You can clear the connecting lines for individual tasks and re-connect to the new task into your flow. You don't need to necessarily configure the tasks immediately, you can add and arrange tasks as you like to get a sense of the workflow using task names to map out the process. 

Next Steps:

Help improve this page

Page status: No known problems

You can: