Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-7564

Workflow with multiple exception handlers not working as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • Core Engine
    • None
    • False
    • None
    • False
    • Will be fixed with kogito-7557
    • Show
      see modified serverless-workflow-error-quarkus example
    • ---
    • ---

      Consider a workflow with multiple error definitions:

        "errors": [
          {
            "name": "odd number",
            "code": "java.lang.RuntimeException"
           },
           {
            "name": "bad request",
            "code": "HTTP:400"
           }
        ],
      

      and references to these errors in different nodes:

          {
            "name": "checkEven",
            "type": "operation",
            "actions": [
              {
                "name": "checkEvenAction",
                "functionRef": {
                  "refName": "isEven",
                  "arguments": {
                    "number": "$.number"
                  }
                }
              }
            ],
            "transition": "even",
            "onErrors": [
              {
                "errorRef": "odd number",
                "transition": "odd"
              }
            ]
          },
      

      and

          {
            "name": "publish",
            "type": "operation",
            "actions": [
              {
                "name": "publishAction",
                "functionRef" : {
                  "refName": "publishPerfectSquare",
                  "arguments": {
                    "type": "$.numberType",
                    "number": "$.number"
                }
                }
              }
            ],
            "end": true,
            "onErrors": [
              {
                "errorRef": "bad request",
                "transition": "setError"
              }
            ]
          },
      

      While the first exception is properly handled, the second one is not, and the process fails to proceed on the defined error transition.

              ftirados Francisco Javier Tirado Sarti
              rhn-support-mputz Martin Weiler (Inactive)
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: