Business process transformation

Workflow orchestration

Long-running processes that keep their place through restarts, failed steps and approvers on leave.

How we do it

Overview

Some business processes run for days or weeks and pass through several systems and several people along the way. A loan application is checked, approved, documented and funded, and an online order is reserved, paid for, picked, shipped and sometimes returned. In most organizations the state of that work is spread across each system's status field, a scheduled job or two and somebody's inbox, so when a step fails overnight the case is left neither finished nor failed, and it usually comes to light when the customer calls.

A workflow engine keeps that state in one place. It records each step as it completes, which means a crash, a deployment or a week spent waiting for a signature does not lose the case, and the workflow picks up from the step where it stopped. The engine also handles what scripts and scheduled jobs rarely get right, such as retries with backoff for a system that is briefly down and timeouts for a system or person that never answers. It supports compensation as well, the undoing of earlier steps when a later one fails, which is needed because no transaction spans an ERP, a payment provider and a warehouse.

Choosing an engine takes comparatively little of the effort. Most of it goes into design decisions, for example which steps can safely run twice, what undoing a shipping label or a payment hold involves in practice, how long a person has before a task escalates, and how to change a workflow definition while cases started under the old version are still running. We work through these questions step by step with the process owner and then test the answers by deliberately breaking things in a test environment.

Challenges we address

The failures we are usually called in to fix
  1. State scattered across systems and inboxes

    Finding out where a case stands means checking three applications and asking a colleague, because there is no single record of which steps are complete, which are waiting and who they are waiting on. A stuck case therefore goes unnoticed until someone outside the organization complains.

  2. Scheduled jobs standing in for a workflow

    One job writes a file, a second picks it up an hour later and a third assumes that both of them worked. When something fails in the middle there is no record of where the case stopped, so recovery depends on an engineer reading logs and correcting rows by hand.

  3. Retries that create duplicates

    When a call to the payment system times out, nobody can tell whether the payment went through. The script then either retries and charges the customer a second time or gives up and leaves the order unpaid, and unless each step is idempotent, any retry may turn out to be the wrong choice.

  4. Failed steps that cannot be undone

    Stock has been reserved and the payment taken by the time the shipping step fails permanently. Because the undo path was never designed, nothing releases the stock or refunds the payment, and operations staff have to clean up each affected case by hand.

  5. Approvals that wait indefinitely

    An approval request goes out by email while the approver is on leave. With no deadline, reminder, delegate or escalation in place, the workflow keeps waiting for a reply that is not going to come, and the case stays open with nothing to prompt anyone to act.

Our approach

How the work runs, in order
  1. Model the workflow with its failures

    Together with the process owner we draw the process as an explicit model of its steps, waits and branches, including what happens when each step fails. For every step we write down the answer to three questions, which are what happens if it fails, what happens if it never responds and what happens if it runs twice.

  2. Classify every step

    We mark each step as safe to repeat, repeatable with an idempotency key, or not repeatable. Any step that changes another system is given a compensating action, or a written explanation of why none exists, and effects that cannot be reversed, such as a message sent to a customer, are moved as late in the workflow as they can go.

  3. Choose an engine you can run

    Whether a BPMN engine, a code-first durable execution engine or a cloud provider's state machine service fits best depends on who will read and change the workflows, what you already host and how many cases run at the same time. If you already operate an engine, we build the workflows in that one.

  4. Design human tasks with deadlines

    Tasks are assigned to a role so that they do not depend on one person being available, and each carries a due date, reminders, delegation and an escalation path. The task screen shows the case and the decision being asked for, while the workflow records who made the decision and when, along with what they were shown, which makes human steps as traceable as automated ones.

  5. Test the failures, then hand over

    In a test environment we stop workers partway through a step, force dependencies to time out and deliver the same message twice, and then confirm that every case finishes in a consistent state. Operators receive a view of running, waiting and failed cases, along with runbooks for retrying, repairing and canceling an individual case.

Technical capabilities

What we design, build and operate
  • Durable workflow implementation

    Workflows that persist their state after every step, which lets them resume after a crash, a deployment or a long wait with none of the completed work lost.

  • Retry and timeout policy

    Per-step retry limits with backoff, timeouts on individual calls and on whole stages, and a defined place for a step to go once its retries have run out.

  • Saga and compensation design

    Every step that changes another system has a compensating action, and these run in reverse order when a later step fails. Effects that cannot be undone are dealt with explicitly in the design.

  • Human task management

    Tasks assigned by role with due dates, reminders, delegation and escalation, and task forms that show the case context a person needs in order to make the decision.

  • Event and message correlation

    Workflows can wait for an outside event, for example a payment confirmation or a signed document, and match it to the correct running case even if it arrives late or more than once.

  • Durable timers and deadlines

    Waiting periods, service-level deadlines and scheduled follow-ups that continue to hold across restarts, whether the wait lasts a few minutes or several months.

  • Workflow versioning

    A workflow definition can be changed while earlier cases are still in flight, and for each change we decide whether those running cases finish on the old version or are migrated to the new one.

  • Operator visibility

    A searchable view of every case showing its current step, its history and the reason for any failure, together with figures on how long each stage takes and which cases are stuck.

Where it applies

Business applications
  • Order fulfillment

    Reservation, payment, picking, shipping and returns spread across commerce, payment, warehouse and carrier systems, with stock released and the payment reversed if a step fails.

  • Loan and account origination

    Application, identity and credit checks, approval, document signing and funding, where the time spent waiting on customers and underwriters is tracked against deadlines.

  • Claims handling

    Intake, coverage check, assessment, approval and payment, with adjusters holding tasks that have due dates and the state of each claim visible at every stage.

  • Service provisioning

    Activating a service in sequence across the network, billing and customer systems, and cleanly rolling back the earlier steps if one of those systems rejects the request.

  • Cross-department onboarding

    The many small tasks involved in bringing on a new employee or customer, some running in parallel, shown in one view of what is still outstanding and who is holding it.

  • Period-end close

    Financial close tasks with their dependencies, sign-offs and deadlines held in a single workflow, so the controller can see what is blocking the close without having to ask around.

