Control overlapping runs and cancellation
Use Automation settings to prevent simultaneous work on the same business item or stop a workflow when that work is no longer needed.
Automations is in Early access. Your workspace permissions determine which actions you can perform.
Prevent overlapping runs
- Open More editor actions > Automation settings.
- Under Run overlap, enable Skip overlapping runs.
- Leave Use a business key off when the entire automation should have at most one active run.
- Enable Use a business key when different business items can run independently, and map the key from the starting data.
- Save and publish the settings with the workflow.
A business key must resolve to a nonblank text value. Choose a stable value from the starting event. An invoice ID lets different invoices for one customer run separately. A customer address would group those invoices together.
An active run occupies its key while queued, running, waiting, or retrying, including across publications. Another start for the occupied key is skipped. Once the run finishes, another event can start a new run for that key. This is overlap prevention, not a permanent once-per-item rule.
Changing the key in a new version changes how future starts are grouped. It does not rewrite the identity of existing runs.
Configure a cancellation event
Have your application send the event name and fields configured here when the related work should stop.
- Under Cancellation events, select Add cancellation event.
- Enter the Event name, Cancellation reason, and Incoming event fields.
- Choose Runs to cancel: active runs matching a filter, or the run matching a business key.
- Configure Only cancel runs when if the event should stop a subset of eligible runs.
- Preview the related workflow paths and review the settings before publishing.
For example, a booking cancellation can stop pending reminders for that booking. A cancellation aimed at a business key requires keyed overlap settings and an event addressed to the same key.
An automation-wide cancellation with no filter can stop multiple active runs. Set the scope and condition to match the intended business action.
Understand what cancellation stops
Cancellation requests stop further workflow processing when the run reaches a cancellation boundary. An external action already accepted, such as an SMS send, can still finish. Cancellation cannot recall a message.
Existing runs retain the cancellation rules of the version they started with. Publishing new rules does not add them to older runs. A cancellation event processed before a target run exists does not prevent a future start.
Inspect Runs for the resulting status and cancellation reason. A cancellation request alone does not establish that the run has reached its terminal state.
Next steps
Powiązane zasoby
Kontynuuj z dokumentacją, przewodnikami i przykładami dotyczącymi tego tematu. Zasoby są w języku angielskim.