The Event action is for generating custom events in the User event domain. It's used to queue up follow-up work, either immediately or in the future, and can be useful when designing complex workloads, separating work between tasks.
Events generated by this action may be responded to by other tasks, or by the task that generated this action.
Events generated by this action are child events of the event responsible for the current action.
Options
Notes
If a run_at value specifies a time in the past, the new event will be run immediately.
Tasks specified by task_ids or task_id must subscribe to the event topic being used. As with all subscriptions, offsets may be used, and will be respected.
Examples
Using the Event tag
{% assign data = hash %}{% assign data["foo"] = "bar" %}{% action"event", topic: "user/foo/bar", data: data %}
This task emails a customer daily until their order is paid. It works by scheduling a follow-up run of the same task, one day in the future, using the run_at option.
This task emails a customer daily until their order is paid. It works by firing the follow-up event immediately, using a subscription offset to respond to it a day later.