Several of the previously mentioned workflows are available out of the box; however, it is also possible to create new workflow templates to address recurring collaboration problems. An administrator would define each workflow's needed actions and decisions, assign them to the appropriate roles, and make these templates available to Backoffice users.
A good example is the product creation template, as you have already seen in the previous example. Each time a user creates one or more products, they can use this workflow template to create a workflow instance for the created products. Alternatively, if the workflow template's author included an activation script, the workflow can be automatically launched when the conditions are right. In that case, a separate workflow instance would be created for product A, another instance for product B, then C, and so on.
But why do we overcomplicate things by using a template instead of directly creating a workflow when needed?
Good question: The workflow template defines the overall structure, including steps and decisions, required for a general use case. We simply define it once and can reuse it endlessly by creating specific workflow instances out of it. Otherwise, we would have to redo the definition part for each individual workflow again and again – which would be quite inefficient, right?
The major workflow elements are as follows:
Key element composition and relationships:
- A Workflow exists only at runtime, and its structure is based on a Workflow Template.
- The Workflow owner is the user who starts the workflow and is often notified of its progress.
- A Workflow contains multiple runtime steps (Workflow Actions), each created from a Workflow Action Template.
- A Workflow may have any number of Workflow Item Attachments (the subject items).
- A Workflow Action may have any number of outgoing Workflow Decisions (available choices). When chosen, a decision leads to a previous or subsequent Workflow Action.
- A runtime Workflow Decision is created from a Workflow Decision Template definition.
- Each Workflow Action is assigned to one or more principals, who can process it and make a decision. A principal is either a specific user, or a member of a given user group.
- A Workflow Template contains multiple Workflow Action Templates, which are connected by Workflow Decision Templates.
There are three kinds of Workflow Action Templates:
- Start: a workflow’s starting point(s).
- Normal: neither starting or completions points of a workflow.
- End: a workflow’s completion point(s).