-
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.
-
Tags:
-
Backlog priority:700
-
Upgrade notes:
-
Sprint:nxplatform #45, nxplatform #46
Steps to reproduce:
- deploy the jar provided in the first comment to $NUXEO/nxserver/plugins
- navigate to the JSF UI
- navigate to a File document
- start the workflow SUPTHI-22
- observe that 2 tasks approve-1 and approve-2 have been created
- from now, you need 2 different browsers which are open on the Summary view of the File document
- with browser 1, set a value for "Ma Var" in task "approve-1" and validate
- with browser 2, set a value for "Ma Deuz Var" in task "approve-2" and validate
- observe that an error is displayed
- 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
- Is referenced in