Skip to content

Workflow templates and definitions

Workflows are defined through templates. Templates express the business logic in terms of entity's state and behavior to satisfy a given business case. Entities can have several templates defined, each of them designed specifically for different use cases.

Templates aren't used directly by workflow engine, they are used to create definitions instead. Workflow engine works with definitions. Workflow definitions provide a level of freedom for users to adapt the workflow to their needs. Workflow definitions are created out of templates, but then they can be changed without affecting the template itself, and once completely configured, they can be published to make them available for using by client modules.

Note

At least one template must be provided by application's designers.

Workflow definitions are not available for client modules until they get published. When publishing a workflow definition it is acknowledged and stored locally by client modules.

Default workflow definition

A workflow definition can be selected to be the default one for a given entity, meaning that it should be used when creating those entities. There might be other workflow templates available for the same entity, but just one of them can be defined as default.

Note

There must always be a default workflow definition for every entity supporting workflow.

Template and definitions lifecycle

  1. Workflow templates are created for a given entity
  2. A workflow definition is created based on a given template
  3. Workflow definition is published so it can be used by client modules
  4. Workflow definition can be marked as default to be the one used when creating new entities