Demonstration: Performing action runs in sequence
This task demonstrates Mechanic's opt-in ability to perform a task's generated actions in a sequence, rather than in parallel. To try this task, enable the "Perform action runs in sequence" option, in the task's advanced settings.
Try this taskWhen it runs
Occurs when a user manually triggers the task
What you choose
Fail the sixth action
Documentation
This task demonstrates Mechanic's opt-in ability to perform a task's generated actions in a sequence, rather than in parallel. To try this task, enable the "Perform action runs in sequence" option, in the task's advanced settings.
Read more: Generating sequences of actions
Task code and subscriptions
You can edit the Liquid code after installing this task. View on GitHub or ask a question in the Mechanic Slack community.
Subscriptions
mechanic/user/trigger
How task subscriptions work
Option types and flags
- Fail the sixth action (boolean)
Task code
{% for n in (1..10) %}
{% if options.fail_the_sixth_action__boolean and n == 6 %}
{% action "echo", n: n, __error: "!" %}
{% else %}
{% action "echo", n: n %}
{% endif %}
{% endfor %}
Mechanic Liquid reference