Joomla Publishing Worflow Project by Jan Jaracz

In the previous article we’ve talked about the goal of this project in general what are states, transitions and workflows. Now, let’s have a closer look on how it actually works.

Workflows

At the time of writing, the workflow engine is currently only available for the article manager. The entry point would be the "Workflows" list view, that can be found in the backend menu under: "Content > Workflows".

The "Joomla! Default" workflow you see there [reference indicator], mimics the old behaviour that we know from previous Joomla! versions, where articles can be un- / published, trashed and archived.

Besides the obligatory permission settings, a workflow consists a meaningful title and a description. The "Default" flag indicates that this workflow will be chosen when a new category was created. This means that if not changed, all articles within this category will adhere to that default workflow automatically.

Joomla Publishing Workflow

As you can see there is one default workflow which comes with fresh installation.

Joomla Publishing Workflow

Let's click "Manage" on the Joomla! Default workflow and take a look at the States.

States

Any given state needs to be matched to one of the three available "conditions" that an article can be in. Those are:

  • Published
  • Unpublished
  • Trashed

The five entries you see in the list should look familiar. You can think of it as looking under the hood if you will. To pick just one example, it seems obvious that an "Archived" article is matched to the "Published" condition.

Like in the Workflow before, we also need to mark a State as Default and then that state will be first one assigned to the item.

Joomla Publishing Workflow

 

Joomla Publishing Workflow

Transitions

Our workflow would not be complete without "States”, but we also need some form of ruleset that defines what state comes after the other. It’s where the Transitions come into place.

Joomla Publishing Workflow

For each transition you can specify access role, which group of administrators could run it. When you choose workflow to the category then each item assigned to it will start from default state and you will be able to trigger transition where state from is like in the item.

Joomla Publishing Workflow

User Story

As the admin you should follow this step if you want to use default or custom workflow:

  1. Create Category and assign it to workflow “Joomla! Default”
  2. Create Article and assign it to newly created category
    Now the article will have default state from that workflow (with workflow pre installed that is published)
  3. In the left side you will have select input with list of available transitions (in default workflow there should be all possible transition to unpublish, publish, trash, archive from any state)
  4. When you select one of it then the article’s state should change according to what you choose.

If you want to create new one you should follow these simple steps:

  1. Go to Workflows on the sidebar.
  2. Create new Workflow with name and status to published (Always first items on the list of states, transitions and workflows, has default state)
  3. When you will see new created workflow then hit manage on it in column States.
  4. Create new States with the names you want but you should remember to choose a condition of this state which is relevant to the name.
  5. When you have all states you want, then go to the transitions in the sidebar.
  6. Create new Transitions between newly created states and you can choose which group of admins could run it.

That’s it! After these steps you will be able to assign new created workflow to the category.

Joomla Publishing Workflow

And in the end, you’ll see this screen (I’m still working at improving it).

Joomla Publishing Workflow

Future of project

So at the beginning i should mention that i will continue building, for me that is not the end. We have a lot of ideas which we want to implement to deliver to you more useful tools with intuitive managing (so, all thoughts are welcome if you have some).

Of course I can not forget about my mentors who were with me all the time with huge amount of advances, who resolved all my issues that i had. I want to thank because without them i could not be at the moment where i am here.

That is the last one article of series publishing workflow on Google Summer Of Code.

See you soon at JWC!