Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30589

Fix workflow freeze when 2 parallel tasks are completed at the same time by 2 different users

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF54, 2021.10
    • Component/s: Workflow
    • Release Notes Summary:
       A warning is logged when assigning an unauthorized workflow global variable instead of throwing an exception.
    • Backlog priority:
      700
    • Upgrade notes:
      Hide

      Assigning an unauthorized workflow global variable won't throw an exception anymore but log a warning. The assignment is ignored.

      Show
      Assigning an unauthorized workflow global variable won't throw an exception anymore but log a warning. The assignment is ignored.
    • Sprint:
      nxplatform #45, nxplatform #46

      Description

      Steps to reproduce:

      1. deploy the jar provided in the first comment to $NUXEO/nxserver/plugins
      2. navigate to the JSF UI
      3. navigate to a File document
      4. start the workflow SUPTHI-22
      5. observe that 2 tasks approve-1 and approve-2 have been created
      6. from now, you need 2 different browsers which are open on the Summary view of the File document
      7. with browser 1, set a value for "Ma Var" in task "approve-1" and validate
      8. with browser 2, set a value for "Ma Deuz Var" in task "approve-2" and validate
      9. observe that an error is displayed
      10. in the logs, there is this exception
        2021-09-06T18:47:07,976 ERROR [RoutingTaskActionsBean] org.nuxeo.ecm.platform.routing.api.exception.DocumentRouteException: You don't have the permission to set the workflow variable maVar
        org.nuxeo.ecm.platform.routing.api.exception.DocumentRouteException: You don't have the permission to set the workflow variable maVar
        	at org.nuxeo.ecm.platform.routing.core.impl.GraphNodeImpl.setAllVariables(GraphNodeImpl.java:355) ~[nuxeo-routing-core-10.10-HF49.jar:?]
        	at org.nuxeo.ecm.platform.routing.core.impl.GraphRunner.resume(GraphRunner.java:122) ~[nuxeo-routing-core-10.10-HF49.jar:?]
        	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteElementImpl.resume(DocumentRouteElementImpl.java:84) ~[nuxeo-routing-core-10.10-HF49.jar:?]
        	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingEngineServiceImpl.resume(DocumentRoutingEngineServiceImpl.java:50) ~[nuxeo-routing-core-10.10-HF49.jar:?]
        	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl$CompleteTaskRunner.run(DocumentRoutingServiceImpl.java:369) ~[nuxeo-routing-core-10.10-HF49.jar:?]
        	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:119) ~[nuxeo-core-api-10.10-HF49.jar:?]
        	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl.completeTask(DocumentRoutingServiceImpl.java:336) ~[nuxeo-routing-core-10.10-HF49.jar:?]
        	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl.endTask(DocumentRoutingServiceImpl.java:866) ~[nuxeo-routing-core-10.10-HF49.jar:?]
        	at org.nuxeo.ecm.platform.routing.web.RoutingTaskActionsBean.endTask(RoutingTaskActionsBean.java:235) [nuxeo-routing-web-10.10-HF32.jar:?]
        

      From this step, the workflow is stuck and one can only abandon it.

      Expected behavior:

      • the second task is validated with an exception and the workflow can continue
      • or the second task is not validated because of an exception and the user needs to refresh the page to validate its task

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.