ricardozanini commented on issue #3337:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/issues/3337#issuecomment-1866663231

   Like this?
   
   ```json
   {
     "id": "callback",
     "version": "1.0",
     "name": "Workflow Callback example",
     "description": "An example of how to use callback state",
     "errors": [
       {
         "name": "execution error",
         "code": "java.util.concurrent.CompletionException"
       }
     ],
     "start": "waitForEvent",
     "events": [
       {
         "name": "resumeEvent",
         "source": "",
         "type": "resume"
       },
       {
         "name": "waitEvent",
         "source": "",
         "type": "wait"
       },
       {
         "name": "resumeEvent2",
         "source": "",
         "type": "resume2"
       },
       {
         "name": "waitEvent2",
         "source": "",
         "type": "wait2"
       }
     ],
     "functions": [
       {
         "name": "printInstanceId",
         "type": "custom",
         "operation": 
"service:java:org.kie.kogito.examples.PrintService::printKogitoProcessId"
       }
     ],
     "states": [
       {
         "name": "waitForEvent",
         "type": "callback",
         "action": {
           "name": "publishAction",
           "eventRef": {
             "triggerEventRef": "resumeEvent",
             "data": "{move: \"This is the initial data in the model\"}"
           }
         },
         "eventRef": "waitEvent",
         "eventDataFilter": {
           "data": ".result",
           "toStateData": ".move"
         },
         "onErrors": [
           {
             "errorRef": "execution error",
             "end": true
           }
         ],
         "transition": "waitForEvent 2"
       },
       {
         "name": "waitForEvent 2",
         "type": "callback",
         "action": {
           "name": "publishAction",
           "eventRef": {
             "triggerEventRef": "resumeEvent2",
             "data": "{move: \"This is the initial data in the model\"}"
           }
         },
         "eventRef": "waitEvent2",
         "eventDataFilter": {
           "data": ".result",
           "toStateData": ".move"
         },
         "onErrors": [
           {
             "errorRef": "execution error",
             "end": true
           }
         ],
         "transition": "finish"
       },
       {
         "name": "finish",
         "type": "operation",
         "actions": [
           {
             "name": "printInstanceId",
             "functionRef": {
               "refName": "printInstanceId"
             }
           }
         ],
         "end": true
       }
     ]
   }
   ```


-- 
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