Skip to content
Docs
On this page Launch 1/7
Internal — not published

A run is one launch of a campaign. It holds one workflow per person who was in the Audience at that moment. Statuses and history live in the database; the durable engine holds the journal that lets each workflow resume.

Launch

Launch now on the Review & launch sheet and a scheduled launch that comes due both go through the same launch path:

  1. The campaign must have at least one linked product. Products are linked once and cannot be changed after that.
  2. No other run of the campaign may be in progress.
  3. The Audience becomes a fixed list of people. A campaign with no Audience targets every person in the workspace; with one, the people its rules match plus anyone added by hand.
  4. The run is recorded as in progress. An empty list settles it at once as success with no people.
  5. One workflow record per person is written, at most one per person per run.
  6. Each workflow is handed to the engine under the id of its record, all at once.

Suppressed people and people with no contact on a send Step’s channel are still part of the list. Their workflow fails at that Step, and the run ends as partial.

Scheduled launches

A scheduler wakes every 30 seconds, and once shortly after the backend starts. It picks up to 20 enabled schedules that are due and fires them one by one. A pass that is still running makes the next one skip.

Each firing is claimed with a conditional update that only one backend instance can win, so a schedule fires once even with several replicas. The claim also moves the schedule to its next time: the next match of a recurring schedule, or nothing for a one-time launch. Matches missed while the backend was down collapse into one firing. If the backend crashes between the claim and the launch, that firing is lost. The outcome, a run or an error message, is saved on the schedule.

The app creates only one-time launches. The backend refuses a one-time launch more than a minute in the past, and also accepts recurring schedules written as five-field cron expressions with a time zone.

Replay after a restart

Each workflow runs as one durable execution, keyed by its own record id. The engine runs an execution at most once per key, so handing the same workflow over a second time starts nothing new.

Inside a workflow, every read and write goes through the engine and is recorded in the journal with its result: loading the flow and the person, the workflow’s start, each Step’s record, each send, each AI answer, and the final status.

What happens when the backend restarts mid-run Step 1 of 4

The workflow sends an email. The engine records that the send happened and what it returned before the workflow moves on.

A workflow keeps the flow, the Step settings and the person details it read when it started. Editing the flow or the person’s details during a run changes only runs launched afterwards. Two things are read later, when a send Step runs: the person’s contacts, including which ones are suppressed, and the saved template of a Send email Step. Send email records its filled-in subject and body, so editing a template after the email went out does not change what a replay sees.

Code that runs inside a workflow must make the same decisions on every replay. Anything read from outside the journal, such as the current time, can differ on replay. The Wait until date weak spot on Waits, branches and exits comes from this.

Run history

The run history in the builder shows three levels: the runs of a campaign, newest first, with counts per status; the people in one run; and, for one person, each Step’s filled-in settings and output.

Every Step that ran for a person has one record. A Path that closed its branch, or an End Step, is recorded as a success with a note that it stopped the branch or the workflow. A Step that failed keeps its error message. A Step the person never reached has no record.

Stopping a run

Stopping a run Step 1 of 5

Stop works only on a run that is still in progress.

Final status

A run’s status is worked out from its workflows once none is waiting or running:

WorkflowsRun status
All succeededsuccess
All canceledcanceled
All failedfailed
Any mixpartial

Every workflow triggers this step as its last action, and so does Stop. The update only applies to a run still in progress, so when the last workflow and a Stop race, the first write wins and the second does nothing.

Failures and retries

Errors fall into two groups:

  • Known, permanent errors, such as a person with no contact on the channel or invalid email content. The engine does not retry them, and the Step fails at once.
  • Anything else, such as a network error or a provider timeout. The engine retries it, up to 10 times for Step work.

When a Step fails for good, its record is marked failed with the message and the whole workflow ends as failed. Branches that were still running do not finish. A Path that closes its branch and an End Step are not failures: the first ends one branch, the second ends the workflow as a success.

Docs
EN VI