Skip to content

exit flow directive isn't validated properly #67

@JBBianchi

Description

@JBBianchi

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy