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

Fix parent workflow abandon process

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10, 2021.0
    • Fix Version/s: 10.10-HF62, 2021.21
    • Component/s: Workflow
    • Release Notes Summary:
      A workflow can now be canceled after one of its subworkflow has been canceled
    • Backlog priority:
      750
    • Sprint:
      nxplatform #60, nxplatform #61
    • Story Points:
      5

      Description

      When a workflow uses a sub-workflow:

      • If the parent workflow is canceled, the sub-workflow is also canceled
        • They both disappear from the UI
      • If the sub-workflow is canceled, the parent workflow is not canceled 
        • The parent workflow remains stuck on the UI
        • GET /api/v1/workflow/<parent-workflowInstanceId> returns "state": "running"

      In GraphNode.java, the State enum has a method public static State fromString(String s) in which the value "canceled" is passed. However, this value doesn't exist in the collections of constants for State, so a java.lang.IllegalArgumentException is thrown (cf Outcome). The value "canceled" seems to come from the ElementLifeCycleState enum in DocumentRouteElement.java.

      Repro steps
      To help with the repro, just drop the attached jar into nxserver/plugins and restart Nuxeo. This jar corresponds to the tag "issue-with-parent-workflow", branch feature/workflow, in my cchampain's Sandbox.

      1. Click on "Start process" for a domain
      2. Start the workflow "parent workflow"
      3. Go to Tasks
      4. Click on "Validate", this will start the sub-workflow
      5. Click on "Abandon" for the sub-workflow
      6. Click on "Abandon" for the parent workflow

      Outcome
      It seems impossible to cancel the parent workflow on the UI, even after a page refresh. An error is thrown in the chrome dev console when clicking on "Abandon":

      {"entity-type":"exception","status":400,"message":"java.lang.IllegalArgumentException: canceled"}

      Expected outcome
      The parent workflow should be canceled and removed from the UI
       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

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