Demonstration: Performing action runs in sequence, with Mechanic.

Mechanic is a development platform for Shopify. :)

Demonstration: Performing action runs in sequence

by Isaac Bowen (team@usemechanic.com)

This task demonstrates Mechanic's opt-in ability to perform a task's generated actions in a sequence, rather than in parallel.

Runs when a user triggers the task. Configuration includes fail the sixth action.

15-day free trial – unlimited tasks

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

Developer details

Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Gurus, everybody.

That’s why we make it easy to configure automation without code, why we make it easy to tweak the underlying code once tasks are installed, and why we publish it all here for everyone to learn from.

Events
when a user triggers the task (mechanic/user/trigger)
Options
fail the sixth action (boolean)
Script
{% 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 tasks are written in Liquid, which makes them easy to write and easy to modify. Learn more about our platform.