Replies: 2 comments 2 replies
-
| Very valid points! I think the source of ambiguity is that there are multiple ways of doing flow control: i.e.  In my opinion: When  
 * skipping the output transformation simplifies the expression because otherwise one would have to handle both the raw task output ( | 
Beta Was this translation helpful? Give feedback.
-
| @matthias-pichler I agree with you concerning 1 and 2, but not regarding 3. IMHO, if the task is skipped, so should its  do:
  - registerUser:
      call: http
      with:
        uri: https://sample-api.com/users/register
        method: post
        body:
          firstName: John
          lastName: Doe
          email: john.doe@email.com
  - throwIfAlreadyRegistered:
      if: '.registration.outcome == "Failed" and .registration.statusReason == "User already exists"'
      set: {}
      then: end
  - sendConfirmationEmail:
      ...In above example, I'd personally expect the  | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello folks,
I'm not sure I have the right understanding of tasks transitions when they are
skipped.From my understanding of the docs, if the
ifcondition is not met, the task is skipped and its output becomes itsrawinput. Therefore, if I follow the logic of the data flow graph, the rest of the logic should apply and the flow directive should still be respected.For instance, given the tasks list:
If the workflow input is
keyword: foo,setFoois executed, thenconditionalFoois skipped and respecting its flow directive,finalTaskis executed, therefore the output of the workflow isanwser: final.If the workflow input is
keyword: bar,setBaris executed, thenconditionalBaris skipped and respecting its flow directive, the workflow ends, the output isbar: true.setFoois skipped but its flow directive is respected, thenconditionalFooand finalTaskis executed, therefore the output of the workflow isanwser: final. ThesetBar` "branch" is never executed as there is no flow directive to reach it.Is it the proper way of thinking about conditional tasks ?
As a side question, should the output transformation be skipped or not ? (orange or red arrow ?)

Beta Was this translation helpful? Give feedback.
All reactions