blob: b876f7ce793a04951603dfb0f861394d05452ae3 [file] [log] [blame]
{
"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"
}
],
"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": "finish"
},
{
"name": "finish",
"type": "operation",
"actions": [
{
"name": "printInstanceId",
"functionRef": {
"refName": "printInstanceId"
}
}
],
"end": true
}
]
}