Legacy Knowledge Base
Published Jul. 2, 2025

After upgrading to DXP 7.1+, items in Workflow can't be rejected

Written By

Michael Warren Young

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

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

Issue

  • After upgrading from Liferay Portal 6.X to Liferay DXP 7.1+, we are no longer able to reject items in workflow using the default Single Approver workflow
  • Items can still be approved, but if we attempt to reject it we see this error in the logs:
ERROR [liferay/kaleo_graph_walker-2][KaleoActionExecutorImpl:69] com.liferay.portal.workflow.kaleo.runtime.action.executor.ActionExecutorException: com.liferay.portal.kernel.scripting.UnsupportedLanguageException: javascript
com.liferay.portal.workflow.kaleo.runtime.action.executor.ActionExecutorException: com.liferay.portal.kernel.scripting.UnsupportedLanguageException: javascript

Environment

  • Liferay DXP 7.1+ that was upgraded from Liferay Portal 6.2 previously

Resolution

  • The Default Single Approver workflow in Liferay Portal 6.2 uses Javascript to set the Rejected status (line 53):
<script-language>javascript</script-language>

The Javascript scripting module is deprecated in Liferay DXP:

  • The language for the default Single Approver workflow must be updated to Groovy, as this is the only supported scripting language for Liferay DXP.
  • To resolve this for all new items in the workflow, you can replace the Single Approver workflow's Source with the attached XML.
  • To resolve this for existing workflow items, you must update the items in the database so that the script language is changed to Groovy and the items are then rejected once again in the workflow.
  • Updating existing items can be done with a Groovy script in Liferay's scripting console. It should invoke an ActionableDynamicQuery to both find and then update the applicable items. See the attached .groovy file.

Additional Information

  • This script update is not handled by the upgrade process because Administrators are free to modify the Single Approver workflow and changing it during the upgrade would impact users who have done so (See LPS-82595)
  • If your environment was originally running Liferay Portal 6.1 or lower, you may need to account for two additional changes:
    1. The Approve action may need to be updated to Groovy as well (this would be handled by using the attached .XML).
    2. The Site Content Reviewer role in the attached XML may need to be changed to Community Content Reviewer because the role for workflow in 6.1 was called Community Content Reviewer.
Did this article resolve your issue ?

Legacy Knowledge Base