The Workflow Changed Mid-Run
A workflow that waits three days in the middle is still running when someone edits it on day two. Which version finishes the job is not a technicality: it decides whether a supplier gets an email you deleted, or an approval nobody asked for. In AWRA a run finishes on the version it started under.
A distributor in Industrial Area runs a workflow on every purchase request over KES 500,000. It tells finance at once, waits two days, and if the request is still pending it raises an approval for the finance director. On a Tuesday, Wambui in operations changes it: one day instead of two, and the approval goes to the general manager rather than the finance director. Fourteen requests are sitting in the middle of the old workflow, waiting out their two days.
There are three possible answers to what happens to those fourteen, and only one of them is safe. The steps could be read fresh when each run wakes, so a run that began under one set of rules ends under another. The runs could be abandoned, so fourteen requests never reach anyone. Or each run could finish exactly as it was designed when it started. AWRA does the third, and the rest of this post is how.
Editing makes a draft, publishing makes a version
When Wambui saves her change, nothing live changes. The workflow becomes a draft, the edit is recorded as a numbered version with the change type and a note of which parts moved, its name, its trigger, its conditions or its actions, and the screen says to publish it before it takes effect. Requests submitted in the meantime still run on the version that was published before.
Publishing needs a reason, in writing, up to a thousand characters. That reason is stored with the version, so six months later the question “why does this go to the general manager?” has an answer next to the change rather than in someone’s memory.
A run is pinned to the version it started under
Every new run records the published version it started under, and reads its conditions and its steps from that version’s saved copy, not from the workflow as it is being edited. When a run reaches a wait, the wait records the run, the version, how far through the steps the run had got and which record it was about.
Every five minutes AWRA looks for waits that are due: a date that has arrived, a delay that has run out, or a condition that now holds. This sweep is what picks up the paused runs we wrote about in the pause that nothing ends. Each one resumes with the steps that came after the wait in the version the run started under. So the fourteen requests that were waiting two days still wait two days, and still go to the finance director, because that is the workflow they were sent into. Requests submitted after Wambui publishes wait one day and go to the general manager.
The steps are frozen when the run starts. The record is read fresh when it wakes.
That second half matters as much as the first. When a run resumes, it reloads the purchase request as it is now, not as it was two days ago. If finance has already approved it, a condition on the wait or on a branch after it, such as “still pending”, reads the real status, and the escalation does not fire on a request that no longer needs it. A wait with a condition and a date keeps waiting until the condition holds or the date passes, whichever comes first. The run’s own timeline records that it resumed and which version it continued on.
If you read about waits that never resumed
An earlier post described a wait that paused a run and nothing came back to it. That has since changed: waits are now picked up every five minutes and the run continues from where it stopped, on its own version.
Changes that need a second person
Some steps do more than send a message. A workflow that updates a record, assigns an owner, raises a purchase request, a stock transfer, an RFQ or an approval, or calls a webhook is treated as high risk. Publishing one needs the automation risk policy acknowledged, and the new version waits for approval by a different person from the one who asked; someone who tries to approve their own change is refused and the attempt is recorded. It is the same second-person rule we described for control settings in the setting that waits for a second person.
While a high-risk change waits for approval, the workflow is switched off for new runs, and the screen shows which version is waiting. Runs already sleeping are not affected: they were started under an approved version and they finish on it. Wambui’s change raises an approval, so it is high risk and needs her manager or a colleague to approve it before it goes live.
| What you do | What changes for new runs | What happens to runs already waiting |
|---|---|---|
| Save an edit | Nothing until it is published | Finish on their version |
| Publish a low-risk change | They use the new version | Finish on their version |
| Publish a high-risk change | None start until another person approves | Finish on their version |
| Roll back to an earlier version | They use the restored steps, as a new version | Finish on their version |
| Deprecate the workflow | None start | Finish on their version |
| Delete the workflow | None start | Their waits are cancelled |
Rolling back without rewriting history
The workflow screen lists every version. Rolling back to one restores its conditions and steps and publishes them as a new version, with the reason you give, so the history reads forward: version five was a rollback to version three, and why. Nothing is erased, and a rollback goes through the same check that the workflow has an owner as any other change.
Ask this of any automation tool before you edit a live workflow
If I edit a workflow, do runs already in progress change?
Answer to hope for
No, they finish on the version they started under.
What a different answer means
If they do, one run can begin under one set of rules and end under another.
When a paused run wakes, does it look at the record again?
Answer to hope for
Yes, it reloads the record.
What a different answer means
If not, it escalates requests that were approved while it slept.
Can the person who wrote a risky change also approve it?
Answer to hope for
No, it needs someone else.
What a different answer means
One person can then change who approves your spending without anyone seeing it.
Does a rollback delete the newer version?
Answer to hope for
No, it adds a version.
What a different answer means
If it deletes, nobody can say later what ran in between.
What AWRA OpsHub does today
- Edits saved as a draft, recorded as a numbered version with which parts changed.
- A written reason on every publish and rollback.
- Each run pinned to the version it started under, through any wait.
- Waits resumed every five minutes, on a date, a delay or a condition, with the record reloaded fresh.
- High-risk changes approved by a second person, with the workflow paused for new runs meanwhile.
- Rollback as a new version, and deprecation with a recorded reason.
More we can add to your workspace
- A list of runs still in flight on an older version, with when each is due to wake. Commission it
- Cancelling a sleeping run from the screen, with a reason. Commission it
- Moving a sleeping run onto the newer version on purpose, run by run. Commission it
- A line-by-line comparison of two versions, beside the summary of what changed. Commission it
Where we point you to a specialist
- We will not quietly move a run that is already in flight onto a newer version. A run that starts under one set of rules finishes under them, so nobody has to reconstruct which rules applied to which request.
The in-flight list is the natural first step, because every waiting run already records its version and when it is due.
Anything above that you need, we can build for you
Everything listed above as something we can add describes what ships in the standard product today — it is a starting point, not a limit on what AWRA OpsHub can do for your organisation. Kenya's eTIMS integration and its maintained payroll engine are both in the product because clients needed them and commissioned them; neither appeared by itself, and the same door is open for whatever you just read about. One qualification so this is worth what it claims: a small number of things on this blog we deliberately leave to a specialist rather than build — a statutory ledger we will not sign our name to, a rule that would decide a tax question for you, a clinical or member-funds record that belongs in a regulated system — and where that is true the post says so in those words. Everything else is a scope, a timeline and a price.
The operational work, which is what most commissions actually are
An extra approval stage in a chain that does not match the standard one, a custom field set on employees or assets that only your sector needs, an expiry that has to block an order rather than send an email, a report your board asks for in a shape nothing produces, or a scanner or weighbridge feeding the goods-in door. These are the commissions we are asked for most often and the smallest ones we quote — and unlike a revenue-authority pipeline, none of them waits on a regulator.
The module-shaped additions, which are the ones readers ask for most often
A price list with real discount authority, a customer-facing quotation that expires, a bill of materials or recipe costing, a staff advance that is issued, acquitted and chased, a member or unit ledger, a matching rule that holds a payment. Each of these is a build rather than a setting, and each has been quoted before — a bigger piece of work than a custom field, with a written spec and a date instead of a roadmap slide.
The report, document or pack nothing currently produces
The board pack in the shape your board actually asks for, a donor or funder layout, an invoice or receipt template carrying what your regulator or your customer expects, a dataset the report builder cannot reach yet. Usually the fastest thing on this list to deliver, because the data is already in the system.
Systems, rails and hardware you already run
The accounting package, CRM, online store, core banking or custom database you intend to keep — connected through our API so a fact is entered once and appears everywhere it is needed. Plus the physical edge: a scanner, a scale, a weighbridge or a till peripheral feeding the door it belongs to.
How it works: you describe the requirement, we return a written scope, timeline and cost, and once agreed it is built into your environment and maintained as part of the product. Nothing here waits on a regulator or a published specification, which is why operational builds are the ones we quote fastest. Tell us the requirement that would otherwise rule us out — that is a better first conversation than a demo.
Tell us what your operation needsThe short version
Change a live workflow whenever you need to. Saving makes a draft, publishing makes a version with a reason, and every run already under way finishes on the version it started under while reading its record fresh when it wakes. Risky changes need a second person, and rolling back adds a version rather than erasing one.
See workflow automation
Triggers, conditions, waits, approvals and the version history behind them.
Explore workflow automationFrequently asked questions
If I edit a workflow, what happens to runs already in progress?
They finish on the version they started under. Saving an edit creates a draft, and only new runs started after you publish use the new version.
When does a paused workflow continue?
AWRA checks every five minutes for waits whose date or delay has passed or whose condition now holds, and continues each run with the remaining steps of its own version.
Does a resumed run use the old data?
No. The steps come from the version the run started under, but the record is reloaded as it is at the moment the run resumes.
Who can approve a high-risk workflow change?
A different authorised person from the one who requested it. Until it is approved, the workflow starts no new runs, and runs already waiting finish on their approved version.
Does rolling back delete the newer version?
No. A rollback restores an earlier version’s conditions and steps and publishes them as a new version with your reason, so the full history stays.