Comala Workflows is now Comala Document Management. Click here for the latest documentation.



In this lesson we're going to look at states. States are like milestones in your process.

In our simple content production process, there's just three states:

  • Editing – content is created or edited
  • Review – someone checks the content and decides if it can be published
  • Publish – the final, published state of our content

Let's get started...

Edit workflow

The workflow we made in Lesson 1 - Templates had two states – In progress and Approved – so we're going to have to make some changes to our workflow.

From the Page Tools Menu, choose Edit workflow:

Workflow Inspector

You'll see the Workflow inspector appear, like this:

As you can see, there's the two states – In progress and Approved – in the flowchart.

The arrow lines between them are transitions, which allow you to Select a state in the Workflow Popup. We'll learn about those in the next lesson.

Inspect the states

While we're here, we might as well test out the Workflow inspector.

Choose the Approved state in the flowchart – you'll see a sidebar appear with some information about it.

As we progress through the lessons, you'll see the flowchart change and more information will appear in the sidebar when you examine a state.

Editing markup

To edit a workflow, choose the Edit button, or choose the Markup tab – both do the same thing.

In the Markup tab, you'll see the Macros that define the workflow, something like this:

{workflow:name=Custom states workflow}
   {state:In progress|taskable=true}

What you're looking at is Macro notation – the language of Comala Workflows.

It should be easy to see what's going on here:

  • There's the workflow, named Custom states workflow
  • And, inside that workflow, there are two states – In progress and Approved
  • Each of the states is taskable, meaning that users can Create a task if the workflow is in one of those states

So, let's edit the markup to get our three desired states: Editing, Review and Published

You should end up with this on the Markup tab:

{workflow:name=Simple Content Production Process}

Choose the Save button to save your changes.

Test it

Choose the View Page button at the top of the screen to go back to your page.

You'll notice that the Workflow Status Bar is showing either  In progress or  Approved.

That's because those states no longer exist in the workfow, so it has become confused (hence the grey circle). When it's confused, the workflow won't guess at which state it should be in.

To fix that, open the Workflow Popup and you'll be able to Select a state:

  • Choose the Editing state from the list, and then choose Submit
  • You should now see  Editing in the Workflow Status Bar.

Test out the new workflow, and when you're ready move on to the next lesson: