Skip to content

Clarification on "set" task output #1015

Answered by cdavernas
alvin asked this question in Q&A
Discussion options

You must be logged in to vote

Should a "set" task's mutations be the output of a task or should they mutate $context or ?

The set task mutates its own input. If you do not configure output, its mutated input will become the output of the task.

Basically -- does this scenario express something true about the spec or not?

No, the assumption made in your scenario, as far I understand it, is wrong.

As a matter of fact, the result of the setValues task, without output configuration, should be (given its input was {} and the $workflow.input.number was, say, 3):

result:
  doubledNumber: 6

Because you did not configure output at flow level either, the output of the workflow will be the above, too.

Overall I'm a bit uncer…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@alvin
Comment options

@cdavernas
Comment options

Answer selected by alvin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants