forked from apache/incubator-kie-kogito-runtimes
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…pache#3578) * [Fix apache#3571] Adding onErrors support for starting event state * [Fix apache#3571] Adding IT test
- Loading branch information
1 parent
8cdac01
commit 6927a44
Showing
6 changed files
with
129 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...arkus-serverless-workflow-integration-test/src/main/resources/eventStartWithError.sw.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"id": "startEventError", | ||
"version": "1.0", | ||
"name": "Workflow event test", | ||
"description": "An test of a starting event with error on action", | ||
"start": "waitForEvent", | ||
"events": [ | ||
{ | ||
"name": "startEvent", | ||
"source": "", | ||
"type": "start" | ||
} | ||
], | ||
"errors": [ | ||
{ | ||
"name": "odd number", | ||
"code": "Odd situation" | ||
} | ||
], | ||
"functions": [ | ||
{ | ||
"name": "publishEvenError", | ||
"type": "asyncapi", | ||
"operation": "specs/callbackResults.yaml#sendEvenError" | ||
}, | ||
{ | ||
"name": "isEven", | ||
"type": "custom", | ||
"operation": "service:java:org.kie.kogito.workflows.services.EvenService::isEven" | ||
} | ||
] | ||
, | ||
"states": [ | ||
{ | ||
"name": "waitForEvent", | ||
"type": "event", | ||
"onEvents": [ | ||
{ | ||
"eventRefs": [ | ||
"startEvent" | ||
], | ||
"actions": [ | ||
{ | ||
"name": "actionWithError", | ||
"functionRef": { | ||
"refName": "isEven", | ||
"arguments": { | ||
"number": ".number" | ||
} | ||
} | ||
} | ||
] | ||
|
||
} | ||
], | ||
"onErrors": [ | ||
{ | ||
"errorRef": "odd number", | ||
"transition": "PublishError" | ||
} | ||
], | ||
"end":true | ||
}, | ||
{ | ||
"name": "PublishError", | ||
"type": "operation", | ||
"actions": [ | ||
{ | ||
"name": "publishEvenError", | ||
"functionRef": "publishEvenError" | ||
} | ||
], | ||
"end": "true" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters