Workflow

On this page 7

A workflow is a defined, repeatable sequence of steps that moves work from an event to an outcome, with rules that decide what happens at each point. In automation fundamentals, a workflow is the executable model of a business or technical process: it specifies the trigger that starts it, the actions it performs, the conditions that choose between paths and the state it keeps along the way.

The same word describes a manual process on paper and a fully automated one in software. In automation, the emphasis is on the second meaning: a workflow is explicit enough for a machine to run, so every step, input, decision and failure path must be stated rather than left to human judgment.

The building blocks of an automated workflow

An automated workflow is assembled from a small set of standard building blocks that appear in almost every automation tool, whether visual or code-based. Understanding them makes it possible to read and design workflows on any platform.

ElementPurposeExample
TriggerStarts a new workflow runA form is submitted
ActionPerforms one unit of workCreate a record in a CRM
ConditionSelects a path based on dataOrder total above 1,000
Data mappingPasses output of one step to the nextCustomer email into a message template
Workflow stateRecords where a run is and what it holdsWaiting for approval
Error handlerDefines what happens when a step failsRetry, then notify an operator
Core elements of a workflow

Each execution of a workflow is called a run or instance. The workflow definition is the template; a run is one concrete pass through it with its own data. Thousands of runs of the same definition may be active at once, so runs must not interfere with one another through shared variables or files.

Workflows are often drawn as directed graphs, where nodes are steps and edges are transitions. Notations range from simple flowcharts to formal standards such as BPMN for business processes, while data and engineering tools usually describe workflows as directed acyclic graphs in code.

Workflow patterns and control flow

Workflows combine a limited number of control-flow patterns to express nearly any process. Recognizing the pattern helps choose the right tool feature and anticipate where errors will appear.

PatternBehaviorTypical use
SequentialSteps run one after anotherOnboarding checklist
Conditional branchOne of several paths is chosenRoute invoices by amount
Parallel split and joinPaths run simultaneously and then mergeRequest several approvals at once
Loop or iterationSteps repeat for each itemProcess every line of a spreadsheet
Wait or delayRun pauses until a time or eventSend a reminder after three days
Human taskRun pauses for a person to decideManager approves an expense
Common workflow patterns

Patterns that wait for time or for people change the nature of a workflow. A run that lasts milliseconds can live in memory, but a run that waits days or weeks for an approval must persist its state durably so that it survives restarts and deployments.

A workflow is the container that organizes automation, while terms such as trigger, action and condition name its parts. Confusing these levels leads to designs where business logic is scattered across disconnected scripts.

TermWhat it describesRelation to a workflow
WorkflowAn ordered process with rules and stateThe whole process definition
AutomationDoing work without manual effortThe broader goal a workflow serves
TriggerThe event that starts a runEntry point of the workflow
ActionOne operation in a systemA single step inside it
ConditionA rule evaluated on dataDecides branching inside it
Workflow stateThe current position and data of a runRuntime memory of one instance
Workflow and neighboring terms

A workflow also differs from a single task or script. A script runs one procedure and ends, while a workflow coordinates several systems, people and time periods, keeps a record of progress and defines how to recover when one part fails.

Designing a reliable workflow

A reliable workflow starts with a clear description of the current process, including exceptions, before any tool is chosen. Automating an unclear process only makes the confusion run faster.

  1. Define the start and end: the triggering event and the measurable outcome.
  2. List every step and owner, including manual ones that will remain.
  3. Specify inputs and outputs of each step, with formats and required fields.
  4. Map exceptions and failure paths: missing data, timeouts, rejected approvals.
  5. Decide where state is stored and how long runs may last.
  6. Add logging and alerts so that failed runs are visible to a named person.

Good workflows keep steps small and idempotent, meaning a step can be repeated without creating duplicate effects. This allows safe retries after network errors. They also keep business rules in conditions that are easy to read, instead of hiding them inside long custom code blocks.

Common workflow design mistakes

Most workflow failures in production come from missing error paths and hidden assumptions about data, not from the automation platform itself. The table below lists frequent symptoms and their remedies.

SymptomLikely causeFix
Duplicate recordsRetried steps that are not idempotentUse unique keys and upsert operations
Runs silently stopNo error handler or alertingAdd failure notifications and run logs
Stuck approvalsHuman task without a timeoutAdd reminders and escalation after a deadline
Workflow nobody understandsOne huge flow with many branchesSplit into smaller sub-workflows
Breaks after a field renameHard-coded data mappingValidate inputs and version the workflow
Workflow problems, causes and fixes

The idea in brief

A workflow is a recipe for getting a job done. It says what starts the job, which steps follow, who or what does each step, and what to do when something goes differently than planned.

When a workflow is automated, a computer follows the recipe instead of a person, every time and in the same way. People still decide what the recipe should be and step in when the computer meets a situation the recipe does not cover.

A practical scenario

A mid-sized accounting firm handles new client onboarding by email and spreadsheets, and each onboarding takes about two weeks of back-and-forth. The firm maps the process and builds an automated workflow for it.

The trigger is a signed engagement letter. Actions then create the client in the practice management system, send a document request, and open a task for the assigned accountant. A condition checks whether the client is a company or an individual and sends a different checklist to each. If documents are missing after five days, a reminder goes out, and after ten days the case escalates to the partner.

Every run shows its current state on a dashboard. Onboarding time falls to about four working days, and no client is forgotten because each stalled run is visible.