diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/README.md index 0688f1e701..9560bb21e2 100644 --- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/README.md @@ -79,7 +79,7 @@ Should return something like this ("id" will change) "id": "b1e8ce8d-2fc5-4d39-b3b3-6f7dddbb1515", "workflowdata": { "shouldCompensate": true, - "compensated": "true" + "compensated": true, "compensating_more": "Real Betis Balompie" } } diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/compensation.sw.json b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/compensation.sw.json index 780c536052..9f6ab1fdfd 100644 --- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/compensation.sw.json +++ b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/compensation.sw.json @@ -3,7 +3,15 @@ "version": "1.0", "name": "Workflow Error example", "description": "An example of how compensation works", + "specVersion": "0.8", "start": "printStatus", + "functions": [ + { + "name": "PrintOutput", + "type": "custom", + "operation": "sysout" + } + ], "states": [ { "name": "printStatus", @@ -32,7 +40,10 @@ "compensate": false } } - ] + ], + "defaultCondition": { + "end": true + } }, { "name": "compensating", @@ -50,19 +61,39 @@ "data": { "compensating_more": "Real Betis Balompie" }, - "end" : true + "end": true }, { "name": "finish_compensate", "type": "operation", - "actions": [], + "actions": [ + { + "name": "finish_compensate_sysout", + "functionRef": { + "refName": "PrintOutput", + "arguments": { + "message": "completed" + } + } + } + ], "end": true }, { "name": "finish_not_compensate", "type": "operation", - "actions": [], + "actions": [ + { + "name": "finish_not_compensate_sysout", + "functionRef": { + "refName": "PrintOutput", + "arguments": { + "message": "completed" + } + } + } + ], "end": true } ] -} +} \ No newline at end of file