Issue
- I go to: Control Panel → Configuration → Virtual Instances
- I create a new Virtual Instance
- I log in to the new instance
- I go to: Control Panel → Workflow
- I try to modify the Single Approver workflow or add a new workflow
- Result:
- In Portal 6.2 and DXP 7.2, you have no option to add a new workflow or modify the existing one (the buttons don't appear)
- In DXP 7.0 and 7.1, when you try to click 'Publish', an error message is displayed at the top of the screen ‘Error: An error occurred in the workflow engine.’
Environment
- Liferay Portal 6.2 (Fix Pack 170)
- Liferay DXP 7.0 (Fix Pack 82)
- Liferay DXP 7.1 (Fix Pack 12)
- Liferay DXP 7.2
Resolution
-
Users who publish (or edit) workflow definitions containing scripts can get access to any data within the reach of the JVM, such as data contained in a separate Virtual Instance of Liferay DXP itself.
-
Because of this far-reaching access, permission to create or edit workflow definitions is limited to Regular Administrators of the Default Virtual Instance.
-
For Liferay DXP 7.0+: We have added a System Setting with which you can provide this access to Administrators:
- Make sure you understand the access you’re granting these admins.
- Navigate to Control Panel → System Settings → Workflow → Workflow Definition.
- Check the box for the setting Allow Administrators to Publish and Edit Workflows.
-
For Liferay Portal 6.2: Add the following property to portal-ext.properties file:
workflow.company.administrator.can.publish=true
Additional Information
- Kindly refer to the official documentation: Workflow Definition Publication Permissions