Design a Maintainable Workflow v2
Design a Workflow so that another builder can understand its purpose, contracts, side effects, and recovery path without reverse-engineering individual mappings.
Start with a clear boundary
- Give the Workflow a name that describes the business outcome.
- Describe its trigger, responsibility, and important side effects.
- Keep Workflow Parameters and Returns small, stable, and business-oriented.
- Use explicit object and Array shapes instead of passing an unexamined document through several Steps.
Do not expose intermediate Step Returns as Workflow Returns merely because they are available. A narrow contract is easier to reuse and change safely.
Name Steps by intent
Use unique camelCase Step names that describe the action and object, such as getCustomer, validateOrder, or createInvoice. Those names appear in Expressions, diagnostics, and logs.
Avoid names tied only to sequence, such as step1. When the Workflow changes, sequence-based names become misleading and make log searches less useful.
Map at the target
Workflows do not use a discrete data mapping step. Instead, data projections are expressed directly on each step.
If you need to use the identical projection multiple times, it's acceptable to use the Passthrough to stage a mapping so its properties can be directly passed to multiple subsequent steps without repeating mapping expressions.
See Map Objects and Map Arrays.
Bound control flow
Use If, ForEach, and TryCatch containers for deliberate branches, iteration, and recovery. Keep each nested section short enough to understand as one unit.
Extract a Sub-Workflow when:
- a sequence is reused
- owns a distinct business responsibility
- needs a stable independently testable contract
- contains a large number of steps that make it difficult to review in context of the rest of the Workflow
Make changes in testable slices
- Add or change one coherent behavior.
- Resolve
Problems. - Inspect Expressions in
Preview. - Debug with small representative input.
- Inspect Step inputs, Returns, and timings in
Logs. - Save only the verified revision.
Use revisions and Environment promotion to separate design-time change from release. Do not treat a successful save or Debug as proof that every target Environment is ready.
Preserve operational context
Choose names that make log rows meaningful. Return a useful final result. Handle expected business failures deliberately and allow unexpected failures to remain visible.
Redact sensitive Workflow log Properties, but do not assume redaction sanitizes exception text, custom Node logs, Debug responses, or external destinations. Store credentials only in Connections and restrict API Keys and Workflows to the least required scope.
See also
See Execution Order, Sub-Workflows, and Workflow Validation.