In practice

Two situations this service is built for, and what we would do in each.

Retail and consumer goods

Online orders held together by scheduled jobs

The situation
A retailer's online orders pass through the commerce platform, a payment provider, the warehouse system and a carrier, and the steps between them are connected by scheduled jobs and status flags. If the warehouse rejects an order after payment has been taken, the customer has paid for goods that will not ship, and support usually learns of it when the complaint arrives.
What we would build
We would move the order flow into a workflow engine and run one workflow per order. Payment capture, stock reservation and label creation would each get an idempotency key and a compensating action (refund, release and cancel), and a warehouse rejection would trigger those compensations in reverse order. Carrier calls would retry with backoff before raising a task for operations, and we would test by failing each step in turn and checking that the order ends in a consistent state.
What it is designed to change
Every order would end up either shipped or fully unwound, and operations would be able to see which of the two applies. Progress would be measured by how many orders a daily reconciliation finds in an inconsistent state and by how long a failed order waits before someone acts on it.
Public sector

Permit applications that wait unseen between departments

The situation
A city agency processes building permit applications, each of which needs reviews from planning, fire safety and utilities, and every review is requested by email. Staff cannot tell which review is still outstanding on a particular application, so the statutory deadline for a response can pass without anyone being warned.
What we would build
We would model each permit as a workflow in which the three reviews run as parallel human tasks assigned to roles. Every task would have a due date derived from the statutory deadline, with reminders and escalation to a supervisor. A request for more information would become a step that waits, under its own time limit, for the applicant's reply to arrive as an event, and each decision would be stored with the reviewer and the documents they saw.
What it is designed to change
Each application would have a visible state, and whatever it is waiting on would have an owner. We would track how long each review stage takes compared with its due date, and how many applications reach the statutory deadline without a decision.

Technologies

We work in your stack and recommend on fit. We resell nothing.
Durable execution engines
Temporal · Cadence · Azure Durable Functions · Restate
BPMN workflow engines
Camunda · Flowable · jBPM · Activiti
Cloud workflow services
AWS Step Functions · Azure Logic Apps · Google Cloud Workflows
Messaging and events
Apache Kafka · RabbitMQ · Amazon SQS · Azure Service Bus · NATS
State and observability
PostgreSQL · OpenTelemetry · Prometheus · Grafana

Business outcomes

What changes for the organization
  • Cases that stay visible between systems

    Each piece of work has a recorded state and a next step, so a case that gets stuck appears on an operator's screen before it turns into a customer complaint.

  • Earlier steps reversed when one fails

    When a late step fails, the earlier steps are reversed as part of the design, which leaves operations to deal with the few cases that need human judgment.

  • Deadlines on human tasks are enforced

    Because human tasks carry due dates and escalation rules, an approval that has waited too long becomes a visible problem for a named person before the service level is missed.

  • Process changes without stranded cases

    Workflow definitions are versioned, which allows the process to change while cases already in flight finish under rules that still make sense for the point they have reached.

What you hold at the end

  • Workflow definitions running in production and kept under version control
  • A step register listing retry, timeout and compensation for every step
  • Human task forms with rules for assignment, deadlines and escalation
  • A failure test suite for crashes, timeouts and duplicate messages
  • An operator view showing running, waiting and failed cases
  • Runbooks for retrying, repairing or canceling a single case

Questions buyers ask

An integration platform moves messages from one system to another, which is enough for flows that complete within seconds. When work waits for days, involves people or has to be reversed after a late step fails, each case needs durable state of its own. Some integration platforms provide that, while others leave you to approximate it with queues and status tables that your team then maintains. A quick way to tell is to ask whether you can list every case in flight along with its current step.

That depends mainly on who will read and change the workflows. In a BPMN engine the diagram itself is what executes, so analysts and auditors can read exactly what runs, and human tasks are well supported. A code-first engine such as Temporal defines the workflow in a programming language, which suits engineering teams, complex logic and automated testing. Both kinds persist state and retry failed steps, so we usually decide on the basis of who maintains the workflows and what you already host.

A database transaction can be rolled back because a single database controls every change within it. A workflow that spans an ERP, a payment provider and a carrier has no equivalent control, since each system commits its own change straight away. Compensation is a separate action that reverses the business effect, for example a refund for a charge or a release for a reservation. It has to be designed for each step, and some effects, such as a notification that has already gone out, can only be followed up afterwards.

No, although the two often run side by side. A pipeline scheduler runs a defined graph of batch tasks on a timetable, and its unit of work is a single run of the pipeline. In a workflow engine the unit of work is one business case, such as a particular order or claim, and the engine holds a large number of them at once, each waiting on its own events, people and timers for days or months. Using a scheduler for that kind of work usually ends with status tables and polling jobs.

Carefully, and one change at a time. Definitions are versioned, and for most changes the running cases complete on the version they started with while new cases pick up the new one. Where a change has to reach running cases, as with a new regulatory rule, we write a migration that maps every possible current step onto the new definition and test it on copies of live cases. Code-first engines add a further constraint, because the workflow code has to stay consistent with the recorded history of each case.

Discuss workflow orchestration with the people who would do the work.

Tell us what you are trying to do and where it is stuck. A principal reads every message and replies within one working day.

How we engage

Start a conversation.

A short paragraph is enough. A principal reads every message and replies within one working day.

Or email hello@farside.works. We use what you send only to reply. Privacy