Legacy Knowledge Base
Published Jun. 30, 2025

Single Approver Workflow: how to bypass for admin role

Written By

Sorin Pop

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • We have implemented a single approver workflow for content review.

    The requirement is to bypass this workflow for users with the Admin role, allowing them to directly create new content and publish it without going through the workflow process.

    For users without the Admin role, the content should follow the regular workflow approval process.

    How should this be approached?

Environment

  • DXP

Resolution

  • This is possible to do by writing your workflow definition accordingly. For example with a logic like this: if the submitter user has role Administrator then bypass the usual workflow stages (bypass the manual approval task, etc.). You could use a Condition node for this, so that your workflow executes a different branch if the submitter user is an admin. So the idea here is that you don't "deactivate" the workflow per se. The workflow will still be triggered, but you write it in such a way that it does nothing (it goes directly to the Approved status node) in case the modification was submitted by and admin user.
  • You can add "auto approve" logic to your script (e.g.  you could probably encapsulate into a java class and then invoke from the script to keep it simpler.)

    The conditional workflow script in the docs shows how to check for a tag before sending either to legal or send on its normal course. You would just be checking for "was last modified by an admin" and, if so, just send it straight to the approved state.

    This would make it a) automatic and b) solve their issue w/o changing Liferay at all.

  • Please find attached a very simple and abstract example of such a workflow with a very simple Condition script added and a short demo video of how it works. 
Did this article resolve your issue ?

Legacy Knowledge Base