Closed
Description
What happened:
When trying to use the exit
flow directive, the validation process of the SDK returns an error.
What you expected to happen:
The exit
flow directive to be valid.
How to reproduce it:
- Try to validate the following example from the spec:
document:
dsl: '1.0.0-alpha5'
namespace: test
name: sample-workflow
version: 0.1.0
do:
- processOrder:
switch:
- case1:
when: .orderType == "electronic"
then: processElectronicOrder
- case2:
when: .orderType == "physical"
then: processPhysicalOrder
- default:
then: handleUnknownOrderType
- processElectronicOrder:
do:
- validatePayment:
set:
validate: true
- fulfillOrder:
set:
status: fulfilled
then: exit
- processPhysicalOrder:
do:
- checkInventory:
set:
inventory: clear
- packItems:
set:
items: 1
- scheduleShipping:
set:
address: Elmer St
then: exit
- handleUnknownOrderType:
do:
- logWarning:
set:
log: warn
- notifyAdmin:
set:
message: something's wrong
Which results in the following errors:
The workflow definition is not valid.
/do[1]/processElectronicOrder/then:
Unreachable or undefined task
/do[2]/processPhysicalOrder/then:
Unreachable or undefined task
Metadata
Metadata
Assignees
Labels
No labels