Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-4062

Use Trigger node action in business-central after failed async node execution leads to incorrect process status

    XMLWordPrintable

Details

    • False
    • False
    • Hide

      The trigger method creates a new NodeInstance for the triggered node, which is still active when the process reaches the end node.

      Manually deleting this NodeInstance using the Admin REST API before triggering the node results in correct behavior at process end:

      curl -X DELETE "http://localhost:8080/kie-server/services/rest/server/admin/containers/wih-project_1.2/processes/instances/4/nodeinstances/1" -H "accept: application/json"
      

      Caveats: This requires knowledge of the internals of the process instance (the NodeInstanceId) and the operation cannot be triggered from within business-central.

      Using the Admin REST API, the issue can be avoided by executing the re-trigger endpoint instead of the trigger endpoint (requires knowledge about NodeInstanceId).

      Show
      The trigger method creates a new NodeInstance for the triggered node, which is still active when the process reaches the end node. Manually deleting this NodeInstance using the Admin REST API before triggering the node results in correct behavior at process end: curl -X DELETE "http://localhost:8080/kie-server/services/rest/server/admin/containers/wih-project_1.2/processes/instances/4/nodeinstances/1" -H "accept: application/json" Caveats: This requires knowledge of the internals of the process instance (the NodeInstanceId) and the operation cannot be triggered from within business-central. Using the Admin REST API, the issue can be avoided by executing the re-trigger endpoint instead of the trigger endpoint (requires knowledge about NodeInstanceId).
    • Hide

      Using the attached reproducer, this can be reproduced either in business-central, or just by calling the matching Admin REST API endpoints (see script inside the reproducer). Here are the steps for the business-central approach:

      1. Unzip case03091622-reproducer.zip and import the bc/wih-project project
      2. Build & Deploy
      3. Start an instance of the flow process without defining a value for the flag variable
      4. The process execution will result in an exception during the async WIH execution
      5. Define a value for the flag variable
      6. Navigate to the process diagram, select the CustomWorkItemHandler node
      7. CLick Trigger in the Node Actions box
      Show
      Using the attached reproducer, this can be reproduced either in business-central, or just by calling the matching Admin REST API endpoints (see script inside the reproducer). Here are the steps for the business-central approach: Unzip case03091622-reproducer.zip and import the bc/wih-project  project Build & Deploy Start an instance of the flow process without defining a value for the flag variable The process execution will result in an exception during the async WIH execution Define a value for the flag variable Navigate to the process diagram, select the CustomWorkItemHandler node CLick Trigger in the Node Actions box

    Description

      A process containing a custom WIH in an async node fails to execute properly (eg. due to missing data). After the root cause is fixed, the user navigates to the process diagram, selects the failed node and hits the "Trigger" button in the Node Actions box.

      Expected behavior: the process continues its execution, and upon reaching the end state, is ended properly.

      Actual behavior: the process continues its execution, the logging indicates the process is ended, however the state is still open (process instance still visible as active, records from ProcessInstanceInfo not deleted)

      Attachments

        Activity

          People

            rhn-support-egonzale Enrique Gonzalez Martinez (Inactive)
            rhn-support-mputz Martin Weiler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: