ricardozanini opened a new issue, #2996:
URL: https://github.com/apache/incubator-kie-tools/issues/2996

   Having the following workflow:
   
   ```json
   {
       "id": "applicantworkflow",
       "name": "Applicant Workflow",
       "expressionLang": "jsonpath",
       "version": "1.0",
       "start": "HandleNewApplicant",
       "events": [
         {
           "name": "NewApplicantEvent",
           "source": "",
           "type": "applicants"
         },
         {
           "name": "ApplicantDecisionEvent",
           "source": "",
           "type": "decisions"
         }
       ],
       "states": [
         {
           "name": "HandleNewApplicant",
           "type": "event",
           "onEvents": [
             {
               "eventRefs": ["NewApplicantEvent"],
               "actions": []
             }
           ],
           "transition": "VerifyNewApplicant"
         },
         {
           "name": "VerifyNewApplicant",
           "type": "switch",
           "dataConditions": [
             {
               "condition": "{{ $.[?(@.salary >= 3000)] }}",
               "transition": "HandleApproved"
             },
             {
               "condition": "{{ $.[?(@.salary < 3000)] }}",
               "transition": "HandleDenied"
             }
           ],
           "defaultCondition": {
               "transition": "HandleDenied"
           }
         },
         {
           "name": "HandleApproved",
           "type": "inject",
           "data": {
             "decision": "Approved"
           },
           "end": {
             "produceEvents": [
               {
                 "eventRef": "ApplicantDecisionEvent"
               }
             ]
           }
         },
         {
           "name": "HandleDenied",
           "type": "inject",
           "data": {
             "decision": "Denied"
           },
           "end": {
             "produceEvents": [
               {
                 "eventRef": "ApplicantDecisionEvent"
               }
             ]
           }
         }
       ]
     }
   ```
   
   The generated YAML wrongly creates a `.spec.flow.start` object:
   
   ```yaml
       start:
         stateName: HandleNewApplicant
   ```
   
   And also in the `producedEvents.data`:
   
   ```yaml
   produceEvents:
       - data: null
          eventRef: ApplicantDecisionEvent
   ```
   
   The `data:null` is invalid in the tooling model.
   
   cc @fantonangeli @handreyrc we should align these tools somehow. I'd say to 
use the same JSON Schema to validate it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to