Joomla 4 Workflow
By Tim Plummer
Joomla Australia
September 15th 2020
Workflow is a sequence of
steps a piece of content
passes from initiation to
completion.
Joomla 3 Content Workflow
Author Administrator
Content states in Joomla 3
What if we want more approval steps?
Author
Or maybe something more complex?
Can’t do that in Joomla 3
But let’s see what Joomla 4 can do
The Publishing Workflow
component is used to replace
static states (unpublished, published,
trashed and archived) with a more
generic approach.
This way you can easily
create a customized
workflow to manage your
articles within a component.
Terminology
State/Stage– published, unpublished, trashed, archived
Transitions– move one state to another
What if instead of content we built an app?
Lets do it, using only core Joomla 4 features
(no third party extensions)
Note that Joomla 4 is still in Beta, so don’t use
on live sites yet.
Create a new category
Also set access to registered so only logged in users can fill out form.
Create a custom fields group
Just a reminder that
Custom fields were added
to core Joomla in version
3.7 (April 2017)
Make sure they are assigned to the category and field group we created
Create custom fields
If you want to learn more about custom
fields, watch August 2020 presentation with
Marc Dechèvre on Joomla! Custom Fields
https://www.youtube.com/watch?v=qTayrSABbpg
Create user groups
• Create a user group for the different people who
will be interacting with this workflow
Where is my Workflow?
Out of the box,
Workflow feature is
turned off in Joomla 4
Enable Workflow feature
• Content->Articles->Options->Integration->Enable Workflow
Now you can see Workflows under Content
Add a new Workflow
Edit the Workflow Stages
Rename existing Stages if required
In our example, rename Basic Stage to Level 1 Helpdesk
Default = initial stage
Add workflow Stages
Set up the Workflow Transitions
Add your Transitions
• Give each a name, and decide which Stage can
transition to a specific stage.
Add your Transitions
• Set the publishing state for this transition
Add your Transitions
• Turn on email notification (if required), and choose who it goes to
Add your Transitions
Also decide who can move to next stage
Transitions
• Each Workflow step should have a stage
Set the workflow for your category
Check ACL Permissions
• Assign the appropriate permissions to the groups you created
• Content->Categories->Support Request->Permissions
Check ACL Permissions
Article Permissions (com_content)
• Adjust article permissions for your new groups
(especially edit custom field value)
Now add a menu item for front end
You only see this menu item if you are logged in
This looks too much like an article
Create Override for article form in your template
Customise as required
/yourtemplate/html/com_content/form/edit.php and customise look for this category
Note this is the geeking coding bit
that a regular Joomla user
wouldn’t be able to do. Maybe in
future there will be an easier way.
Create a My Support Requests view
Note: You can adjust what columns you see on the List Layouts tab.
My Leave Applications view
You could take this even further with an override and customise to include columns such as
workflow state
The view form looks pretty ordinary
Override the view form with alternate layout
Override the view form with alternate layout
/yourtemplate/html/com_content/article/default.php and rename as supportapp.php
Edit as required, then assign that layout to your menu item
Another geeking coding bit that
a regular Joomla user may not
be able to do.
Override the view form with alternate layout
You can also use Access Levels (optional)
• If you want to further restrict access, use
access levels which you can apply to menu
item and category
Set up some test users
Create at least one person for each role to test it out
Now let’s see it in action
Customer creates a Support Request. It goes to
Level 1 Helpdesk for review
Only transition (in this case status) is to send to
Level 1 Helpdesk
Level 1 Helpdesk step
When sent to helpdesk, they can reject, escalate,
complete, or request more information
Note if customer logs in, they don’t
see the helpdesk transition states
Or if Level 2 Support logs in, they
can’t reject, ask for more info or
complete, they can only escalate.
Level 2 support step
• Level 2 support can now resolve the issue and
transition the next state
Customer confirm step
• Customer can now reopen if issue is not
resolved, or mark as complete.
Support Request Complete
• No further action required, but record could be
deleted or archived later if needed
Limitations
• Can’t send transition emails to author, only groups or specific people
• Need coding skills to override form and view
• All the records are saved in com_content (Joomla articles)
• Users can see all records in My Support Requests view, not just their
own (can be fixed with layout override)
• Records can get stuck “checked out” to user
Questions
Tim Plummer
https://timplummer.com.au
@bfsurvey

Aujug 2020 joomla 4 workflow