In the previous lesson, we discussed the necessity of creating workflow templates to initiate workflows for collaborative work. In this lesson, we'll talk about the methods to define and manage these templates:
- Use the workflow API to create and manage a workflow template model with WorkflowTemplateService in the Service Layer.
This method is complex and requires a deep understanding of all related data models in the Workflow module.
- Implement ImpEx scripts for a workflow template definition and import it directly with ImpEx.
This method is similar to the first and is typically used for backing up workflow templates.
- Use the workflow workspace in Backoffice to directly create or configure existing workflow templates.
However, this approach isn't always the best choice due to the lack of a visual representation of the workflow structure. It complicates the management and design of the templates.
- Use the visual Workflow Template Designer.
This tool graphically creates and edits workflow templates, offering a more visual and intuitive user experience.
Based on the options presented, the preferred method to create and manage workflow templates is to use the visual Workflow Template Designer.
Let’s now find out how to use the visual workflow template designer in Backoffice.
Here is a quick summary of the visual workflow template designer:
- It is available out-of-the-box in Backoffice.
- It can be started when creating a workflow template.
- Alternatively, the Visual Workflow Template Designer can also be started when editing an existing workflow template.
- It’s a visual workflow template editing tool:
- originally based on existing functionality that allows you to visualize and monitor workflow instances. These workflow instances are a part of the Backoffice collaboration feature.
- enriched with Add, Edit, and Delete buttons along with drag-and-drop actions to help you create, edit, delete, and reposition actions, decisions, and their connections.
In addition to the features discussed earlier, the tool also supports basic data validation during the workflow template design process. For example:
- It doesn’t allow you to create invalid connections
- And it can detect stand-alone actions or decisions that are missing connections, displaying error message when you attempt to save the workflow template.