Use this when defining reusable workflow tasks.
Tasks · Workflow Automation
Tasks in workflow automation are the work items executed by steps, such as calling an API or running a script, often reusable across workflows.
1. Tasks are units of work in a workflow.
2. Clear inputs/outputs.
3. Timeouts and retries.
4. Idempotent.
5. Reusable.
inputs → task → outputs
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Record workflow/version, run ID, node/step ID, attempt and target correlation IDs; inspect the runtime/control-plane result; then query the sequence/graph outcome and any external state mutated by workflow steps through an independent read path and compare it with the versioned intent. For Workflow Automation → Tasks, the evidence must connect the control-plane result to the sequence/graph outcome and any external state mutated by workflow steps and explain any gap between desired, controller-reported and consumer-visible state.
Step 2 Common mistakes Narrow the fault
- Tasks without timeouts.
Step 3 Where it fails Narrow the fault
Failure analysis for Workflow Automation → Tasks should follow the path through the components: trigger/input → workflow graph → scheduler → step/branch/approval → external mutation → workflow state → target read-back. Common failure classes include branch condition drift, hidden dependency, duplicate parallel mutation, approval bypass, retry storm, partial rollback and successful orchestration with failed consumer state. Before retrying a mutating operation, read current target state using the stable identity workflow/version, run ID, node/step ID, attempt and target correlation IDs; if state is unknown, stop broad retries.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Tasks are reusable units of work.
- Parameterize them.
- Test them separately.
- Task inputs/outputs — contract
- Task timeout — limits
- Task idempotency — safe retry
ReferenceWhy it matters1 section · depth on demand
In depth
In workflow automation, tasks are the individual steps a workflow runs — a playbook, script, API call or approval. Each task has inputs, an outcome (success, failure, skipped) and outputs that later tasks can use.
| Task property | Example |
|---|---|
| Type | Ansible job, HTTP request, shell command |
| Inputs | Variables from earlier tasks |
| Timeout | Stop after 10 minutes |
| Retries | 3 attempts with backoff |
| Outputs | Artifact, JSON result |
Keep tasks small and single-purpose; large tasks hide where a failure happened and make partial reruns impossible.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
Workflow Automation → Tasks is owned at runtime by the workflow/orchestration engine scheduling nodes according to dependencies, conditions and run state. Its durable intent is versioned workflow graph with inputs, conditions, concurrency, approvals, retries and rollback rules; the stable identity contract is workflow/version, run ID, node/step ID, attempt and target correlation IDs. The consumer-visible target is the sequence/graph outcome and any external state mutated by workflow steps. The operating invariants are that dependency ordering is explicit, conditions are deterministic, concurrency/approval semantics are reviewed, retries do not duplicate side effects and final target state is checked. Follow the chain of components trigger/input → workflow graph → scheduler → step/branch/approval → external mutation → workflow state → target read-back and record which layer currently owns truth. The linked authority for bounded mechanics is GitHub Docs — Workflow syntax for GitHub Actions; documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Workflow Automation > Tasks. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
Capture at minimum workflow/run/node, dependency/branch decision, attempt, queue/start/end times, status/error, output/artifact and target correlation/read-back.