Workflow

Cloud CMS provides an enterprise workflow engine that lets teams work together via coordinated tasks. A workflow is a customizable business process that you define and describes a series of steps and activities to be performed by your team members. Workflows are generally used to control the lifecycle state (approval and rejection) of one or more content items or documents.

With workflow in place, documents are routed from user to user. Users optionally receive notifications via email and see tasks assigned to them in their task inbox. Users work on tasks, make modifications to documents and document metadata, assign tasks to other team members, and transition tasks by approving or rejecting them.

The Cloud CMS workflow engine is a high powered subsystem that was built from the ground up on top of Amazon AWS and MongoDB. It was inspired by traditional enterprise BPM engines that the engineers were familiar with, such as JBoss JBPM5, Alfresco's Activiti BPM and Adobe/Day Software's CQ5. It improves on these by simplifying things and integrating naturally to Cloud CMS via a JSON-oriented approach.

Why workflow?

Some folks who are not familiar with the concept of workflow might ask why it is necessary.

Typically, workflow is used whenever you want to capture some kind of process or sequence of activities that must be performed or signed off on before a document is approved.

For example, you might need to approve a series of articles that you're working on for your web site. If you set up a workflow, you can specify the sequence of activities that need to be performed, including authoring, review and final approval. These tasks might be performed by different people on different teams. A workflow process gives you a way to collect the sequence of steps as well as the history of each activity along the way so that anyone working on the article can see what happened, review comments and make updates.

Workflows are role-based which means that you can not only sequence the tasks but you can also finely describe who can work on each task and what role they have. Roles give you a way to limit or expand functionality depending on what capabilities you intend each participant to have along the way.

Core Concepts

In explaining workflow, let's first take a look at the following things:

  • Workflow Models
  • Workflow Instances
  • Workflow Tasks
  • Workflow Payload Resources
  • Workflow Comments
  • Workflow History Item
  • Workflow Events
  • Workflow Event Handlers

A workflow model is a definition of a workflow consisting of a full set of instructions on how content should be routed between participants or activities on its way toward completion. A workflow model is similar to a blueprint describing the sequence of steps to be taken.

A workflow instance is a running workflow that has been started. Each instance runs a workflow model's instructions from start to end. A workflow instance maintains properties (data), attached payload resources (content) and other lifecycle state.

A workflow payload resource is a piece of content (a content node) that has been attached to a workflow instance. Every workflow instance can have zero or more payload resources. You can also start workflows that don't have any payload resources if you want to.

A workflow task is an assignment that is created when a workflow transitions from one state to the next. The task holds point-in-time information about an activity to be completed. Each task holds its own copy of the workflow's properties (data) and attached payload resources (content) so that it can be worked on in isolation. When a task completes, the data and content are merged back into the workflow instance. And then the workflow continues on.

A workflow comment can be created at any time and is attached to both a workflow task and a workflow instance. This lets you see comments made for a specific task or comments made across the entire workflow.

A workflow history item is an automatically managed object that gets created in the background every time someone interacts with a workflow. It supplies a record of every change to the workflow task and workflow instance, letting you see a perfect history of when people modified properties (data), updated payload resources (content), added comments, fired actions or transitioned between workflow tasks.

A workflow event is a lifecycle event that is raised as the workflow starts, ends or moves from task to task. There are a number of potential events that are raised and each workflow model has the opportunity to render one or more workflow handlers to optionally handle these events.

A workflow event handler is an event listener that hears when a workflow event is raised and then does something. These are a number of workflow event handlers available out-of-the-box including handlers for web hook callouts (over HTTP), email and Cloud CMS actions. You configure workflow event handlers with a little bit of JSON.