Integration Workflow & Orchestration (Cloud)
Problem
A business process runs across several of your cloud microservices and also calls partner APIs or data sources that other organisations own, over connections that leave your cloud network through a managed egress gateway that only allows approved FQDNs. When a step fails partway, teams struggle to keep the process transactional, recover it and see where each instance stands.
Solution
Define the process in a cloud-native workflow orchestration engine that runs each step and keeps state, with a decision service or Business Rules Management System (BRMS) choosing branches. Service tasks or events call internal workloads synchronously or asynchronously, and external calls go through an API Gateway or a Managed NAT/Egress Gateway that allows only listed FQDNs and IPs.
Cloud Paradigm
- Workflow Orchestration
- Event-Driven Architecture (EDA)
- Microservices Architecture
- Serverless Functions (for task execution)
- Decision as a Service
- API-Led Connectivity
- Distributed Transaction Management (e.g., Saga Pattern)
Solution Flow
Workflow Orchestration Flow:
- Process Initiation: An inbound API call, event, scheduled job or human interaction starts a business process.
- Workflow Engine: The cloud-native orchestration engine receives the signal and starts executing the process definition.
- Task Execution (Internal): The engine invokes internal backend workloads or microservices (e.g., via API calls, asynchronous messages to a Message Broker/Event Bus, or serverless functions) for business logic steps.
- Decision Service: For conditional logic, the engine consults a decision service or Business Rules Management System (BRMS), which evaluates rules and returns an outcome that sets the next steps.
- Human Task Integration: For manual approvals or interventions, the workflow uses human task management (web forms, email notifications or dedicated user interfaces) and pauses until the task is done.
- External System Interaction: When an external system is needed, the engine (or an invoked backend workload) sends a secure request.
- State Management: The engine persists process state so it can recover across steps, even after failures.
- Process Completion: Once all steps succeed, the engine finalises the process and may publish a completion event.
External Interaction Flow (Outbound from Workflow):
- Backend Workload/Workflow Task: An invoked backend workload or a workflow task needs to call an external partner API or data source.
- Egress Gateway / NAT: The outbound request, typically HTTPS, goes through a Managed NAT/Egress Gateway located in a Private Subnet (Workloads) with egress to a Public Subnet (Perimeter), which enforces FQDN/IP allow-listing and performs Network Address Translation.
- Edge Protection (Optional): Egress edge protection (WAF) can inspect outbound traffic for Data Loss Prevention (DLP) or other policy enforcement.
- External Target: The external system receives the request from a static, allow-listed cloud egress IP address, processes it and responds.
When to Use
- The process spans several internal microservices and at least one external system, with state coordinated across those boundaries.
- Steps branch on conditions better held in separate decision logic or a BRMS than in hardcoded routing.
- Long-running processes include human approval points, so the engine must persist state and pause for hours or days.
- Transactional integrity across services needs compensating actions (Saga Pattern) rather than distributed two-phase commit.
- Compliance or operations require auditability and end-to-end visibility of process instances, durations and failures.
When NOT to Use
- One service can finish the work synchronously without cross-boundary coordination; a workflow engine only adds overhead.
- The job is point-to-point data movement or ETL, better served by a pipeline or messaging pattern.
- Ultra-low-latency request/response flows cannot absorb engine persistence and orchestration hops.
- Routing is simple and stable, and an API Gateway or lightweight event choreography handles it without central orchestration.
- Teams lack the operational maturity to run and observe a stateful orchestration platform, so choreographed events are preferable.
Trade-offs
- Central visibility and state management vs running, scaling and patching a stateful orchestration engine.
- Decision logic held in a BRMS vs added latency and the governance of a separate rules lifecycle.
- Resilience through retries, circuit breakers and Saga compensation vs the complexity of designing correct compensating transactions.
- Secure, allow-listed egress via NAT/Egress Gateways vs network configuration effort and static-IP upkeep.
- Decoupling via event-driven tasks vs harder end-to-end debugging without disciplined distributed tracing and correlation IDs.
Illustrative Scenario
A hypothetical scenario showing how the pattern applies. Not a client case study.
A hypothetical health and property insurer automates claims settlement with a BPMN 2.0 process definition, started by an inbound API call from its policyholder portal. The orchestration engine first invokes internal microservices for fraud scoring and payout calculation. It then consults a BRMS, which applies the policy rules and decides whether the claim is approved automatically or goes to a human adjuster through a task queue. In that case the process pauses until the adjuster signs off, and the decision is recorded against the process instance for audit. After approval, a service task calls a reinsurance partner's API through a Managed Egress Gateway in a private subnet. The request leaves from a static, allow-listed IP and passes WAF-based DLP inspection. The engine persists state at every step, so a failure mid-process resumes without paying the claim twice, and Saga compensation runs where needed. Finally, the engine publishes a completion event that downstream ledger and notification services consume.
Additional Details
- Workflow Definition: Define workflows in a standard, human-readable process modelling notation (e.g., BPMN 2.0) on a cloud-native orchestration platform.
- Resilience & Error Handling: Use retries with exponential backoff, circuit breakers and compensating transactions (Saga Pattern) for distributed processes. Alert the relevant operations teams on failures, timeouts and unhandled exceptions.
- Observability: Collect logs, metrics (process instances, task durations, error rates) and distributed traces (e.g., OpenTelemetry) across the workflow, its backend workloads, decision services and external integrations.
- Scalability & Elasticity: Run engines and workloads on cloud-native components (e.g., serverless functions, container orchestration platforms) that scale automatically and stay highly available.
- Event-Driven Integration: Prefer asynchronous integration through a Message Broker or Event Bus to decouple tasks and improve resilience, especially with external systems and long-running processes.
- Security Context Propagation: Propagate security context (e.g., user identity, correlation IDs) securely through every step and service call to keep a consistent chain of trust.
Security Controls
- Perimeter Security (Outbound): Route all outbound connections from workflow components or invoked workloads to external systems through a Managed NAT/Egress Gateway located in a Private Subnet (Workloads) with egress to a Public Subnet (Perimeter). Enforce strict egress filtering (allow-listed FQDNs/IPs), optionally with egress edge protection (WAF) for deeper inspection.
- Transport Security: Enforce Transport Layer Security (TLS 1.2 or higher) on all interfaces, for internal microservice traffic and external integrations alike.
- Authentication & Authorisation:
- Between workflow components and backend workloads, use OAuth 2.0 (Client Credentials Grant), Mutual TLS (mTLS) or managed identity solutions.
- For external systems, use OAuth 2.0 (Client Credentials Grant) or mTLS, limiting API Keys to identification and rate limiting.
- Access Control: Apply granular Role-Based Access Control (RBAC) to managing and operating the orchestration engine and decision services.
- Audit Logging: Log all workflow state transitions, decision evaluations and external interactions for traceability and compliance.
Related Patterns
Use and cite this
Free to use and adapt under CC BY 4.0. Credit: David Tirabassi, IT Architecture Patterns.
Attribution: Source: David Tirabassi, IT Architecture Patterns (https://www.itarchitecturepatterns.net/patterns/int-workflow-cloud), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).