Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-70575

If a workflow defines assignment by a Resource Action, non-individually scoped Roles with permission for that specific Resource Action are not assigned to the task



      Kaleo Workflows allow users to be assigned by Resource Actions. For example, if a Role defines permissions for UPDATE on Message Boards Messages, we can adjust the workflow to set Assignments to any user that has the UPDATE resource action.

      Although this makes sense from the documentation and on a theoretical basis, the problem is that if a workflow defines assignment by a specific Resource Actions, users with that specific Resource Actions permissions are not assigned to the task.


      Steps to reproduce:
      1. Start up the portal
      2. Sign in as [email protected]
      3. Create a new Role called "ADD Role"

      • Define Permissions > Search Message Boards
      • Applications > Message Boards
        • Resource Permissions - Messages
          • Check "Add Message"

      4. Create a new Role called "UPDATE Role"

      • Define Permissions > Search Message Boards
      • Applications > Message Boards
        • Resource Permissions - Message Boards Message
          • Update

      5. Create a new user called [email protected]

      • Change the user's password
      • Grant site membership to Liferay DXP (default site)
      • Grant "ADD Role" role

      6. Create a new user called [email protected]

      • Change the user's password
      • Grant site membership to Liferay DXP (default site)
      • Grant "UPDATE Role" role

      7. Add Message Boards portlet to Liferay DXP site's Welcome Page
      8. In Control Panel > Configuration > Workflow Definitions, upload the attached "workflow.xml"

      • This is a single approver workflow where we...
        • A. Notify the UPDATE Role via a User Notification – note you may need to change the role-id to the appropriate role-id of the role created in step 4.
        • B. Assign the UPDATE Role via Resource Actions – lines 116-120
        • IMPORTANT: The reason why we cannot just simply copy and paste the XML into the Source of Kaleo Designer, and save it is because if we add the "UPDATE" resource action to the Resource Action Assignments field, it gets stripped/never gets saved. There seems to be a bug in this regard, as well.

      9. Go Control Panel > Configuration > Workflow Configuration
      10. Next to Message Boards Message, click the Options (kebab) button > Edit
      11. Select the Update workflow that was uploaded in step 8
      12. In another browser, sign in as [email protected]
      13. Add a new thread to Message Boards portlet
      14. In another browser, sign in as [email protected]
      15. In the product menu, click on the User name (UPDATE) > My Workflow Tasks

      Expected Result:
      Task to review submitted message board thread is available in My Workflow Tasks.

      Actual Results:
      Nothing is present in My Workflow Tasks. The expectation is that because the UPDATE user has the Update Message Boards Message resource action, they should be assigned based on the workflow rules.

      commit 2454aba240316410d0bef87656a1cc382a8ee1e1

      commit 3ac2d4182b99ea40ec074c63cea39d119463e191

      You can find the roleId from the database or from the URL while editing the role
      Example: http://localhost:8080/group/control_panel/manage?p_p_id=com_liferay_roles_admin_web_portlet_RolesAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_mvcPath=%2Fedit_role_permissions.jsp&_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_cmd=view&_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_tabs1=roles&_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_tabs2=current&_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_backURL=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3Dcom_liferay_roles_admin_web_portlet_RolesAdminPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_mvcPath%3D%252Fview.jsp%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_type%3D1%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_displayStyle%3Dlist%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_orderByCol%3Dtitle%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_orderByType%3Dasc%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_keywords%3D%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_navigation%3Dall%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_cur%3D1%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_delta%3D20%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_description%3D%26_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_name%3D&_com_liferay_roles_admin_web_portlet_RolesAdminPortlet_roleId=31250

      In the last part of the URL we can see roleId=31250




            victor.ware Victor Ware
            michael.bowerman Michael Bowerman
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            0 Vote for this issue
            0 Start watching this issue


              Days since last comment:
              4 years, 18 weeks, 1 day ago


                Version Package
                7.0.0 DXP FP12
                7.0.0 DXP SP2
                7.0.3 CE GA4