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

Better error message handling when I miss a functionRef argument

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 1.40.0.Final
    • None
    • None
    • None
    • False
    • None
    • False
    • ---
    • ---
    • 2023 Week 21-23 (from May 22)

      As example:

       
      Given the following workflow:
       

      {
      "id": "aaa",
      "version": "0.1",
      "specVersion": "0.8",
      "name": "Workflow name",
      "description": "Workflow description",
      "start": "StartState",
      "functions": [

      { "name": "uniqueFunctionName", "operation": "sysout", "type": "custom" }

      ],
      "states": [
      {
      "name": "StartState",
      "type": "operation",
      "actions": [
      {
      "name": "uniqueActionName",
      "functionRef": {
      "refName": "uniqueFunctionName",
      "arguments":

      { "message": ".test" }

      }
      }
      ],
      "end": true
      }
      ]
      }

       
      If I remove message argument, I got a NPE on build:

      java.lang.NullPointerException
      at org.kie.kogito.serverless.workflow.parser.types.SysOutTypeHandler.fillAction(SysOutTypeHandler.java:39)
      at org.kie.kogito.serverless.workflow.parser.types.ActionTypeHandler.getActionNode(ActionTypeHandler.java:38)

      Is it possible to provide better error messaging?
       
       

              ftirados Francisco Javier Tirado Sarti
              ederignatowicz Eder Ignatowicz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: