The Joomla team have been working hard on version 4. 

Here at Joomlashack, we've been writing about all the new features in Joomla 4, including the new admin template, media library and edit name click save and new.

I'm going introduce you to another new Joomla 4 feature: Workflows. This new extension allows you to approve content before it's published.

Keep in mind that Joomla 4 is only at the Alpha stage. A lot of work remains to be done before Joomla 4 is ready for production use. However, this Content Workflow feature is really great!

About the Content Workflow Team

The Workflows project is the brainchild of Benjamin Trenkle from Germany.

He submitted the concept as a Google Summer of Code project in 2017. One of the students implemented the basics, working with Benjamin and four other developers as mentors. In November last year, Benjamin and one of his students gave a presentation of the workflow at the Joomla World Conference in Rome.

In May 2018, Benjamin presented the workflow at JandBeyond in Germany:

You can find the current Workflows  Project team at Joomla Volunteers Portal.


Get Ready to Test Workflows

The Workflows is a new feature in version Alpha 5 of Joomla 4. Before you can test the Workflows extension, you do need to do some set up. None of these steps will be too new to you if you've used earlier versions of Joomla.

First, download Joomla 4 Alpha 5 nightly build and install Joomla 4 using this package. You can also create a Joomla 4 alpha site at http://launch.joomla.org.

Second, create two user groups under the Registered parent group. Use these names for the new groups:

  • Blog Posters.
  • Blog Approvers.

blog poster groups

Third, we'll create two user accounts:

  • Assign one user to the Blog Posters user group.
  • Assign the other user to the Blog Approvers user group.

Finally, it's time to create a way for users to submit articles:

  • Create an article category called Blog.
  • Create a menu link using the "Menu Item Type" called "Create Article".
  • Make sure your site has the Login module published on the front of your site, so the users can log in and submit articles.

Here's how my new Joomla 4 site looked with the "Create Article" menu link and the Login module:

new j4 site


About Our Publishing Workflow

For this introductory tutorial, we'll create a very basic Joomla content publishing scenario. The workflow will consist of four steps:

  1. Content creation: the user in the Blog Posters group will create blog posts.
  2. The Workflows component will automatically assign a new post to a publishing workflow stage. We'll call this stage New blog post, unpublished.
  3. The Workflows component will email the user in the Blog Approvers group about the newly arrived post.
  4. Your blog approver will review and publish the post.

Let's see how to set up this work in Joomla 4 ...


Step #1. Enable Email Notifications

The workflow process relies on email notifications, so we need to enable those before we begin.

  • In the user profiles of both users, make sure the Receive System Emails setting is on Yes.
  • In the Content - Joomla plugin, set the Email on transition execution option to Yes.

content plugin


Step #2. Workflow and Stages

  • In your Joomla 4 control panel, click Content in the left menu.
  • Click Workflows:

click workflows

  • You will be taken to the Workflows Lists screen.
  • Click the green New button:

click new

  • Enter Blog Workflow into the Name field.
  • Click Save & Close.

enter workflow name click save close

Next, we'll create the two publishing workflow stages.

  • While on the Workflows List screen, click on the circle with the number 4 under the Stages column:

click on the number under the stages column

  • You will arrive on the Blog Workflow: Stages List screen. Click Published:

click published

  • Change the name to "Publish new blog post".
  • Click Save & New:

edit name click save and new

  • For the new publishing stage, enter the name New blog post, unpublished.
  • Make sure that Condition of items in this stage parameter is set to Unpublished:

second stage

  • Set the Default option to Yes.
  • Click Save & Close.
  • You should now see both of your new stages listed. Good job! You now have a publishing workflow and its two stages created.

two new publishing stages listed


Step #3. Transitions

Now we'll create what the Workflows component calls "Transitions". A transition is what moves a blog post from one publishing stage of the workflow to the next.

  • Go to Content > Workflows.
  • Under the Transitions column for the Blog Workflow, click on the little circle with the number 4:

click transitions for blog workflow

  • You will be taken to the Blog Workflow: Transitions List screen. Click New:

click new to create transition

  1. Enter Approve/Publish into the Name field.
  2. Select the New blog post, unpublished for the Current Stage option.
  3. Select the Publish new blog post for the Target Stage option.

12 set name current and target stages

  • Go to the Permissions tab.
  • Set the Execute Transition for the Blog Approvers user group to Allowed.
  • Click Save and Close.
  • You will see your new transition listed on the Blog Workflow: Transitions List.

13 new transition listed


Step #4. Access Control

At this point, we have the Blog Workflow, the two stages, and the transition.

Next, let's make sure that the blogging team members have the correct content permissions.

  • Go to Content > Categories > Blog.
  • Under the Workflow tab, select Blog Workflow:

blog workflow

  • Go to the Permissions tab.
  • Select Allowed for the Create and Edit user actions for the Blog Posters Joomla user group.

blog posters group permissions for blog category

  • Next, select the Allowed for the Delete, Edit, Edit State and Edit Own user actions for the Blog Approvers user group.
  • Click Save & Close.

Step #5. Test the Workflow

Well done! You just completed your blog publishing workflow.

Now it's time to test the workflow:

  • Log in the front of your site as the user in the Blog Posters group.
  • Click "Create Article" and submit a blog post.
  • The article will get the New blog post, unpublished status in the admin area.
  • The article will also get the Unpublished status on the site's frontend.
  • The user from the Blog Approvers group will get an email notification. They can now log in and publish the post.

More on Joomla 4

Have you tried Joomla 4? Do you have any thoughts or ideas? Leave them in the comments below ...


About the author

Born from a Ukrainian mother and Russian father, Alex lives in the United Kingdom. Alex is a self-taught Microsoft Certified Professional. He enjoys learning Joomla and helping web site administrators make the most of it.