Legacy Knowledge Base
Published Jul. 2, 2025

Workflows - Supported Statuses

Written By

Rodrigo Paulino

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.

Description

Workflows on Liferay give the possibility of running assets like web content articles, wiki pages, or even users, through pre-determined review processes.  For this you can utilize workflow statuses.

Let's say, you, as an Administrator, want to have control over all the comments that are made in a single blog post. For that, you could setup a workflow definition of your choice that every comment will have to go through before being approved and finally published. So, when you create that review process using Liferay's Workflow, you must define steps that assign statuses to these incoming comments in order to determine the acceptance, or rejection, criteria for them (ie: denied, pending, incomplete, etc.).

Resolution

Liferay gives a set of statuses, "out-of-the-box", which you can find listed below or in our code's repository.  A supported status must be used and be set correctly otherwise, your workflow definition might fail to process the assets as you intended.

Here is an example of how to update the status correctly:

<script>
    <![CDATA[
        import com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil;
        import com.liferay.portal.kernel.workflow.WorkflowConstants;
 
 
 
 WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.getLabelStatus("approved"), workflowContext);
 ]]>
</script>
<script-language>groovy</script-language>

Note: If you misspell the status label like in the following, the asset will be set to status "any" by default:

<script>
    <![CDATA[
        import com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil;
        import com.liferay.portal.kernel.workflow.WorkflowConstants;
 
 
 
 WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.getLabelStatus("approve"), workflowContext);
 ]]>
</script>
<script-language>groovy</script-language>

List of Supported Workflow Statuses

  • "any";
  • "approved";
  • "denied";
  • "draft";
  • "expired";
  • "in-trash";
  • "inactive";
  • "incomplete";
  • "pending";
  • "scheduled";

Additional Information

For more information on how you can leverage Liferay's script engine to enhance the Workflow experience. please see: Leveraging the Script Engine in Workflow

Did this article resolve your issue ?

Legacy Knowledge Base