Day 2 with Workflows — A workflow is made of steps and jumps
Let’s continue our discovery of Goole Cloud Workflows!
Yesterday, we discovered the UI of Workflows. We created our first workflow. We started with a single step, returning a greeting message:
- sayHello:
return: Hello from Cloud Workflows!
A workflow definition is made of steps. But not just one! You can create several steps. In YAML, the structure of your workflow will be something like:
- stepOne:
# do something
- stepTwo:
# do something else
- sayHello:
return: Hello from Cloud Workflows!
By default, steps are executed in the order they appear, from top to bottom. The execution will finish when either you return a value, or you reach the final step. If there’s no return statement, a null value is returned as result of the workflow execution.
Read more...