Skip to content
MyAppBuilder
StableWorkflow node

Stop with message

Overview

Ends the run immediately as failed with your message. When a button or form started the workflow with Run workflow, the user sees the message.

Purpose

Reject a request with a clear reason after checking it: “Sorry — this event is full”, “This coupon has expired”, “You've already voted in this contest”. Put it on the Yes path of an If / else that detects the problem; the steps after the If / else only run when the check passes.

Inputs

  • Message — static text or a template such as Sorry — {{results.event.0.title}} is full. (up to 500 characters; empty → “Stopped”).

Configuration

  • A stop step has no next step. Steps inserted after it are never reached (the editor lists them as unreachable).
  • Changes made by earlier steps are kept — there is no rollback. Update a status before stopping on purpose (e.g. mark an event Full, then stop), and do the checks before any writes you don't want to keep.

Outputs

  • The run is marked failed in Run history and its error is exactly the message (no step name in front).
  • Run workflow action (button / form submit): the action fails with the message — a form shows it as an error and keeps the entered values; later actions in the list don't run.
  • Record-triggered runs simply end; nothing is shown to anyone.

Example

Reject a registration when the event is full

Example
Trigger: Run manually / from an action (Registration form › On submit › Run workflow, inputs from the form)
Database › Find records  Events where ID = {{event.event}} → save as event
Database › Find records  Attendees where Event = {{event.event}} and Status is one of Registered, Checked in → save as registered
If / else: {{results.registered_count}} ≥ {{results.event.0.capacity}}
  Yes → Database › Update record  Events {{event.event}}: Status = Full
        Stop with message: Sorry — {{results.event.0.title}} is full.
  No  → Database › Create record  Attendees …

Errors

  • None of its own — the message becomes the run's error.

Limitations

  • Earlier writes are not undone.
  • The message is shown to whoever started the run — don't include data they may not see.

Advanced

  • Config: { message: Binding | string }. The executor throws WorkflowStop(message); the run's error is the message unprefixed, so executeServerAction returns HTTP 400 with it for a run_workflow action. The sandbox (runSandboxWorkflow) sets summary.stopped and executeSandboxAction throws SandboxError(message, 400).

Related

Was this helpful?