diff --git a/architecture/architecture/observability-three-pillars-architecture/README.md b/architecture/architecture/observability-three-pillars-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b13cd04ee9ebfc41ad75f9450e86f09b7bd29a29 --- /dev/null +++ b/architecture/architecture/observability-three-pillars-architecture/README.md @@ -0,0 +1,19 @@ +# Observability Three Pillars Architecture + +An observability architecture diagram implementing the three pillars (metrics, traces, logs) with OpenTelemetry SDK instrumentation, OTLP collector pipeline, Prometheus, Jaeger, and Loki backends, Grafana dashboards, SLO/SLI tracking, and PagerDuty alerting integration. This template provides a complete observability stack reference showing how telemetry data flows from application instrumentation through collection, storage, visualization, and incident response. Essential for SRE teams building production monitoring infrastructure. + +**Template ID:** `observability-three-pillars-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** architecture +**Secondary use cases:** None +**Complexity:** 4/5 +**Nodes:** 17 +**Lanes:** 4 +**Tags:** [observability, three-pillars, opentelemetry, prometheus, jaeger, loki, grafana, slo-sli, architecture-diagram] +**Source path:** `` +**Repo path:** `architecture/architecture/observability-three-pillars-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/architecture/architecture/observability-three-pillars-architecture/workflow.fz b/architecture/architecture/observability-three-pillars-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..071678cbe2d8054f21c167c076486550e4598ab1 --- /dev/null +++ b/architecture/architecture/observability-three-pillars-architecture/workflow.fz @@ -0,0 +1,44 @@ +Application { # Application Services +n1: rectangle label:"Service A" +n2: rectangle label:"Service B" +n3: rectangle label:"Service C" +n4: rectangle label:"OpenTelemetry SDK" +n1.handle(bottom) -> n4.handle(top) [label="Instrument"] +n2.handle(bottom) -> n4.handle(top) [label="Instrument"] +n3.handle(bottom) -> n4.handle(top) [label="Instrument"] +n4.handle(bottom) -> Collector.n5.handle(top) [label="OTLP Export"] +} +Collector { # OpenTelemetry Collector +n5: rectangle label:"Receive Telemetry" +n6: rectangle label:"Process and Batch" +n7: rectangle label:"Export Metrics" +n8: rectangle label:"Export Traces" +n9: rectangle label:"Export Logs" +n5.handle(right) -> n6.handle(left) [label="Pipeline"] +n6.handle(right) -> n7.handle(left) [label="Metrics"] +n6.handle(bottom) -> n8.handle(top) [label="Traces"] +n6.handle(bottom) -> n9.handle(top) [label="Logs"] +n7.handle(bottom) -> Backends.n10.handle(top) [label="Prometheus"] +n8.handle(bottom) -> Backends.n11.handle(top) [label="Jaeger"] +n9.handle(bottom) -> Backends.n12.handle(top) [label="Loki"] +} +Backends { # Observability Backends +n10: rectangle label:"Prometheus (Metrics)" +n11: rectangle label:"Jaeger (Distributed Traces)" +n12: rectangle label:"Loki (Log Aggregation)" +n13: rectangle label:"Alertmanager" +n10.handle(right) -> n13.handle(left) [label="Alert Rules"] +n10.handle(bottom) -> Visualization.n14.handle(top) [label="PromQL"] +n11.handle(bottom) -> Visualization.n14.handle(top) [label="Trace ID"] +n12.handle(bottom) -> Visualization.n14.handle(top) [label="LogQL"] +} +Visualization { # Visualization & Alerting +n14: rectangle label:"Grafana Dashboard" +n15: rectangle label:"SLO/SLI Tracking" +n16: rectangle label:"Incident Response" +n17: rectangle label:"PagerDuty / Slack" +n14.handle(right) -> n15.handle(left) [label="SLO Burn Rate"] +n15.handle(right) -> n16.handle(left) [label="SLO Breach"] +n16.handle(right) -> n17.handle(left) [label="Alert"] +n13.handle(bottom) -> Visualization.n17.handle(top) [label="Fire Alert"] +} diff --git a/architecture/architecture/openclaw-dedicated-local-machine-architecture/README.md b/architecture/architecture/openclaw-dedicated-local-machine-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0d601e7587ca6766a9d2352a7541ad1a12828eb5 --- /dev/null +++ b/architecture/architecture/openclaw-dedicated-local-machine-architecture/README.md @@ -0,0 +1,19 @@ +# OpenClaw Dedicated Local Machine Architecture + +OpenClaw architecture for a dedicated Mac Mini or homelab server with persistent workspace, agent state, and remote messaging access. + +**Template ID:** `openclaw-dedicated-local-machine-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** architecture +**Secondary use cases:** None +**Complexity:** 2/5 +**Nodes:** 7 +**Lanes:** 3 +**Tags:** [OpenClaw, Mac Mini, Homelab, Dedicated Machine, Self-Hosted AI Agent, 24/7 AI Agent, Telegram, Local Server] +**Source path:** `` +**Repo path:** `architecture/architecture/openclaw-dedicated-local-machine-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/architecture/architecture/openclaw-dedicated-local-machine-architecture/metadata.json b/architecture/architecture/openclaw-dedicated-local-machine-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..26c749074bef0efecaefd41b4d6d79c2f16da4ae --- /dev/null +++ b/architecture/architecture/openclaw-dedicated-local-machine-architecture/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "openclaw-dedicated-local-machine-architecture", + "workflow_id": "openclaw-dedicated-local-machine-architecture", + "title": "OpenClaw Dedicated Local Machine Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "architecture", + "secondary_use_cases": [], + "use_cases": [ + "architecture" + ], + "complexity": 2, + "num_nodes": 7, + "num_lanes": 3, + "tags": [ + "OpenClaw", + "Mac Mini", + "Homelab", + "Dedicated Machine", + "Self-Hosted AI Agent", + "24/7 AI Agent", + "Telegram", + "Local Server" + ], + "description": "OpenClaw architecture for a dedicated Mac Mini or homelab server with persistent workspace, agent state, and remote messaging access.", + "source_path": "", + "repo_path": "architecture/architecture/openclaw-dedicated-local-machine-architecture" +} diff --git a/architecture/architecture/openclaw-dedicated-local-machine-architecture/workflow.fz b/architecture/architecture/openclaw-dedicated-local-machine-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..9d602b9985761fc7a9fbe48f4459609f67b884fb --- /dev/null +++ b/architecture/architecture/openclaw-dedicated-local-machine-architecture/workflow.fz @@ -0,0 +1,20 @@ +User { # User (Phone / Laptop) +n1: circle label:"Start" +n2: rectangle label:"Send Telegram message" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> MacMini.n3.handle(top) [label="LAN / Tailscale"] +} +MacMini { # Dedicated Mac Mini +n3: rectangle label:"OpenClaw Gateway" +n4: rectangle label:"Workspace" +n5: rectangle label:"Agent Memory + State" +n3.handle(right) -> n4.handle(left) +n4.handle(right) -> n5.handle(left) +n3.handle(bottom) -> LLM.n6.handle(top) [label="API Request"] +} +LLM { # Commercial LLM API +n6: rectangle label:"Claude Opus 4.5" +n7: rectangle label:"Generate response" +n6.handle(right) -> n7.handle(left) +n7.handle(top) -> MacMini.n3.handle(bottom) [label="Response"] +} diff --git a/architecture/architecture/rate-limiter-architecture/README.md b/architecture/architecture/rate-limiter-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..467b7ead2f60d0b5598c60988039403aa2622c04 --- /dev/null +++ b/architecture/architecture/rate-limiter-architecture/README.md @@ -0,0 +1,19 @@ +# Rate Limiter Architecture + +A rate limiter architecture diagram implementing the token bucket algorithm with Redis-backed distributed counters, sliding window logs, API key identification, rate limit headers, and multi-node synchronization for consistent enforcement. This template shows how to protect APIs from abuse and ensure fair usage across clients, with proper HTTP 429 responses and Retry-After headers. Essential for API platform teams building production-grade rate limiting infrastructure. + +**Template ID:** `rate-limiter-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** architecture +**Secondary use cases:** None +**Complexity:** 3/5 +**Nodes:** 17 +**Lanes:** 4 +**Tags:** [rate-limiter, token-bucket, sliding-window, redis, api-protection, throttling, distributed-rate-limiting, architecture-diagram] +**Source path:** `` +**Repo path:** `architecture/architecture/rate-limiter-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/architecture/architecture/rate-limiter-architecture/metadata.json b/architecture/architecture/rate-limiter-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..19553f6c9acbcff8255695ced45f7cf1a5b58def --- /dev/null +++ b/architecture/architecture/rate-limiter-architecture/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "rate-limiter-architecture", + "workflow_id": "rate-limiter-architecture", + "title": "Rate Limiter Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "architecture", + "secondary_use_cases": [], + "use_cases": [ + "architecture" + ], + "complexity": 3, + "num_nodes": 17, + "num_lanes": 4, + "tags": [ + "rate-limiter", + "token-bucket", + "sliding-window", + "redis", + "api-protection", + "throttling", + "distributed-rate-limiting", + "architecture-diagram" + ], + "description": "A rate limiter architecture diagram implementing the token bucket algorithm with Redis-backed distributed counters, sliding window logs, API key identification, rate limit headers, and multi-node synchronization for consistent enforcement. This template shows how to protect APIs from abuse and ensure fair usage across clients, with proper HTTP 429 responses and Retry-After headers. Essential for API platform teams building production-grade rate limiting infrastructure.", + "source_path": "", + "repo_path": "architecture/architecture/rate-limiter-architecture" +} diff --git a/architecture/architecture/rate-limiter-architecture/workflow.fz b/architecture/architecture/rate-limiter-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..6cf96d61822afe23cb9c18c95b087bba5fdb9013 --- /dev/null +++ b/architecture/architecture/rate-limiter-architecture/workflow.fz @@ -0,0 +1,54 @@ +Client { # Client +n1: circle label:"API Request" +n2: rectangle label:"Attach API Key" +n22: rectangle label:"Receive Response" +n23: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> RateLimiter.n3.handle(top) [label="Request"] +n22.handle(right) -> n23.handle(left) +} +RateLimiter { # Rate Limiter (Token Bucket) +n3: rectangle label:"Extract Client Identity" +n4: rectangle label:"Lookup Rate Limit Config" +n5: rectangle label:"Check Token Bucket" +n9: rectangle label:"Receive Bucket Status" +n10: diamond label:"Tokens Available?" +n11: rectangle label:"Consume Token" +n12: rectangle label:"Return 429 Too Many Requests" +n13: rectangle label:"Add Rate Limit Headers" +n14: rectangle label:"Forward to Backend" +n19: rectangle label:"Receive Backend Response" +n20: rectangle label:"Forward Response to Client" +n21: rectangle label:"Send to Client" +n3.handle(right) -> n4.handle(left) [label="API Key / IP"] +n4.handle(right) -> n5.handle(left) [label="100 req/min"] +n5.handle(bottom) -> Store.n6.handle(top) [label="INCR + EXPIRE"] +n9.handle(right) -> n10.handle(left) +n10.handle(right) -> n11.handle(left) [label="Yes"] +n10.handle(bottom) -> n12.handle(top) [label="No"] +n11.handle(right) -> n13.handle(left) [label="Decrement"] +n13.handle(right) -> n14.handle(left) [label="X-RateLimit-Remaining"] +n12.handle(top) -> Client.n22.handle(bottom) [label="429"] +n14.handle(bottom) -> Backend.n15.handle(top) [label="Allowed"] +n19.handle(right) -> n20.handle(left) +n20.handle(right) -> n21.handle(left) +n21.handle(top) -> Client.n22.handle(bottom) [label="200"] +} +Backend { # Backend Service +n15: rectangle label:"Process Request" +n16: rectangle label:"Return Response" +n17: rectangle label:"Send to RateLimiter" +n18: rectangle label:"Forward Response" +n15.handle(right) -> n16.handle(left) [label="Execute"] +n16.handle(right) -> n17.handle(left) +n17.handle(right) -> n18.handle(left) +n18.handle(top) -> RateLimiter.n19.handle(bottom) [label="Backend Response"] +} +Store { # Rate Limit Store (Redis) +n6: rectangle label:"Redis Counter" +n7: rectangle label:"Sliding Window Log" +n8: rectangle label:"Return Bucket Status" +n6.handle(right) -> n7.handle(left) [label="Window Check"] +n7.handle(right) -> n8.handle(left) +n8.handle(top) -> RateLimiter.n9.handle(bottom) [label="Bucket Status"] +} diff --git a/architecture/architecture/saga-choreography-pattern-architecture/README.md b/architecture/architecture/saga-choreography-pattern-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5e12652e9664e9e93ad788b3abc981d14992435a --- /dev/null +++ b/architecture/architecture/saga-choreography-pattern-architecture/README.md @@ -0,0 +1,19 @@ +# Saga Choreography Pattern Architecture + +A saga choreography architecture diagram where Order, Payment, and Inventory services coordinate through domain events without a central orchestrator, with each service publishing and subscribing to events that drive the transaction forward or trigger compensation. This template models the decentralized saga approach where services autonomously react to events, reducing single points of failure at the cost of increased complexity in tracking saga state. Best for teams preferring service autonomy over centralized control. + +**Template ID:** `saga-choreography-pattern-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** architecture +**Secondary use cases:** patterns +**Complexity:** 4/5 +**Nodes:** 18 +**Lanes:** 5 +**Tags:** [saga-choreography, event-driven-saga, decentralized, domain-events, compensation, autonomous-services, distributed-transaction, architecture-diagram] +**Source path:** `` +**Repo path:** `architecture/architecture/saga-choreography-pattern-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/architecture/architecture/saga-choreography-pattern-architecture/metadata.json b/architecture/architecture/saga-choreography-pattern-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..28d39e9f5045ec9614107ed87fefecc2532c2b04 --- /dev/null +++ b/architecture/architecture/saga-choreography-pattern-architecture/metadata.json @@ -0,0 +1,31 @@ +{ + "template_id": "saga-choreography-pattern-architecture", + "workflow_id": "saga-choreography-pattern-architecture", + "title": "Saga Choreography Pattern Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "architecture", + "secondary_use_cases": [ + "patterns" + ], + "use_cases": [ + "architecture", + "patterns" + ], + "complexity": 4, + "num_nodes": 18, + "num_lanes": 5, + "tags": [ + "saga-choreography", + "event-driven-saga", + "decentralized", + "domain-events", + "compensation", + "autonomous-services", + "distributed-transaction", + "architecture-diagram" + ], + "description": "A saga choreography architecture diagram where Order, Payment, and Inventory services coordinate through domain events without a central orchestrator, with each service publishing and subscribing to events that drive the transaction forward or trigger compensation. This template models the decentralized saga approach where services autonomously react to events, reducing single points of failure at the cost of increased complexity in tracking saga state. Best for teams preferring service autonomy over centralized control.", + "source_path": "", + "repo_path": "architecture/architecture/saga-choreography-pattern-architecture" +} diff --git a/architecture/architecture/saga-choreography-pattern-architecture/workflow.fz b/architecture/architecture/saga-choreography-pattern-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..39da016c13cda40f20c654a3d725b5358386f4b8 --- /dev/null +++ b/architecture/architecture/saga-choreography-pattern-architecture/workflow.fz @@ -0,0 +1,61 @@ +OrderService { # Order Service +n1: circle label:"Place Order" +n2: rectangle label:"Create Pending Order" +n3: rectangle label:"Emit OrderCreated" +n19: rectangle label:"Receive Saga Result" +n20: diamond label:"Saga Outcome?" +n21: rectangle label:"Confirm Order" +n22: rectangle label:"Cancel Order" +n23: rectangle label:"Acknowledge to EventBus" +n25: rectangle label:"Send Saga Ack" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) [label="Pending"] +n3.handle(bottom) -> EventBus.n4.handle(top) [label="Publish"] +n19.handle(right) -> n20.handle(left) +n20.handle(right) -> n21.handle(left) [label="Success"] +n20.handle(bottom) -> n22.handle(top) [label="Failure"] +n21.handle(right) -> n23.handle(left) +n22.handle(right) -> n25.handle(left) +n23.handle(bottom) -> EventBus.n26.handle(top) [label="Success Ack"] +n25.handle(bottom) -> EventBus.n26.handle(top) [label="Failure Ack"] +} +EventBus { # Event Bus +n4: rectangle label:"OrderCreated Topic" +n10: rectangle label:"PaymentProcessed Topic" +n14: rectangle label:"PaymentFailed Topic" +n18: rectangle label:"InventoryReserved Topic" +n24: rectangle label:"Compensation Ack Received" +n26: rectangle label:"Saga Ack Received" +n4.handle(bottom) -> PaymentService.n5.handle(top) [label="Subscribe"] +n10.handle(bottom) -> InventoryService.n11.handle(top) [label="Subscribe"] +n14.handle(bottom) -> InventoryService.n15.handle(top) [label="Subscribe"] +n18.handle(top) -> OrderService.n19.handle(bottom) [label="Notify Success"] +n24.handle(right) -> n26.handle(left) +} +PaymentService { # Payment Service +n5: rectangle label:"Process Payment" +n6: diamond label:"Payment OK?" +n7: rectangle label:"Emit PaymentProcessed" +n8: rectangle label:"Emit PaymentFailed" +n9: rectangle label:"Publish Result" +n5.handle(right) -> n6.handle(left) +n6.handle(right) -> n7.handle(left) [label="Success"] +n6.handle(bottom) -> n8.handle(top) [label="Declined"] +n7.handle(right) -> n9.handle(left) +n9.handle(top) -> EventBus.n10.handle(bottom) [label="Publish"] +n8.handle(top) -> EventBus.n14.handle(bottom) [label="Publish"] +} +InventoryService { # Inventory Service +n11: rectangle label:"Reserve Inventory" +n12: rectangle label:"Emit InventoryReserved" +n13: rectangle label:"Publish Reserved" +n15: rectangle label:"Compensate: Release Stock" +n16: rectangle label:"Stock Released" +n17: rectangle label:"Compensation Complete" +n11.handle(right) -> n12.handle(left) [label="Reserved"] +n12.handle(right) -> n13.handle(left) +n13.handle(top) -> EventBus.n18.handle(bottom) [label="Publish"] +n15.handle(right) -> n16.handle(left) [label="Released"] +n16.handle(right) -> n17.handle(left) +n17.handle(top) -> EventBus.n24.handle(bottom) [label="Compensation Ack"] +} diff --git a/architecture/architecture/serverless-event-processing-architecture/README.md b/architecture/architecture/serverless-event-processing-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c88eac6c78075322d40a87e62e1430143057ac74 --- /dev/null +++ b/architecture/architecture/serverless-event-processing-architecture/README.md @@ -0,0 +1,19 @@ +# Serverless Event Processing Architecture + +A serverless event processing architecture diagram with S3, DynamoDB Streams, API Gateway, and CloudWatch triggers invoking Lambda functions, orchestrated by Step Functions with fan-out via SQS and dead letter queue error handling. This template shows how to build complex event processing pipelines entirely from managed serverless components, with no servers to provision or manage. Ideal for data processing workflows that need elastic scaling and built-in fault tolerance. + +**Template ID:** `serverless-event-processing-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** architecture +**Secondary use cases:** None +**Complexity:** 4/5 +**Nodes:** 17 +**Lanes:** 4 +**Tags:** [serverless, event-processing, step-functions, lambda-triggers, sqs, s3-events, dynamodb-streams, architecture-diagram] +**Source path:** `` +**Repo path:** `architecture/architecture/serverless-event-processing-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/architecture/architecture/serverless-event-processing-architecture/metadata.json b/architecture/architecture/serverless-event-processing-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..7edfa04e33ff9cc311441440d49723a92e7cde23 --- /dev/null +++ b/architecture/architecture/serverless-event-processing-architecture/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "serverless-event-processing-architecture", + "workflow_id": "serverless-event-processing-architecture", + "title": "Serverless Event Processing Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "architecture", + "secondary_use_cases": [], + "use_cases": [ + "architecture" + ], + "complexity": 4, + "num_nodes": 17, + "num_lanes": 4, + "tags": [ + "serverless", + "event-processing", + "step-functions", + "lambda-triggers", + "sqs", + "s3-events", + "dynamodb-streams", + "architecture-diagram" + ], + "description": "A serverless event processing architecture diagram with S3, DynamoDB Streams, API Gateway, and CloudWatch triggers invoking Lambda functions, orchestrated by Step Functions with fan-out via SQS and dead letter queue error handling. This template shows how to build complex event processing pipelines entirely from managed serverless components, with no servers to provision or manage. Ideal for data processing workflows that need elastic scaling and built-in fault tolerance.", + "source_path": "", + "repo_path": "architecture/architecture/serverless-event-processing-architecture" +} diff --git a/architecture/architecture/serverless-event-processing-architecture/workflow.fz b/architecture/architecture/serverless-event-processing-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..6fbe5ea14c7d7c1d813fb05a78ebff9db5f752b2 --- /dev/null +++ b/architecture/architecture/serverless-event-processing-architecture/workflow.fz @@ -0,0 +1,56 @@ +EventSources { # Event Sources +n1: rectangle label:"S3 Bucket Upload" +n2: rectangle label:"DynamoDB Stream" +n3: rectangle label:"API Gateway Webhook" +n4: rectangle label:"CloudWatch Scheduled Rule" +n24: rectangle label:"Receive Processing Acks" +n1.handle(bottom) -> Triggers.n5.handle(top) [label="ObjectCreated"] +n2.handle(bottom) -> Triggers.n6.handle(top) [label="StreamRecord"] +n3.handle(bottom) -> Triggers.n7.handle(top) [label="POST Event"] +n4.handle(bottom) -> Triggers.n8.handle(top) [label="Cron"] +} +Triggers { # Lambda Triggers +n5: rectangle label:"Image Processing Lambda" +n6: rectangle label:"Data Sync Lambda" +n7: rectangle label:"Webhook Handler Lambda" +n8: rectangle label:"Batch Job Lambda" +n20: rectangle label:"Receive Processing Ack" +n21: rectangle label:"Aggregate Trigger Results" +n22: rectangle label:"Prepare Source Ack" +n23: rectangle label:"Send Source Ack" +n5.handle(bottom) -> Processing.n9.handle(top) [label="Process Image"] +n6.handle(bottom) -> Processing.n11.handle(top) [label="Sync Data"] +n7.handle(bottom) -> Processing.n9.handle(top) [label="Handle Event"] +n8.handle(bottom) -> Processing.n12.handle(top) [label="Run Batch"] +n20.handle(right) -> n21.handle(left) +n21.handle(right) -> n22.handle(left) +n22.handle(right) -> n23.handle(left) +n23.handle(top) -> EventSources.n24.handle(bottom) [label="Triggers Ack"] +} +Processing { # Processing Pipeline +n9: rectangle label:"Step Functions Orchestrator" +n10: diamond label:"Processing Complete?" +n11: rectangle label:"Fan-Out with SQS" +n12: rectangle label:"Transform and Load" +n13: rectangle label:"Error Handler Lambda" +n18: rectangle label:"Receive Storage Ack" +n19: rectangle label:"Send Processing Ack" +n9.handle(right) -> n10.handle(left) +n10.handle(right) -> n11.handle(left) [label="Success"] +n10.handle(bottom) -> n13.handle(top) [label="Failure"] +n11.handle(right) -> n12.handle(left) [label="Parallel"] +n13.handle(bottom) -> Storage.n17.handle(top) [label="DLQ"] +n12.handle(bottom) -> Storage.n14.handle(top) [label="Store"] +n18.handle(right) -> n19.handle(left) +n19.handle(top) -> Triggers.n20.handle(bottom) [label="Processing Ack"] +} +Storage { # Managed Storage +n14: rectangle label:"DynamoDB Table" +n15: rectangle label:"S3 Results Bucket" +n16: rectangle label:"SNS Notification Topic" +n17: rectangle label:"Return Storage Ack" +n14.handle(right) -> n15.handle(left) [label="Archive"] +n15.handle(right) -> n16.handle(left) [label="Notify"] +n16.handle(right) -> n17.handle(left) +n17.handle(top) -> Processing.n18.handle(bottom) [label="Storage Ack"] +} diff --git a/architecture/business-operations/webhook-integration-workflow/README.md b/architecture/business-operations/webhook-integration-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..206e36b4fa42cfae776ad1970fbaafde32d7d382 --- /dev/null +++ b/architecture/business-operations/webhook-integration-workflow/README.md @@ -0,0 +1,19 @@ +# Webhook Integration Workflow + +Webhook integration workflow with endpoint registration, payload signing, delivery attempt, retry with backoff, and delivery status tracking. + +**Template ID:** `webhook-integration-workflow` +**Kind:** workflow +**Source domain:** business-operations +**Primary use case:** architecture +**Secondary use cases:** patterns +**Complexity:** 2/5 +**Nodes:** 7 +**Lanes:** 2 +**Tags:** [webhook, event-driven, http-callback, integration, retry-logic, payload-signing] +**Source path:** `business-operations/webhook-integration` +**Repo path:** `architecture/business-operations/webhook-integration-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/architecture/business-operations/webhook-integration-workflow/metadata.json b/architecture/business-operations/webhook-integration-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..50701bbb57135929fe33a68fb9c5d4b49cfee164 --- /dev/null +++ b/architecture/business-operations/webhook-integration-workflow/metadata.json @@ -0,0 +1,29 @@ +{ + "template_id": "webhook-integration-workflow", + "workflow_id": "webhook-integration", + "title": "Webhook Integration Workflow", + "kind": "workflow", + "source_domain": "business-operations", + "primary_use_case": "architecture", + "secondary_use_cases": [ + "patterns" + ], + "use_cases": [ + "architecture", + "patterns" + ], + "complexity": 2, + "num_nodes": 7, + "num_lanes": 2, + "tags": [ + "webhook", + "event-driven", + "http-callback", + "integration", + "retry-logic", + "payload-signing" + ], + "description": "Webhook integration workflow with endpoint registration, payload signing, delivery attempt, retry with backoff, and delivery status tracking.", + "source_path": "business-operations/webhook-integration", + "repo_path": "architecture/business-operations/webhook-integration-workflow" +} diff --git a/architecture/business-operations/webhook-integration-workflow/workflow.fz b/architecture/business-operations/webhook-integration-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..3c31c005bab867bd135fcc82e35ead54b4af3ee9 --- /dev/null +++ b/architecture/business-operations/webhook-integration-workflow/workflow.fz @@ -0,0 +1,55 @@ +ExternalService { # External Service + n1: circle label:"Start" + n2: rectangle label:"Event occurs" + n3: rectangle label:"Prepare webhook payload" + n4: rectangle label:"Send HTTP POST request" + n5: diamond label:"Response 2xx?" + n6: rectangle label:"Log successful delivery" + n7: circle label:"End" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n3.handle(left) + n3.handle(right) -> n4.handle(left) + n4.handle(bottom) -> WebhookReceiver.n8.handle(top) [label="POST /webhook"] + n5.handle(right) -> n6.handle(left) [label="Yes"] + n5.handle(bottom) -> RetryQueue.n15.handle(top) [label="No"] + n6.handle(right) -> n7.handle(left) +} + +WebhookReceiver { # Webhook Receiver + n8: rectangle label:"Validate signature header" + n9: diamond label:"Signature valid?" + n10: rectangle label:"Parse JSON payload" + n11: rectangle label:"Acknowledge with 200 OK" + n12: rectangle label:"Return 401 Unauthorized" + n13: rectangle label:"Queue for async processing" + n14: rectangle label:"Return 400 Bad Request" + n8.handle(right) -> n9.handle(left) + n9.handle(right) -> n10.handle(left) [label="Yes"] + n9.handle(bottom) -> n12.handle(top) [label="No"] + n10.handle(right) -> n11.handle(left) + n11.handle(right) -> n13.handle(left) + n12.handle(top) -> ExternalService.n5.handle(bottom) [label="401"] + n13.handle(bottom) -> EventProcessor.n18.handle(top) [label="Process"] + n14.handle(top) -> ExternalService.n5.handle(bottom) [label="400"] +} + +RetryQueue { # Retry Queue + n15: rectangle label:"Add to retry queue" + n16: rectangle label:"Wait with backoff" + n17: rectangle label:"Retry delivery" + n15.handle(right) -> n16.handle(left) + n16.handle(right) -> n17.handle(left) + n17.handle(top) -> ExternalService.n4.handle(bottom) [label="Retry"] + loop [retry up to 5 times] n15 n16 n17 +} + +EventProcessor { # Event Processor + n18: rectangle label:"Deserialize event data" + n19: rectangle label:"Route to handler" + n20: rectangle label:"Execute business logic" + n21: rectangle label:"Update local state" + n18.handle(right) -> n19.handle(left) + n19.handle(right) -> n20.handle(left) + n20.handle(right) -> n21.handle(left) + n21.handle(top) -> ExternalService.n7.handle(bottom) [label="Complete"] +} \ No newline at end of file diff --git a/architecture/patterns/event-driven-workflow/README.md b/architecture/patterns/event-driven-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..620b9396c6e3b59133db25325757715213be4074 --- /dev/null +++ b/architecture/patterns/event-driven-workflow/README.md @@ -0,0 +1,19 @@ +# Event Driven Workflow + +This workflow models reacting to incoming business events. + +**Template ID:** `event-driven-workflow` +**Kind:** workflow +**Source domain:** patterns +**Primary use case:** architecture +**Secondary use cases:** patterns +**Complexity:** 3/5 +**Nodes:** 10 +**Lanes:** 3 +**Tags:** [event, driven, patterns] +**Source path:** `patterns/event-driven` +**Repo path:** `architecture/patterns/event-driven-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/architecture/patterns/event-driven-workflow/metadata.json b/architecture/patterns/event-driven-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..45ddb66338e1883451b6abf469fb3d21e62cef54 --- /dev/null +++ b/architecture/patterns/event-driven-workflow/metadata.json @@ -0,0 +1,26 @@ +{ + "template_id": "event-driven-workflow", + "workflow_id": "event-driven", + "title": "Event Driven Workflow", + "kind": "workflow", + "source_domain": "patterns", + "primary_use_case": "architecture", + "secondary_use_cases": [ + "patterns" + ], + "use_cases": [ + "architecture", + "patterns" + ], + "complexity": 3, + "num_nodes": 10, + "num_lanes": 3, + "tags": [ + "event", + "driven", + "patterns" + ], + "description": "This workflow models reacting to incoming business events.", + "source_path": "patterns/event-driven", + "repo_path": "architecture/patterns/event-driven-workflow" +} diff --git a/architecture/patterns/event-driven-workflow/workflow.fz b/architecture/patterns/event-driven-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..41e6e791fa01ba28c77fe612275b826bae64e750 --- /dev/null +++ b/architecture/patterns/event-driven-workflow/workflow.fz @@ -0,0 +1,47 @@ +Producer { # Event Producer +n1: circle label:"Start" +n2: rectangle label:"User action occurs" +n3: rectangle label:"Create event payload" +n4: rectangle label:"Publish to message broker" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> MessageBroker.n6.handle(top) [label="Publish"] +n4.handle(right) -> n5.handle(left) +} +MessageBroker { # Message Broker +n6: rectangle label:"Receive event message" +n7: rectangle label:"Validate message schema" +n8: diamond label:"Valid schema?" +n9: rectangle label:"Route to topic partition" +n10: rectangle label:"Send to dead letter queue" +n11: rectangle label:"Acknowledge receipt" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n10.handle(top) [label="No"] +n9.handle(right) -> n11.handle(left) +n10.handle(top) -> Producer.n5.handle(bottom) [label="DLQ"] +n11.handle(top) -> Producer.n4.handle(bottom) [label="ACK"] +n11.handle(bottom) -> Consumer.n12.handle(top) [label="Deliver"] +} +Consumer { # Event Consumer +n12: rectangle label:"Poll for new messages" +n13: rectangle label:"Deserialize event" +n14: diamond label:"Event type?" +n15: rectangle label:"Handle order created" +n16: rectangle label:"Handle payment received" +n17: rectangle label:"Handle user registered" +n18: rectangle label:"Process business logic" +n19: rectangle label:"Commit offset" +n12.handle(right) -> n13.handle(left) +n13.handle(right) -> n14.handle(left) +n14.handle(right) -> n15.handle(left) [label="order.created"] +n14.handle(bottom) -> n16.handle(top) [label="payment.received"] +n14.handle(left) -> n17.handle(top) [label="user.registered"] +n15.handle(bottom) -> n18.handle(top) +n16.handle(bottom) -> n18.handle(top) +n17.handle(bottom) -> n18.handle(top) +n18.handle(right) -> n19.handle(left) +n19.handle(top) -> Producer.n5.handle(bottom) [label="Complete"] +} diff --git a/billing/business-operations/dunning-flow-workflow/workflow.fz b/billing/business-operations/dunning-flow-workflow/workflow.fz index 09fbabbf395158779a16cefad5aeb1942f42b6db..69ecf8632c608b508abd15fe30d704603b687f4e 100644 --- a/billing/business-operations/dunning-flow-workflow/workflow.fz +++ b/billing/business-operations/dunning-flow-workflow/workflow.fz @@ -1,43 +1,43 @@ -BillingSystem { # Billing System -n1: circle label:"Start" -n2: rectangle label:"Detect failed payment" -n3: rectangle label:"Log payment failure" -n4: diamond label:"First failure?" -n5: rectangle label:"Schedule retry in 24h" -n6: rectangle label:"Increment failure count" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(right) -> n4.handle(left) -n4.handle(right) -> n5.handle(left) [label="Yes"] -n4.handle(bottom) -> n6.handle(top) [label="No"] -n5.handle(bottom) -> PaymentRetry.n7.handle(top) [label="Queue"] -n6.handle(bottom) -> Notifications.n12.handle(top) [label="Escalate"] -} -PaymentRetry { # Payment Retry -n7: rectangle label:"Attempt payment retry" -n8: diamond label:"Payment successful?" -n9: rectangle label:"Update subscription status" -n10: rectangle label:"Mark retry failed" -n11: circle label:"End" -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) [label="Yes"] -n8.handle(bottom) -> n10.handle(top) [label="No"] -n9.handle(right) -> n11.handle(left) -n10.handle(bottom) -> Notifications.n12.handle(top) [label="Notify"] -} -Notifications { # Notifications -n12: rectangle label:"Send payment failed email" -n13: diamond label:"Max retries reached?" -n14: rectangle label:"Send final warning email" -n15: rectangle label:"Schedule next retry" -n16: rectangle label:"Suspend account" -n17: rectangle label:"Send suspension notice" -n12.handle(right) -> n13.handle(left) -n13.handle(right) -> n14.handle(left) [label="Yes"] -n13.handle(bottom) -> n15.handle(top) [label="No"] -n14.handle(right) -> n16.handle(left) -n15.handle(top) -> PaymentRetry.n7.handle(bottom) [label="Retry later"] -n16.handle(right) -> n17.handle(left) -n17.handle(top) -> PaymentRetry.n11.handle(bottom) [label="Complete"] -loop [retry up to 4 times] n7 n8 n10 n12 n13 n15 +BillingSystem { # Billing System +n1: circle label:"Start" +n2: rectangle label:"Detect failed payment" +n3: rectangle label:"Log payment failure" +n4: diamond label:"First failure?" +n5: rectangle label:"Schedule retry in 24h" +n6: rectangle label:"Increment failure count" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(right) -> n4.handle(left) +n4.handle(right) -> n5.handle(left) [label="Yes"] +n4.handle(bottom) -> n6.handle(top) [label="No"] +n5.handle(bottom) -> PaymentRetry.n7.handle(top) [label="Queue"] +n6.handle(bottom) -> Notifications.n12.handle(top) [label="Escalate"] +} +PaymentRetry { # Payment Retry +n7: rectangle label:"Attempt payment retry" +n8: diamond label:"Payment successful?" +n9: rectangle label:"Update subscription status" +n10: rectangle label:"Mark retry failed" +n11: circle label:"End" +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n10.handle(top) [label="No"] +n9.handle(right) -> n11.handle(left) +n10.handle(bottom) -> Notifications.n12.handle(top) [label="Notify"] +} +Notifications { # Notifications +n12: rectangle label:"Send payment failed email" +n13: diamond label:"Max retries reached?" +n14: rectangle label:"Send final warning email" +n15: rectangle label:"Schedule next retry" +n16: rectangle label:"Suspend account" +n17: rectangle label:"Send suspension notice" +n12.handle(right) -> n13.handle(left) +n13.handle(right) -> n14.handle(left) [label="Yes"] +n13.handle(bottom) -> n15.handle(top) [label="No"] +n14.handle(right) -> n16.handle(left) +n15.handle(top) -> PaymentRetry.n7.handle(bottom) [label="Retry later"] +n16.handle(right) -> n17.handle(left) +n17.handle(top) -> PaymentRetry.n11.handle(bottom) [label="Complete"] +loop [retry up to 4 times] n7 n8 n10 n12 n13 n15 } \ No newline at end of file diff --git a/billing/business-operations/payment-failure-workflow/README.md b/billing/business-operations/payment-failure-workflow/README.md index 88b4f2fcec428bc0ade7141dd3d7e19826334881..e961835515915cefdbe2c6b0f45468fb1243c57e 100644 --- a/billing/business-operations/payment-failure-workflow/README.md +++ b/billing/business-operations/payment-failure-workflow/README.md @@ -6,7 +6,7 @@ Failed payment recovery workflow with smart retry scheduling, dunning email sequ **Kind:** workflow **Source domain:** business-operations **Primary use case:** billing -**Secondary use cases:** None +**Secondary use cases:** commerce-automation, patterns **Complexity:** 3/5 **Nodes:** 7 **Lanes:** 2 diff --git a/billing/business-operations/payment-failure-workflow/metadata.json b/billing/business-operations/payment-failure-workflow/metadata.json index e469f37acb8a1951885dcfcdf342b810b2a57bd0..2bee00c2d8fe6beb7b147655ae8eb37a9ee1b229 100644 --- a/billing/business-operations/payment-failure-workflow/metadata.json +++ b/billing/business-operations/payment-failure-workflow/metadata.json @@ -5,9 +5,14 @@ "kind": "workflow", "source_domain": "business-operations", "primary_use_case": "billing", - "secondary_use_cases": [], + "secondary_use_cases": [ + "commerce-automation", + "patterns" + ], "use_cases": [ - "billing" + "billing", + "commerce-automation", + "patterns" ], "complexity": 3, "num_nodes": 7, diff --git a/billing/business-operations/payment-failure-workflow/workflow.fz b/billing/business-operations/payment-failure-workflow/workflow.fz index 167d271bbd359c0ee93395ef743456637ed3794f..a5da8bac44a322d0857baa2fc7c907d7db6ec438 100644 --- a/billing/business-operations/payment-failure-workflow/workflow.fz +++ b/billing/business-operations/payment-failure-workflow/workflow.fz @@ -1,43 +1,43 @@ -PaymentGateway { # Payment Gateway -n1: circle label:"Start" -n2: rectangle label:"Receive payment request" -n3: diamond label:"Card valid?" -n4: rectangle label:"Attempt charge" -n5: diamond label:"Charge successful?" -n6: rectangle label:"Return success response" -n7: rectangle label:"Log failure reason" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(right) -> n4.handle(left) [label="Yes"] -n3.handle(bottom) -> n7.handle(top) [label="No - Invalid"] -n4.handle(right) -> n5.handle(left) -n5.handle(right) -> n6.handle(left) [label="Yes"] -n5.handle(bottom) -> RetryEngine.n8.handle(top) [label="No - Declined"] -n6.handle(bottom) -> App.n15.handle(top) [label="Confirmed"] -n7.handle(bottom) -> App.n16.handle(top) [label="Card error"] -} -RetryEngine { # Retry Engine -n8: diamond label:"Retries remaining?" -n9: rectangle label:"Wait with exponential backoff" -n10: rectangle label:"Retry payment" -n11: rectangle label:"Mark as failed" -n8.handle(right) -> n9.handle(left) [label="Yes"] -n8.handle(bottom) -> n11.handle(top) [label="No"] -n9.handle(right) -> n10.handle(left) -n10.handle(top) -> PaymentGateway.n4.handle(bottom) [label="Retry"] -n11.handle(bottom) -> App.n16.handle(top) [label="Max retries"] -loop [retry up to 3 times] n8 n9 n10 -} -App { # Application -n12: rectangle label:"Update order status" -n13: rectangle label:"Send confirmation email" -n14: circle label:"End" -n15: rectangle label:"Mark payment complete" -n16: rectangle label:"Notify customer of failure" -n17: rectangle label:"Offer alternative payment" -n15.handle(right) -> n12.handle(left) -n12.handle(right) -> n13.handle(left) -n13.handle(right) -> n14.handle(left) -n16.handle(right) -> n17.handle(left) -n17.handle(right) -> n14.handle(top) +PaymentGateway { # Payment Gateway +n1: circle label:"Start" +n2: rectangle label:"Receive payment request" +n3: diamond label:"Card valid?" +n4: rectangle label:"Attempt charge" +n5: diamond label:"Charge successful?" +n6: rectangle label:"Return success response" +n7: rectangle label:"Log failure reason" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(right) -> n4.handle(left) [label="Yes"] +n3.handle(bottom) -> n7.handle(top) [label="No - Invalid"] +n4.handle(right) -> n5.handle(left) +n5.handle(right) -> n6.handle(left) [label="Yes"] +n5.handle(bottom) -> RetryEngine.n8.handle(top) [label="No - Declined"] +n6.handle(bottom) -> App.n15.handle(top) [label="Confirmed"] +n7.handle(bottom) -> App.n16.handle(top) [label="Card error"] +} +RetryEngine { # Retry Engine +n8: diamond label:"Retries remaining?" +n9: rectangle label:"Wait with exponential backoff" +n10: rectangle label:"Retry payment" +n11: rectangle label:"Mark as failed" +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n11.handle(top) [label="No"] +n9.handle(right) -> n10.handle(left) +n10.handle(top) -> PaymentGateway.n4.handle(bottom) [label="Retry"] +n11.handle(bottom) -> App.n16.handle(top) [label="Max retries"] +loop [retry up to 3 times] n8 n9 n10 +} +App { # Application +n12: rectangle label:"Update order status" +n13: rectangle label:"Send confirmation email" +n14: circle label:"End" +n15: rectangle label:"Mark payment complete" +n16: rectangle label:"Notify customer of failure" +n17: rectangle label:"Offer alternative payment" +n15.handle(right) -> n12.handle(left) +n12.handle(right) -> n13.handle(left) +n13.handle(right) -> n14.handle(left) +n16.handle(right) -> n17.handle(left) +n17.handle(right) -> n14.handle(top) } \ No newline at end of file diff --git a/billing/business-operations/plan-downgrade-workflow/workflow.fz b/billing/business-operations/plan-downgrade-workflow/workflow.fz index b016d9eaa609cb5b8ff9d7604fcde7baf3453079..6dc130b9ed2c6a0225c848bcc38637a7a5e9b957 100644 --- a/billing/business-operations/plan-downgrade-workflow/workflow.fz +++ b/billing/business-operations/plan-downgrade-workflow/workflow.fz @@ -1,55 +1,55 @@ -Customer { # Customer -n1: circle label:"Start" -n2: rectangle label:"Request plan downgrade" -n3: rectangle label:"Review feature changes" -n4: diamond label:"Confirm downgrade?" -n5: rectangle label:"Receive downgrade confirmation" -n6: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(bottom) -> RetentionFlow.n7.handle(top) [label="Process request"] -n3.handle(right) -> n4.handle(left) -n4.handle(right) -> n6.handle(left) [label="No - Keep plan"] -n4.handle(bottom) -> Billing.n14.handle(top) [label="Yes"] -n5.handle(right) -> n6.handle(left) -} -RetentionFlow { # Retention Flow -n7: rectangle label:"Check usage patterns" -n8: diamond label:"Heavy feature user?" -n9: rectangle label:"Offer discount to stay" -n10: rectangle label:"Show feature comparison" -n11: diamond label:"Accept offer?" -n12: rectangle label:"Apply retention discount" -n13: rectangle label:"Continue to downgrade" -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) [label="Yes"] -n8.handle(bottom) -> n10.handle(top) [label="No"] -n9.handle(right) -> n11.handle(left) -n10.handle(top) -> Customer.n3.handle(bottom) [label="Review"] -n11.handle(right) -> n12.handle(left) [label="Yes"] -n11.handle(bottom) -> n13.handle(top) [label="No"] -n12.handle(top) -> Customer.n6.handle(bottom) [label="Retained"] -n13.handle(top) -> Customer.n3.handle(bottom) [label="Proceed"] -} -Billing { # Billing System -n14: rectangle label:"Calculate credit balance" -n15: rectangle label:"Schedule plan change" -n16: diamond label:"Immediate or end of period?" -n17: rectangle label:"Apply immediately" -n18: rectangle label:"Queue for period end" -n19: rectangle label:"Issue prorated credit" -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n17.handle(left) [label="Immediate"] -n16.handle(bottom) -> n18.handle(top) [label="Period end"] -n17.handle(right) -> n19.handle(left) -n18.handle(bottom) -> Provisioning.n20.handle(top) [label="Scheduled"] -n19.handle(bottom) -> Provisioning.n20.handle(top) [label="Process"] -} -Provisioning { # Feature Provisioning -n20: rectangle label:"Disable premium features" -n21: rectangle label:"Update usage limits" -n22: rectangle label:"Send downgrade email" -n20.handle(right) -> n21.handle(left) -n21.handle(right) -> n22.handle(left) -n22.handle(top) -> Customer.n5.handle(bottom) [label="Complete"] +Customer { # Customer +n1: circle label:"Start" +n2: rectangle label:"Request plan downgrade" +n3: rectangle label:"Review feature changes" +n4: diamond label:"Confirm downgrade?" +n5: rectangle label:"Receive downgrade confirmation" +n6: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> RetentionFlow.n7.handle(top) [label="Process request"] +n3.handle(right) -> n4.handle(left) +n4.handle(right) -> n6.handle(left) [label="No - Keep plan"] +n4.handle(bottom) -> Billing.n14.handle(top) [label="Yes"] +n5.handle(right) -> n6.handle(left) +} +RetentionFlow { # Retention Flow +n7: rectangle label:"Check usage patterns" +n8: diamond label:"Heavy feature user?" +n9: rectangle label:"Offer discount to stay" +n10: rectangle label:"Show feature comparison" +n11: diamond label:"Accept offer?" +n12: rectangle label:"Apply retention discount" +n13: rectangle label:"Continue to downgrade" +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n10.handle(top) [label="No"] +n9.handle(right) -> n11.handle(left) +n10.handle(top) -> Customer.n3.handle(bottom) [label="Review"] +n11.handle(right) -> n12.handle(left) [label="Yes"] +n11.handle(bottom) -> n13.handle(top) [label="No"] +n12.handle(top) -> Customer.n6.handle(bottom) [label="Retained"] +n13.handle(top) -> Customer.n3.handle(bottom) [label="Proceed"] +} +Billing { # Billing System +n14: rectangle label:"Calculate credit balance" +n15: rectangle label:"Schedule plan change" +n16: diamond label:"Immediate or end of period?" +n17: rectangle label:"Apply immediately" +n18: rectangle label:"Queue for period end" +n19: rectangle label:"Issue prorated credit" +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n17.handle(left) [label="Immediate"] +n16.handle(bottom) -> n18.handle(top) [label="Period end"] +n17.handle(right) -> n19.handle(left) +n18.handle(bottom) -> Provisioning.n20.handle(top) [label="Scheduled"] +n19.handle(bottom) -> Provisioning.n20.handle(top) [label="Process"] +} +Provisioning { # Feature Provisioning +n20: rectangle label:"Disable premium features" +n21: rectangle label:"Update usage limits" +n22: rectangle label:"Send downgrade email" +n20.handle(right) -> n21.handle(left) +n21.handle(right) -> n22.handle(left) +n22.handle(top) -> Customer.n5.handle(bottom) [label="Complete"] } \ No newline at end of file diff --git a/billing/business-operations/plan-upgrade-workflow/workflow.fz b/billing/business-operations/plan-upgrade-workflow/workflow.fz index c6617d62aa55b347b4aef7dff14f570bb6ced19a..167f64cd63950e09d93ee2cc2c6b0e983dec9234 100644 --- a/billing/business-operations/plan-upgrade-workflow/workflow.fz +++ b/billing/business-operations/plan-upgrade-workflow/workflow.fz @@ -1,59 +1,59 @@ -Customer { # Customer - n1: circle label:"Start" - n2: rectangle label:"Select new plan tier" - n3: rectangle label:"Review price difference" - n4: rectangle label:"Enter payment details" - n5: rectangle label:"Receive upgrade confirmation" - n6: circle label:"End" - - n1.handle(right) -> n2.handle(left) - n2.handle(bottom) -> PricingEngine.n7.handle(top) [label="Calculate"] - n3.handle(right) -> n4.handle(left) - n4.handle(bottom) -> Billing.n12.handle(top) [label="Process payment"] - n5.handle(right) -> n6.handle(left) -} - -PricingEngine { # Pricing Engine - n7: rectangle label:"Fetch current subscription" - n8: rectangle label:"Calculate prorated amount" - n9: diamond label:"Credit balance available?" - n10: rectangle label:"Apply credit to upgrade" - n11: rectangle label:"Show full price" - - n7.handle(right) -> n8.handle(left) - n8.handle(right) -> n9.handle(left) - n9.handle(right) -> n10.handle(left) [label="Yes"] - n9.handle(bottom) -> n11.handle(top) [label="No"] - n10.handle(top) -> Customer.n3.handle(bottom) [label="Price ready"] - n11.handle(top) -> Customer.n3.handle(bottom) [label="Price ready"] -} - -Billing { # Billing System - n12: rectangle label:"Validate payment method" - n13: diamond label:"Payment valid?" - n14: rectangle label:"Charge prorated amount" - n15: rectangle label:"Return payment error" - n16: diamond label:"Charge successful?" - n17: rectangle label:"Update subscription tier" - n18: rectangle label:"Log failed charge" - - n12.handle(right) -> n13.handle(left) - n13.handle(right) -> n14.handle(left) [label="Yes"] - n13.handle(bottom) -> n15.handle(top) [label="No"] - n14.handle(right) -> n16.handle(left) - n15.handle(top) -> Customer.n4.handle(bottom) [label="Try again"] - n16.handle(right) -> n17.handle(left) [label="Yes"] - n16.handle(bottom) -> n18.handle(top) [label="No"] - n17.handle(bottom) -> Provisioning.n19.handle(top) [label="Activate"] - n18.handle(top) -> Customer.n4.handle(bottom) [label="Retry"] -} - -Provisioning { # Feature Provisioning - n19: rectangle label:"Enable premium features" - n20: rectangle label:"Update usage limits" - n21: rectangle label:"Send upgrade email" - - n19.handle(right) -> n20.handle(left) - n20.handle(right) -> n21.handle(left) - n21.handle(top) -> Customer.n5.handle(bottom) [label="Complete"] +Customer { # Customer + n1: circle label:"Start" + n2: rectangle label:"Select new plan tier" + n3: rectangle label:"Review price difference" + n4: rectangle label:"Enter payment details" + n5: rectangle label:"Receive upgrade confirmation" + n6: circle label:"End" + + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> PricingEngine.n7.handle(top) [label="Calculate"] + n3.handle(right) -> n4.handle(left) + n4.handle(bottom) -> Billing.n12.handle(top) [label="Process payment"] + n5.handle(right) -> n6.handle(left) +} + +PricingEngine { # Pricing Engine + n7: rectangle label:"Fetch current subscription" + n8: rectangle label:"Calculate prorated amount" + n9: diamond label:"Credit balance available?" + n10: rectangle label:"Apply credit to upgrade" + n11: rectangle label:"Show full price" + + n7.handle(right) -> n8.handle(left) + n8.handle(right) -> n9.handle(left) + n9.handle(right) -> n10.handle(left) [label="Yes"] + n9.handle(bottom) -> n11.handle(top) [label="No"] + n10.handle(top) -> Customer.n3.handle(bottom) [label="Price ready"] + n11.handle(top) -> Customer.n3.handle(bottom) [label="Price ready"] +} + +Billing { # Billing System + n12: rectangle label:"Validate payment method" + n13: diamond label:"Payment valid?" + n14: rectangle label:"Charge prorated amount" + n15: rectangle label:"Return payment error" + n16: diamond label:"Charge successful?" + n17: rectangle label:"Update subscription tier" + n18: rectangle label:"Log failed charge" + + n12.handle(right) -> n13.handle(left) + n13.handle(right) -> n14.handle(left) [label="Yes"] + n13.handle(bottom) -> n15.handle(top) [label="No"] + n14.handle(right) -> n16.handle(left) + n15.handle(top) -> Customer.n4.handle(bottom) [label="Try again"] + n16.handle(right) -> n17.handle(left) [label="Yes"] + n16.handle(bottom) -> n18.handle(top) [label="No"] + n17.handle(bottom) -> Provisioning.n19.handle(top) [label="Activate"] + n18.handle(top) -> Customer.n4.handle(bottom) [label="Retry"] +} + +Provisioning { # Feature Provisioning + n19: rectangle label:"Enable premium features" + n20: rectangle label:"Update usage limits" + n21: rectangle label:"Send upgrade email" + + n19.handle(right) -> n20.handle(left) + n20.handle(right) -> n21.handle(left) + n21.handle(top) -> Customer.n5.handle(bottom) [label="Complete"] } \ No newline at end of file diff --git a/billing/business-operations/shopify-universal-commerce-protocol/README.md b/billing/business-operations/shopify-universal-commerce-protocol/README.md index 02606f9c619dbdde2ee2c073187db7c781a388d8..7730e470226f8ae285a2fa0496e185b8d0b54699 100644 --- a/billing/business-operations/shopify-universal-commerce-protocol/README.md +++ b/billing/business-operations/shopify-universal-commerce-protocol/README.md @@ -6,7 +6,7 @@ End-to-end agentic commerce workflow showing how an AI assistant (ChatGPT) orche **Kind:** workflow **Source domain:** business-operations **Primary use case:** billing -**Secondary use cases:** agentic +**Secondary use cases:** agentic, commerce-automation **Complexity:** 4/5 **Nodes:** 47 **Lanes:** 5 diff --git a/billing/business-operations/shopify-universal-commerce-protocol/metadata.json b/billing/business-operations/shopify-universal-commerce-protocol/metadata.json index 214fc0e7003f5a10ebfb909b684038f5a4390637..7dad31fd570187cbd06f9f17ad5436f42f64d685 100644 --- a/billing/business-operations/shopify-universal-commerce-protocol/metadata.json +++ b/billing/business-operations/shopify-universal-commerce-protocol/metadata.json @@ -6,11 +6,13 @@ "source_domain": "business-operations", "primary_use_case": "billing", "secondary_use_cases": [ - "agentic" + "agentic", + "commerce-automation" ], "use_cases": [ "billing", - "agentic" + "agentic", + "commerce-automation" ], "complexity": 4, "num_nodes": 47, diff --git a/billing/business-operations/shopify-universal-commerce-protocol/workflow.fz b/billing/business-operations/shopify-universal-commerce-protocol/workflow.fz index 9e146347246a038bea33b95a33281a16df4e09d6..8a667d06504c6c66c3a3bce3b81542c9fdd6c529 100644 --- a/billing/business-operations/shopify-universal-commerce-protocol/workflow.fz +++ b/billing/business-operations/shopify-universal-commerce-protocol/workflow.fz @@ -1,107 +1,107 @@ -HumanShopper { # Human Shopper - n1: circle label:"Start: open ChatGPT" - n2: rectangle label:"Ask for a product" - n14: rectangle label:"Review recommendations" - n15: rectangle label:"Choose a product" - n24: rectangle label:"Provide address & prefs" - n33: rectangle label:"Confirm payment" - n47: circle label:"Order confirmed" - n1.handle(right) -> n2.handle(left) - n2.handle(right) -> ChatGPTAssistant.n3.handle(left) [label="Product request"] - n14.handle(right) -> n15.handle(left) - n15.handle(right) -> ChatGPTAssistant.n16.handle(left) [label="Selected product"] - n24.handle(right) -> ChatGPTAssistant.n25.handle(left) [label="Address & prefs"] - n33.handle(right) -> ChatGPTAssistant.n34.handle(left) [label="Payment confirmed"] -} - -ChatGPTAssistant { # ChatGPT AI Assistant - n3: rectangle label:"Receive request & interpret intent" - n4: rectangle label:"Build structured search query" - n5: rectangle label:"Search via UCP gateway" - n11: rectangle label:"Receive UCP offers" - n12: rectangle label:"Rank & present recommendations" - n13: rectangle label:"Send recommendations to shopper" - n16: rectangle label:"Receive product selection" - n17: rectangle label:"Create checkout session via UCP" - n21: rectangle label:"Receive required checkout fields" - n22: rectangle label:"Ask shopper for missing info" - n23: rectangle label:"(wait for shopper)" - n25: rectangle label:"Receive shopper info" - n26: rectangle label:"Submit buyer details via UCP" - n30: rectangle label:"Receive final order summary" - n31: rectangle label:"Ask shopper to confirm payment" - n32: rectangle label:"(wait for confirmation)" - n34: rectangle label:"Receive payment confirmation" - n35: rectangle label:"Send payment intent via UCP" - n44: rectangle label:"Receive final order status" - n45: rectangle label:"Display confirmation" - n46: rectangle label:"(notify shopper)" - n3.handle(right) -> n4.handle(left) - n4.handle(right) -> n5.handle(left) - n5.handle(right) -> ShopifyUCPGateway.n6.handle(left) [label="Catalog search"] - n11.handle(right) -> n12.handle(left) - n12.handle(right) -> n13.handle(left) - n13.handle(left) -> HumanShopper.n14.handle(right) [label="Recommendations"] - n16.handle(right) -> n17.handle(left) - n17.handle(right) -> ShopifyUCPGateway.n18.handle(left) [label="Create checkout"] - n21.handle(right) -> n22.handle(left) - n22.handle(right) -> n23.handle(left) - n23.handle(left) -> HumanShopper.n24.handle(right) [label="Request address & prefs"] - n25.handle(right) -> n26.handle(left) - n26.handle(right) -> ShopifyUCPGateway.n27.handle(left) [label="Buyer details"] - n30.handle(right) -> n31.handle(left) - n31.handle(right) -> n32.handle(left) - n32.handle(left) -> HumanShopper.n33.handle(right) [label="Confirm payment?"] - n34.handle(right) -> n35.handle(left) - n35.handle(right) -> ShopifyUCPGateway.n36.handle(left) [label="Payment intent"] - n44.handle(right) -> n45.handle(left) - n45.handle(right) -> n46.handle(left) - n46.handle(left) -> HumanShopper.n47.handle(right) [label="Order confirmed"] -} - -ShopifyUCPGateway { # Shopify UCP Gateway - n6: rectangle label:"Normalize search request" - n7: rectangle label:"Query Shopify Store catalog" - n10: rectangle label:"Assemble & return UCP offers" - n18: rectangle label:"Create checkout session" - n19: rectangle label:"Initialize checkout with Store" - n20: rectangle label:"Return required fields" - n27: rectangle label:"Update checkout with buyer data" - n28: rectangle label:"Recalculate totals via Store" - n29: rectangle label:"Return order summary" - n36: rectangle label:"Forward payment authorization" - n38: rectangle label:"Receive payment result" - n39: rectangle label:"Create order in Store" - n42: rectangle label:"Receive order confirmation" - n43: rectangle label:"Return final order status" - n6.handle(right) -> n7.handle(left) - n7.handle(right) -> ShopifyStoreCatalog.n8.handle(left) [label="Catalog query"] - n10.handle(left) -> ChatGPTAssistant.n11.handle(right) [label="UCP offers"] - n18.handle(right) -> n19.handle(left) - n19.handle(right) -> n20.handle(left) - n20.handle(left) -> ChatGPTAssistant.n21.handle(right) [label="Required fields"] - n27.handle(right) -> n28.handle(left) - n28.handle(right) -> n29.handle(left) - n29.handle(left) -> ChatGPTAssistant.n30.handle(right) [label="Order summary"] - n36.handle(right) -> PaymentProcessor.n37.handle(left) [label="Authorize/capture"] - n38.handle(right) -> n39.handle(left) - n39.handle(right) -> ShopifyStoreCatalog.n40.handle(left) [label="Create order"] - n42.handle(right) -> n43.handle(left) - n43.handle(left) -> ChatGPTAssistant.n44.handle(right) [label="Order status"] -} - -ShopifyStoreCatalog { # Shopify Store & Catalog - n8: rectangle label:"Search catalog for products" - n9: rectangle label:"Return matching products" - n40: rectangle label:"Persist order" - n41: rectangle label:"Return order confirmation" - n8.handle(bottom) -> n9.handle(top) - n9.handle(left) -> ShopifyUCPGateway.n10.handle(right) [label="Matching products"] - n40.handle(bottom) -> n41.handle(top) - n41.handle(left) -> ShopifyUCPGateway.n42.handle(right) [label="Order confirmation"] -} - -PaymentProcessor { # Payment Processor - n37: rectangle label:"Authorize & capture payment" - n37.handle(left) -> ShopifyUCPGateway.n38.handle(right) [label="Payment result"] -} +HumanShopper { # Human Shopper + n1: circle label:"Start: open ChatGPT" + n2: rectangle label:"Ask for a product" + n14: rectangle label:"Review recommendations" + n15: rectangle label:"Choose a product" + n24: rectangle label:"Provide address & prefs" + n33: rectangle label:"Confirm payment" + n47: circle label:"Order confirmed" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> ChatGPTAssistant.n3.handle(left) [label="Product request"] + n14.handle(right) -> n15.handle(left) + n15.handle(right) -> ChatGPTAssistant.n16.handle(left) [label="Selected product"] + n24.handle(right) -> ChatGPTAssistant.n25.handle(left) [label="Address & prefs"] + n33.handle(right) -> ChatGPTAssistant.n34.handle(left) [label="Payment confirmed"] +} + +ChatGPTAssistant { # ChatGPT AI Assistant + n3: rectangle label:"Receive request & interpret intent" + n4: rectangle label:"Build structured search query" + n5: rectangle label:"Search via UCP gateway" + n11: rectangle label:"Receive UCP offers" + n12: rectangle label:"Rank & present recommendations" + n13: rectangle label:"Send recommendations to shopper" + n16: rectangle label:"Receive product selection" + n17: rectangle label:"Create checkout session via UCP" + n21: rectangle label:"Receive required checkout fields" + n22: rectangle label:"Ask shopper for missing info" + n23: rectangle label:"(wait for shopper)" + n25: rectangle label:"Receive shopper info" + n26: rectangle label:"Submit buyer details via UCP" + n30: rectangle label:"Receive final order summary" + n31: rectangle label:"Ask shopper to confirm payment" + n32: rectangle label:"(wait for confirmation)" + n34: rectangle label:"Receive payment confirmation" + n35: rectangle label:"Send payment intent via UCP" + n44: rectangle label:"Receive final order status" + n45: rectangle label:"Display confirmation" + n46: rectangle label:"(notify shopper)" + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) + n5.handle(right) -> ShopifyUCPGateway.n6.handle(left) [label="Catalog search"] + n11.handle(right) -> n12.handle(left) + n12.handle(right) -> n13.handle(left) + n13.handle(left) -> HumanShopper.n14.handle(right) [label="Recommendations"] + n16.handle(right) -> n17.handle(left) + n17.handle(right) -> ShopifyUCPGateway.n18.handle(left) [label="Create checkout"] + n21.handle(right) -> n22.handle(left) + n22.handle(right) -> n23.handle(left) + n23.handle(left) -> HumanShopper.n24.handle(right) [label="Request address & prefs"] + n25.handle(right) -> n26.handle(left) + n26.handle(right) -> ShopifyUCPGateway.n27.handle(left) [label="Buyer details"] + n30.handle(right) -> n31.handle(left) + n31.handle(right) -> n32.handle(left) + n32.handle(left) -> HumanShopper.n33.handle(right) [label="Confirm payment?"] + n34.handle(right) -> n35.handle(left) + n35.handle(right) -> ShopifyUCPGateway.n36.handle(left) [label="Payment intent"] + n44.handle(right) -> n45.handle(left) + n45.handle(right) -> n46.handle(left) + n46.handle(left) -> HumanShopper.n47.handle(right) [label="Order confirmed"] +} + +ShopifyUCPGateway { # Shopify UCP Gateway + n6: rectangle label:"Normalize search request" + n7: rectangle label:"Query Shopify Store catalog" + n10: rectangle label:"Assemble & return UCP offers" + n18: rectangle label:"Create checkout session" + n19: rectangle label:"Initialize checkout with Store" + n20: rectangle label:"Return required fields" + n27: rectangle label:"Update checkout with buyer data" + n28: rectangle label:"Recalculate totals via Store" + n29: rectangle label:"Return order summary" + n36: rectangle label:"Forward payment authorization" + n38: rectangle label:"Receive payment result" + n39: rectangle label:"Create order in Store" + n42: rectangle label:"Receive order confirmation" + n43: rectangle label:"Return final order status" + n6.handle(right) -> n7.handle(left) + n7.handle(right) -> ShopifyStoreCatalog.n8.handle(left) [label="Catalog query"] + n10.handle(left) -> ChatGPTAssistant.n11.handle(right) [label="UCP offers"] + n18.handle(right) -> n19.handle(left) + n19.handle(right) -> n20.handle(left) + n20.handle(left) -> ChatGPTAssistant.n21.handle(right) [label="Required fields"] + n27.handle(right) -> n28.handle(left) + n28.handle(right) -> n29.handle(left) + n29.handle(left) -> ChatGPTAssistant.n30.handle(right) [label="Order summary"] + n36.handle(right) -> PaymentProcessor.n37.handle(left) [label="Authorize/capture"] + n38.handle(right) -> n39.handle(left) + n39.handle(right) -> ShopifyStoreCatalog.n40.handle(left) [label="Create order"] + n42.handle(right) -> n43.handle(left) + n43.handle(left) -> ChatGPTAssistant.n44.handle(right) [label="Order status"] +} + +ShopifyStoreCatalog { # Shopify Store & Catalog + n8: rectangle label:"Search catalog for products" + n9: rectangle label:"Return matching products" + n40: rectangle label:"Persist order" + n41: rectangle label:"Return order confirmation" + n8.handle(bottom) -> n9.handle(top) + n9.handle(left) -> ShopifyUCPGateway.n10.handle(right) [label="Matching products"] + n40.handle(bottom) -> n41.handle(top) + n41.handle(left) -> ShopifyUCPGateway.n42.handle(right) [label="Order confirmation"] +} + +PaymentProcessor { # Payment Processor + n37: rectangle label:"Authorize & capture payment" + n37.handle(left) -> ShopifyUCPGateway.n38.handle(right) [label="Payment result"] +} diff --git a/billing/business-operations/subscription-lifecycle-workflow/README.md b/billing/business-operations/subscription-lifecycle-workflow/README.md index 252be33e9e82b2b884a1ab8b983ba08d27d4a908..d9dcf43ee2ba2d8f0c3bf796b3a5740d54581f93 100644 --- a/billing/business-operations/subscription-lifecycle-workflow/README.md +++ b/billing/business-operations/subscription-lifecycle-workflow/README.md @@ -6,7 +6,7 @@ SaaS subscription lifecycle workflow with trial signup, conversion nurturing, pa **Kind:** workflow **Source domain:** business-operations **Primary use case:** billing -**Secondary use cases:** None +**Secondary use cases:** commerce-automation **Complexity:** 4/5 **Nodes:** 10 **Lanes:** 3 diff --git a/billing/business-operations/subscription-lifecycle-workflow/metadata.json b/billing/business-operations/subscription-lifecycle-workflow/metadata.json index b29c50e1d6bf2c8bef98a4185dd26b9c49a81d9b..1e2198f5caf946d029562bde651da65381ab5eff 100644 --- a/billing/business-operations/subscription-lifecycle-workflow/metadata.json +++ b/billing/business-operations/subscription-lifecycle-workflow/metadata.json @@ -5,9 +5,12 @@ "kind": "workflow", "source_domain": "business-operations", "primary_use_case": "billing", - "secondary_use_cases": [], + "secondary_use_cases": [ + "commerce-automation" + ], "use_cases": [ - "billing" + "billing", + "commerce-automation" ], "complexity": 4, "num_nodes": 10, diff --git a/billing/business-operations/subscription-lifecycle-workflow/workflow.fz b/billing/business-operations/subscription-lifecycle-workflow/workflow.fz index 91b5877d8b05ab035c7de54826e82ea2aae4680c..4aadc232b785fda471074dd0cdc514aee9dd748e 100644 --- a/billing/business-operations/subscription-lifecycle-workflow/workflow.fz +++ b/billing/business-operations/subscription-lifecycle-workflow/workflow.fz @@ -1,53 +1,53 @@ -Stripe { # Stripe Webhooks -n1: circle label:"Start" -n2: rectangle label:"Receive webhook event" -n3: diamond label:"Event type?" -n4: rectangle label:"Handle subscription.created" -n5: rectangle label:"Handle invoice.paid" -n6: rectangle label:"Handle subscription.canceled" -n7: rectangle label:"Handle invoice.payment_failed" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(right) -> n4.handle(left) [label="created"] -n3.handle(bottom) -> n5.handle(top) [label="paid"] -n3.handle(left) -> n6.handle(top) [label="canceled"] -n3.handle(top) -> n7.handle(top) [label="failed"] -n4.handle(bottom) -> Provisioning.n8.handle(top) [label="Provision"] -n5.handle(bottom) -> Provisioning.n12.handle(top) [label="Extend"] -n6.handle(bottom) -> Provisioning.n14.handle(top) [label="Revoke"] -n7.handle(bottom) -> Dunning.n17.handle(top) [label="Retry"] -} -Provisioning { # Account Provisioning -n8: rectangle label:"Create user account" -n9: rectangle label:"Assign plan features" -n10: rectangle label:"Send welcome email" -n11: circle label:"End" -n12: rectangle label:"Update billing period" -n13: rectangle label:"Send receipt email" -n14: rectangle label:"Disable premium features" -n15: rectangle label:"Archive user data" -n16: rectangle label:"Send cancellation email" -n8.handle(right) -> n9.handle(left) -n9.handle(right) -> n10.handle(left) -n10.handle(right) -> n11.handle(left) -n12.handle(right) -> n13.handle(left) -n13.handle(right) -> n11.handle(top) -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n11.handle(top) -} -Dunning { # Dunning Management -n17: rectangle label:"Log payment failure" -n18: diamond label:"Retry count?" -n19: rectangle label:"Schedule retry charge" -n20: rectangle label:"Send payment reminder" -n21: rectangle label:"Suspend account" -n22: rectangle label:"Send final notice" -n17.handle(right) -> n18.handle(left) -n18.handle(right) -> n19.handle(left) [label="< 3"] -n18.handle(bottom) -> n21.handle(top) [label=">= 3"] -n19.handle(right) -> n20.handle(left) -n20.handle(top) -> Provisioning.n11.handle(bottom) [label="Wait"] -n21.handle(right) -> n22.handle(left) -n22.handle(top) -> Provisioning.n11.handle(bottom) [label="Suspended"] +Stripe { # Stripe Webhooks +n1: circle label:"Start" +n2: rectangle label:"Receive webhook event" +n3: diamond label:"Event type?" +n4: rectangle label:"Handle subscription.created" +n5: rectangle label:"Handle invoice.paid" +n6: rectangle label:"Handle subscription.canceled" +n7: rectangle label:"Handle invoice.payment_failed" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(right) -> n4.handle(left) [label="created"] +n3.handle(bottom) -> n5.handle(top) [label="paid"] +n3.handle(left) -> n6.handle(top) [label="canceled"] +n3.handle(top) -> n7.handle(top) [label="failed"] +n4.handle(bottom) -> Provisioning.n8.handle(top) [label="Provision"] +n5.handle(bottom) -> Provisioning.n12.handle(top) [label="Extend"] +n6.handle(bottom) -> Provisioning.n14.handle(top) [label="Revoke"] +n7.handle(bottom) -> Dunning.n17.handle(top) [label="Retry"] +} +Provisioning { # Account Provisioning +n8: rectangle label:"Create user account" +n9: rectangle label:"Assign plan features" +n10: rectangle label:"Send welcome email" +n11: circle label:"End" +n12: rectangle label:"Update billing period" +n13: rectangle label:"Send receipt email" +n14: rectangle label:"Disable premium features" +n15: rectangle label:"Archive user data" +n16: rectangle label:"Send cancellation email" +n8.handle(right) -> n9.handle(left) +n9.handle(right) -> n10.handle(left) +n10.handle(right) -> n11.handle(left) +n12.handle(right) -> n13.handle(left) +n13.handle(right) -> n11.handle(top) +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n11.handle(top) +} +Dunning { # Dunning Management +n17: rectangle label:"Log payment failure" +n18: diamond label:"Retry count?" +n19: rectangle label:"Schedule retry charge" +n20: rectangle label:"Send payment reminder" +n21: rectangle label:"Suspend account" +n22: rectangle label:"Send final notice" +n17.handle(right) -> n18.handle(left) +n18.handle(right) -> n19.handle(left) [label="< 3"] +n18.handle(bottom) -> n21.handle(top) [label=">= 3"] +n19.handle(right) -> n20.handle(left) +n20.handle(top) -> Provisioning.n11.handle(bottom) [label="Wait"] +n21.handle(right) -> n22.handle(left) +n22.handle(top) -> Provisioning.n11.handle(bottom) [label="Suspended"] } \ No newline at end of file diff --git a/billing/commerce-automation/agent-mediated-fiat-payment-workflow/README.md b/billing/commerce-automation/agent-mediated-fiat-payment-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..27abaa46d28b9bd41bee02f90921520bfff881e9 --- /dev/null +++ b/billing/commerce-automation/agent-mediated-fiat-payment-workflow/README.md @@ -0,0 +1,19 @@ +# Agent-Mediated Fiat Payment Workflow + +Stripe Agent Toolkit flow: the consumer approves an agent spend, the agent requests a scoped token, passes it to the merchant and the order completes in fiat. + +**Template ID:** `agent-mediated-fiat-payment-workflow` +**Kind:** workflow +**Source domain:** Commerce Automation +**Primary use case:** billing +**Secondary use cases:** commerce-automation +**Complexity:** 2/5 +**Nodes:** 11 +**Lanes:** 4 +**Tags:** [stripe, agent-toolkit, shared-payment-token, fiat, agent-payments] +**Source path:** `` +**Repo path:** `billing/commerce-automation/agent-mediated-fiat-payment-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/billing/commerce-automation/agent-mediated-fiat-payment-workflow/metadata.json b/billing/commerce-automation/agent-mediated-fiat-payment-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..a061f16a5584ce1b6d7d4f69bd99a3fa554fc47f --- /dev/null +++ b/billing/commerce-automation/agent-mediated-fiat-payment-workflow/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "agent-mediated-fiat-payment-workflow", + "workflow_id": "agent-mediated-fiat-payment", + "title": "Agent-Mediated Fiat Payment Workflow", + "kind": "workflow", + "source_domain": "Commerce Automation", + "primary_use_case": "billing", + "secondary_use_cases": [ + "commerce-automation" + ], + "use_cases": [ + "billing", + "commerce-automation" + ], + "complexity": 2, + "num_nodes": 11, + "num_lanes": 4, + "tags": [ + "stripe", + "agent-toolkit", + "shared-payment-token", + "fiat", + "agent-payments" + ], + "description": "Stripe Agent Toolkit flow: the consumer approves an agent spend, the agent requests a scoped token, passes it to the merchant and the order completes in fiat.", + "source_path": "", + "repo_path": "billing/commerce-automation/agent-mediated-fiat-payment-workflow" +} diff --git a/billing/commerce-automation/agent-mediated-fiat-payment-workflow/workflow.fz b/billing/commerce-automation/agent-mediated-fiat-payment-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..04bab351cc6353847d96e812b631a5efae03a6d5 --- /dev/null +++ b/billing/commerce-automation/agent-mediated-fiat-payment-workflow/workflow.fz @@ -0,0 +1,32 @@ +buyer { # Consumer +n1: circle label:"Start Checkout" +n2: rectangle label:"Approve Agent Spend" +n11: circle label:"Purchase Complete" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> agent.n3.handle(top) [label="Authorize"] +} + +agent { # AI Assistant +n3: rectangle label:"Request Scoped Token" +n6: rectangle label:"Pass Token to Merchant" +n10: rectangle label:"Confirm Order" +n3.handle(bottom) -> stripe.n4.handle(top) [label="Get SPT"] +n6.handle(bottom) -> merchant.n7.handle(top) [label="Send Token"] +n10.handle(top) -> buyer.n11.handle(bottom) [label="Done"] +} + +stripe { # Stripe Core +n4: rectangle label:"Create Shared Payment Token" +n5: rectangle label:"Run Radar Fraud Checks" +n9: rectangle label:"Approve Fiat Payment" +n4.handle(top) -> agent.n6.handle(bottom) [label="Return SPT"] +n5.handle(right) -> n9.handle(left) +n9.handle(top) -> merchant.n8.handle(bottom) [label="Success"] +} + +merchant { # E-commerce Store +n7: rectangle label:"Create PaymentIntent" +n8: rectangle label:"Complete Fiat Order" +n7.handle(bottom) -> stripe.n5.handle(top) [label="Validate SPT"] +n8.handle(top) -> agent.n10.handle(bottom) [label="Order Success"] +} diff --git a/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/README.md b/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fd150af50d85582f669dad8ff9bfc2b579d39237 --- /dev/null +++ b/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/README.md @@ -0,0 +1,19 @@ +# Agent-to-Agent USDC Payment Workflow + +Coinbase AgentKit flow: a human allocates a USDC budget, the agent authenticates its Base wallet, pays an x402 invoice and processes the supplier data, with no fiat in the path. + +**Template ID:** `agent-to-agent-usdc-payment-workflow` +**Kind:** workflow +**Source domain:** Commerce Automation +**Primary use case:** billing +**Secondary use cases:** commerce-automation +**Complexity:** 2/5 +**Nodes:** 9 +**Lanes:** 3 +**Tags:** [coinbase, agentkit, usdc, x402, agent-payments, stablecoin] +**Source path:** `` +**Repo path:** `billing/commerce-automation/agent-to-agent-usdc-payment-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/metadata.json b/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..e3c02ff5360b601b44ef4e709beecec3786e60c0 --- /dev/null +++ b/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/metadata.json @@ -0,0 +1,29 @@ +{ + "template_id": "agent-to-agent-usdc-payment-workflow", + "workflow_id": "agent-to-agent-usdc-payment", + "title": "Agent-to-Agent USDC Payment Workflow", + "kind": "workflow", + "source_domain": "Commerce Automation", + "primary_use_case": "billing", + "secondary_use_cases": [ + "commerce-automation" + ], + "use_cases": [ + "billing", + "commerce-automation" + ], + "complexity": 2, + "num_nodes": 9, + "num_lanes": 3, + "tags": [ + "coinbase", + "agentkit", + "usdc", + "x402", + "agent-payments", + "stablecoin" + ], + "description": "Coinbase AgentKit flow: a human allocates a USDC budget, the agent authenticates its Base wallet, pays an x402 invoice and processes the supplier data, with no fiat in the path.", + "source_path": "", + "repo_path": "billing/commerce-automation/agent-to-agent-usdc-payment-workflow" +} diff --git a/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/workflow.fz b/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..f5047ccc37e4ae0da35df2f59a70342e33a1315b --- /dev/null +++ b/billing/commerce-automation/agent-to-agent-usdc-payment-workflow/workflow.fz @@ -0,0 +1,25 @@ +user { # Human User +n1: circle label:"Start Task" +n2: rectangle label:"Allocate USDC Budget" +n9: circle label:"Task Complete" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> agent.n3.handle(top) [label="Start Session"] +} + +agent { # AI Agent +n3: rectangle label:"Authenticate Base Wallet" +n4: rectangle label:"Ping Global Supplier API" +n7: rectangle label:"Pay x402 Invoice via USDC" +n8: rectangle label:"Process Supplier Data" +n3.handle(right) -> n4.handle(left) +n4.handle(bottom) -> supplier.n5.handle(top) [label="Data Request"] +n7.handle(bottom) -> supplier.n6.handle(top) [label="Send Crypto"] +n8.handle(top) -> user.n9.handle(bottom) [label="Result"] +} + +supplier { # Supplier API +n5: rectangle label:"Return 402 Payment Required" +n6: rectangle label:"Verify Onchain Transfer" +n5.handle(top) -> agent.n7.handle(bottom) [label="x402 Invoice"] +n6.handle(top) -> agent.n8.handle(bottom) [label="Unlock Data"] +} diff --git a/billing/commerce-automation/agentic-commerce-checkout-architecture/README.md b/billing/commerce-automation/agentic-commerce-checkout-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..10f029b05baf5102f108f33b8cfa558ba82aaec4 --- /dev/null +++ b/billing/commerce-automation/agentic-commerce-checkout-architecture/README.md @@ -0,0 +1,19 @@ +# Agentic Commerce Checkout Architecture + +Five-lane architecture for agent-driven checkout: merchant edge, commerce services, payment stack, fulfillment and the approval gate before an order is authorized. + +**Template ID:** `agentic-commerce-checkout-architecture` +**Kind:** workflow +**Source domain:** Commerce Automation +**Primary use case:** billing +**Secondary use cases:** agentic, commerce-automation +**Complexity:** 3/5 +**Nodes:** 21 +**Lanes:** 5 +**Tags:** [agentic-commerce, chatgpt-commerce, checkout, merchant, payments] +**Source path:** `` +**Repo path:** `billing/commerce-automation/agentic-commerce-checkout-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/billing/commerce-automation/agentic-commerce-checkout-architecture/metadata.json b/billing/commerce-automation/agentic-commerce-checkout-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..850fc1519eb29459df6c47e1e1566629bafe6544 --- /dev/null +++ b/billing/commerce-automation/agentic-commerce-checkout-architecture/metadata.json @@ -0,0 +1,30 @@ +{ + "template_id": "agentic-commerce-checkout-architecture", + "workflow_id": "agentic-commerce-checkout-architecture", + "title": "Agentic Commerce Checkout Architecture", + "kind": "workflow", + "source_domain": "Commerce Automation", + "primary_use_case": "billing", + "secondary_use_cases": [ + "agentic", + "commerce-automation" + ], + "use_cases": [ + "billing", + "agentic", + "commerce-automation" + ], + "complexity": 3, + "num_nodes": 21, + "num_lanes": 5, + "tags": [ + "agentic-commerce", + "chatgpt-commerce", + "checkout", + "merchant", + "payments" + ], + "description": "Five-lane architecture for agent-driven checkout: merchant edge, commerce services, payment stack, fulfillment and the approval gate before an order is authorized.", + "source_path": "", + "repo_path": "billing/commerce-automation/agentic-commerce-checkout-architecture" +} diff --git a/billing/commerce-automation/agentic-commerce-checkout-architecture/workflow.fz b/billing/commerce-automation/agentic-commerce-checkout-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..5889e0df5726551369d99c30d3366a983004724a --- /dev/null +++ b/billing/commerce-automation/agentic-commerce-checkout-architecture/workflow.fz @@ -0,0 +1,61 @@ +merchantEdge { # Merchant Edge + n1: rectangle label:"Publish product feed" + n2: rectangle label:"Validate feed" + n3: rectangle label:"Expose ACP endpoints" + n4: rectangle label:"Create checkout session" + n5: diamond label:"Approve order?" + n6: rectangle label:"Return order outcome" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n3.handle(left) + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) + n5.handle(right) -> n6.handle(left) [label="Yes"] + n2.handle(bottom) -> commerce.n7.handle(top) [label="Refresh catalog state"] + n4.handle(bottom) -> payment.n11.handle(top) [label="Delegated payment request"] + n6.handle(bottom) -> operations.n14.handle(top) [label="Create order event"] + n6.handle(top) -> chatgpt.n20.handle(bottom) [label="Order outcome"] +} + +commerce { # Commerce Services + n7: rectangle label:"Resolve content" + n8: rectangle label:"Resolve price promo" + n9: rectangle label:"Resolve inventory" + n10: rectangle label:"Resolve tax shipping" + n7.handle(right) -> n8.handle(left) + n8.handle(right) -> n9.handle(left) + n9.handle(right) -> n10.handle(left) + n10.handle(top) -> merchantEdge.n4.handle(bottom) [label="Checkout data"] +} + +payment { # Payment Stack + n11: rectangle label:"Tokenize payment" + n12: rectangle label:"Authorize payment" + n13: rectangle label:"Return auth status" + n11.handle(right) -> n12.handle(left) + n12.handle(right) -> n13.handle(left) + n13.handle(top) -> merchantEdge.n5.handle(bottom) [label="Approved or declined"] +} + +operations { # Order Operations + n14: rectangle label:"Create OMS order" + n15: rectangle label:"Reserve inventory" + n16: rectangle label:"Trigger fulfillment" + n17: rectangle label:"Handle returns support" + n14.handle(right) -> n15.handle(left) + n15.handle(right) -> n16.handle(left) + n16.handle(right) -> n17.handle(left) + n17.handle(top) -> chatgpt.n21.handle(bottom) [label="Service and support"] +} + +chatgpt { # ChatGPT Channel + n18: circle label:"Shopper intent" + n19: rectangle label:"Display products" + n20: rectangle label:"Show confirmation" + n21: circle label:"Support entry" + n18.handle(right) -> n19.handle(left) + n19.handle(right) -> n20.handle(left) + n20.handle(right) -> n21.handle(left) + n18.handle(left) -> merchantEdge.n3.handle(right) [label="Discovery request"] + n19.handle(left) -> merchantEdge.n4.handle(right) [label="Session request"] + n20.handle(left) -> merchantEdge.n5.handle(right) [label="Purchase approval"] +} diff --git a/billing/hr/conflict-resolution-workflow/workflow.fz b/billing/hr/conflict-resolution-workflow/workflow.fz index ec36e78983df55c168d115d3a689931283e7ecef..ad756e33d73a37752f10704603221673f353652d 100644 --- a/billing/hr/conflict-resolution-workflow/workflow.fz +++ b/billing/hr/conflict-resolution-workflow/workflow.fz @@ -1,28 +1,28 @@ -employee { # Employee - n1: circle label:"Start Conflict Resolution" - n4: diamond label:"Make Conflict Resolution decision" - n7: rectangle label:"Continue Conflict Resolution process" - n10: circle label:"End Conflict Resolution" - n1.handle(bottom) -> manager.n2.handle(top) - n4.handle(bottom) -> manager.n5.handle(top) - n7.handle(bottom) -> manager.n8.handle(top) - n4.handle(right) -> hr_system.n3.handle(bottom) [label="Retry/Rejected"] -} - -manager { # Manager - n2: rectangle label:"Receive Conflict Resolution request" - n5: rectangle label:"Update records for Conflict Resolution" - n8: rectangle label:"Continue Conflict Resolution process" - n2.handle(bottom) -> hr_system.n3.handle(top) [label="Next"] - n5.handle(bottom) -> hr_system.n6.handle(top) [label="Done"] - n8.handle(bottom) -> hr_system.n9.handle(top) [label="Processed"] -} - -hr_system { # Hr_System - n3: rectangle label:"Review Conflict Resolution details" - n6: rectangle label:"Continue Conflict Resolution process" - n9: rectangle label:"Continue Conflict Resolution process" - n9.handle(right) -> employee.n10.handle(bottom) - n6.handle(right) -> employee.n7.handle(left) - n3.handle(right) -> employee.n4.handle(left) -} +employee { # Employee + n1: circle label:"Start Conflict Resolution" + n4: diamond label:"Make Conflict Resolution decision" + n7: rectangle label:"Continue Conflict Resolution process" + n10: circle label:"End Conflict Resolution" + n1.handle(bottom) -> manager.n2.handle(top) + n4.handle(bottom) -> manager.n5.handle(top) + n7.handle(bottom) -> manager.n8.handle(top) + n4.handle(right) -> hr_system.n3.handle(bottom) [label="Retry/Rejected"] +} + +manager { # Manager + n2: rectangle label:"Receive Conflict Resolution request" + n5: rectangle label:"Update records for Conflict Resolution" + n8: rectangle label:"Continue Conflict Resolution process" + n2.handle(bottom) -> hr_system.n3.handle(top) [label="Next"] + n5.handle(bottom) -> hr_system.n6.handle(top) [label="Done"] + n8.handle(bottom) -> hr_system.n9.handle(top) [label="Processed"] +} + +hr_system { # Hr_System + n3: rectangle label:"Review Conflict Resolution details" + n6: rectangle label:"Continue Conflict Resolution process" + n9: rectangle label:"Continue Conflict Resolution process" + n9.handle(right) -> employee.n10.handle(bottom) + n6.handle(right) -> employee.n7.handle(left) + n3.handle(right) -> employee.n4.handle(left) +} diff --git a/billing/logistics/returns-processing-workflow/workflow.fz b/billing/logistics/returns-processing-workflow/workflow.fz index 9f57b0f9936d53c56b11a424bf760d1b7823ea8e..8fa9631ec5d40a71647c4c1fc6150ead96da9fdf 100644 --- a/billing/logistics/returns-processing-workflow/workflow.fz +++ b/billing/logistics/returns-processing-workflow/workflow.fz @@ -1,55 +1,55 @@ -Customer { # Customer -n1: circle label:"Start" -n2: rectangle label:"Request return authorization" -n3: rectangle label:"Ship item back" -n4: rectangle label:"Receive refund or replacement" -n5: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(bottom) -> CustomerService.n6.handle(top) [label="RMA request"] -n3.handle(bottom) -> Warehouse.n13.handle(top) [label="Package shipped"] -n4.handle(right) -> n5.handle(left) -} -CustomerService { # Customer Service -n6: rectangle label:"Verify order details" -n7: diamond label:"Within return window?" -n8: rectangle label:"Generate RMA number" -n9: rectangle label:"Deny return request" -n10: rectangle label:"Email return label" -n11: diamond label:"Prepaid return?" -n12: rectangle label:"Charge return shipping" -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) [label="Yes"] -n7.handle(bottom) -> n9.handle(top) [label="No"] -n8.handle(right) -> n11.handle(left) -n9.handle(top) -> Customer.n5.handle(bottom) [label="Denied"] -n11.handle(right) -> n10.handle(left) [label="Yes"] -n11.handle(bottom) -> n12.handle(top) [label="No"] -n10.handle(top) -> Customer.n3.handle(bottom) [label="Label sent"] -n12.handle(top) -> Customer.n3.handle(bottom) [label="Pay shipping"] -} -Warehouse { # Warehouse -n13: rectangle label:"Receive returned package" -n14: rectangle label:"Inspect item condition" -n15: diamond label:"Item condition?" -n16: rectangle label:"Return to inventory" -n17: rectangle label:"Process as defective" -n18: rectangle label:"Flag as damaged by customer" -n13.handle(right) -> n14.handle(left) -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) [label="Like new"] -n15.handle(bottom) -> n17.handle(top) [label="Defective"] -n15.handle(left) -> n18.handle(top) [label="Damaged"] -n16.handle(bottom) -> Refunds.n19.handle(top) [label="Full refund"] -n17.handle(bottom) -> Refunds.n19.handle(top) [label="Full refund"] -n18.handle(bottom) -> Refunds.n22.handle(top) [label="Partial refund"] -} -Refunds { # Refunds Processing -n19: rectangle label:"Calculate refund amount" -n20: rectangle label:"Process refund to payment method" -n21: rectangle label:"Update order status" -n22: rectangle label:"Apply restocking fee" -n19.handle(right) -> n20.handle(left) -n20.handle(right) -> n21.handle(left) -n21.handle(top) -> Customer.n4.handle(bottom) [label="Refund issued"] -n22.handle(right) -> n20.handle(top) -} +Customer { # Customer +n1: circle label:"Start" +n2: rectangle label:"Request return authorization" +n3: rectangle label:"Ship item back" +n4: rectangle label:"Receive refund or replacement" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> CustomerService.n6.handle(top) [label="RMA request"] +n3.handle(bottom) -> Warehouse.n13.handle(top) [label="Package shipped"] +n4.handle(right) -> n5.handle(left) +} +CustomerService { # Customer Service +n6: rectangle label:"Verify order details" +n7: diamond label:"Within return window?" +n8: rectangle label:"Generate RMA number" +n9: rectangle label:"Deny return request" +n10: rectangle label:"Email return label" +n11: diamond label:"Prepaid return?" +n12: rectangle label:"Charge return shipping" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) [label="Yes"] +n7.handle(bottom) -> n9.handle(top) [label="No"] +n8.handle(right) -> n11.handle(left) +n9.handle(top) -> Customer.n5.handle(bottom) [label="Denied"] +n11.handle(right) -> n10.handle(left) [label="Yes"] +n11.handle(bottom) -> n12.handle(top) [label="No"] +n10.handle(top) -> Customer.n3.handle(bottom) [label="Label sent"] +n12.handle(top) -> Customer.n3.handle(bottom) [label="Pay shipping"] +} +Warehouse { # Warehouse +n13: rectangle label:"Receive returned package" +n14: rectangle label:"Inspect item condition" +n15: diamond label:"Item condition?" +n16: rectangle label:"Return to inventory" +n17: rectangle label:"Process as defective" +n18: rectangle label:"Flag as damaged by customer" +n13.handle(right) -> n14.handle(left) +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) [label="Like new"] +n15.handle(bottom) -> n17.handle(top) [label="Defective"] +n15.handle(left) -> n18.handle(top) [label="Damaged"] +n16.handle(bottom) -> Refunds.n19.handle(top) [label="Full refund"] +n17.handle(bottom) -> Refunds.n19.handle(top) [label="Full refund"] +n18.handle(bottom) -> Refunds.n22.handle(top) [label="Partial refund"] +} +Refunds { # Refunds Processing +n19: rectangle label:"Calculate refund amount" +n20: rectangle label:"Process refund to payment method" +n21: rectangle label:"Update order status" +n22: rectangle label:"Apply restocking fee" +n19.handle(right) -> n20.handle(left) +n20.handle(right) -> n21.handle(left) +n21.handle(top) -> Customer.n4.handle(bottom) [label="Refund issued"] +n22.handle(right) -> n20.handle(top) +} diff --git a/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/README.md b/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5e3389ce06c2e39f0210738b8e3ed4a5d6eb3fa1 --- /dev/null +++ b/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/README.md @@ -0,0 +1,19 @@ +# Coinbase Trust Flow — On-Chain Settlement + +The trust layer behind agent-to-agent payments on Coinbase: the agent initiates the spend, the transaction is broadcast, the block confirms and the payment finalizes on-chain. + +**Template ID:** `coinbase-trust-flow-onchain-settlement` +**Kind:** workflow +**Source domain:** Commerce Automation +**Primary use case:** commerce-automation +**Secondary use cases:** None +**Complexity:** 1/5 +**Nodes:** 5 +**Lanes:** 2 +**Tags:** [coinbase, trust-flow, onchain, settlement, base] +**Source path:** `` +**Repo path:** `commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/metadata.json b/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..55398bf4a80af31e550348362e3646281266f516 --- /dev/null +++ b/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/metadata.json @@ -0,0 +1,25 @@ +{ + "template_id": "coinbase-trust-flow-onchain-settlement", + "workflow_id": "coinbase-trust-flow-onchain-settlement", + "title": "Coinbase Trust Flow — On-Chain Settlement", + "kind": "workflow", + "source_domain": "Commerce Automation", + "primary_use_case": "commerce-automation", + "secondary_use_cases": [], + "use_cases": [ + "commerce-automation" + ], + "complexity": 1, + "num_nodes": 5, + "num_lanes": 2, + "tags": [ + "coinbase", + "trust-flow", + "onchain", + "settlement", + "base" + ], + "description": "The trust layer behind agent-to-agent payments on Coinbase: the agent initiates the spend, the transaction is broadcast, the block confirms and the payment finalizes on-chain.", + "source_path": "", + "repo_path": "commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement" +} diff --git a/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/workflow.fz b/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..4308eab3fbaa28eda5b4817946b59992a97fd559 --- /dev/null +++ b/commerce-automation/commerce-automation/coinbase-trust-flow-onchain-settlement/workflow.fz @@ -0,0 +1,16 @@ +agent_env { # Agent & Wallet + n1: circle label:"Agent Initiates Spend" + n2: rectangle label:"Wallet Enforces Policy" + n5: circle label:"Payment Finalized" + + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> base_ledger.n3.handle(top) [label="Broadcast Tx"] +} + +base_ledger { # Base Blockchain + n3: rectangle label:"Process USDC Transfer" + n4: rectangle label:"Update Ledger State" + + n3.handle(right) -> n4.handle(left) + n4.handle(top) -> agent_env.n5.handle(bottom) [label="Block Confirmed"] +} diff --git a/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/README.md b/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f4c6ea77e15c7b0a0b05a2e625c0c7abbcf7373c --- /dev/null +++ b/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/README.md @@ -0,0 +1,19 @@ +# Multi-Platform eCommerce Integration Hub + +n8n as the central integration layer: one workflow decides whether an event is a product sync or an order, routes it to the right channel and closes the loop. + +**Template ID:** `multi-platform-ecommerce-integration-hub` +**Kind:** workflow +**Source domain:** Commerce Automation +**Primary use case:** commerce-automation +**Secondary use cases:** None +**Complexity:** 2/5 +**Nodes:** 11 +**Lanes:** 1 +**Tags:** [n8n, ecommerce, integration, multi-channel, shopify, woocommerce] +**Source path:** `` +**Repo path:** `commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/metadata.json b/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..5dcbd3df4f01707b230cec9c6ca80462a0666082 --- /dev/null +++ b/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/metadata.json @@ -0,0 +1,26 @@ +{ + "template_id": "multi-platform-ecommerce-integration-hub", + "workflow_id": "multi-platform-ecommerce-integration-hub", + "title": "Multi-Platform eCommerce Integration Hub", + "kind": "workflow", + "source_domain": "Commerce Automation", + "primary_use_case": "commerce-automation", + "secondary_use_cases": [], + "use_cases": [ + "commerce-automation" + ], + "complexity": 2, + "num_nodes": 11, + "num_lanes": 1, + "tags": [ + "n8n", + "ecommerce", + "integration", + "multi-channel", + "shopify", + "woocommerce" + ], + "description": "n8n as the central integration layer: one workflow decides whether an event is a product sync or an order, routes it to the right channel and closes the loop.", + "source_path": "", + "repo_path": "commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub" +} diff --git a/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/workflow.fz b/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..3c6033b6b4eeb1e7757cc2481a2d601fef61df91 --- /dev/null +++ b/commerce-automation/commerce-automation/multi-platform-ecommerce-integration-hub/workflow.fz @@ -0,0 +1,25 @@ +main { # Multi-Platform Integration Layer + n1: circle label:"Start" + n2: diamond label:"Channel?" + n3: rectangle label:"n8n Webhook Receiver" + n4: rectangle label:"AI Agent: Parse & Validate" + n5: diamond label:"Event Type?" + n6: rectangle label:"Product Sync Pipeline" + n7: rectangle label:"Order Orchestrator" + n8: rectangle label:"Inventory Update" + n9: rectangle label:"Unified DB Write" + n10: rectangle label:"Fulfillment Trigger" + n11: circle label:"Done" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n3.handle(left) [label="Shopify"] + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) + n5.handle(right) -> n6.handle(left) [label="product"] + n6.handle(right) -> n9.handle(left) + n7.handle(right) -> n8.handle(left) + n8.handle(right) -> n9.handle(left) + n9.handle(right) -> n10.handle(left) + n10.handle(right) -> n11.handle(left) + n2.handle(top) -> n3.handle(top) [label="WooCommerce"] + n5.handle(bottom) -> n7.handle(bottom) [label="Order"] +} diff --git a/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/README.md b/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ea3fbf19c96229609511b35daf828dc9e54d9bfe --- /dev/null +++ b/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/README.md @@ -0,0 +1,19 @@ +# Shopify River Brain-Hands Decoupling Architecture + +Decoupling the brain from the hands: the harness calls the LLM and emits tool intents, while the sandbox executes them, so a new agent is a profile and not a platform. + +**Template ID:** `shopify-river-brain-hands-decoupling-architecture` +**Kind:** workflow +**Source domain:** Commerce Automation +**Primary use case:** commerce-automation +**Secondary use cases:** agentic-security +**Complexity:** 2/5 +**Nodes:** 12 +**Lanes:** 3 +**Tags:** [shopify, river, harness, sandbox, agent-architecture] +**Source path:** `` +**Repo path:** `commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/metadata.json b/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..563efffef8a7d198056781343defdd5bee8576f6 --- /dev/null +++ b/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "shopify-river-brain-hands-decoupling-architecture", + "workflow_id": "shopify-river-brain-hands-decoupling-architecture", + "title": "Shopify River Brain-Hands Decoupling Architecture", + "kind": "workflow", + "source_domain": "Commerce Automation", + "primary_use_case": "commerce-automation", + "secondary_use_cases": [ + "agentic-security" + ], + "use_cases": [ + "commerce-automation", + "agentic-security" + ], + "complexity": 2, + "num_nodes": 12, + "num_lanes": 3, + "tags": [ + "shopify", + "river", + "harness", + "sandbox", + "agent-architecture" + ], + "description": "Decoupling the brain from the hands: the harness calls the LLM and emits tool intents, while the sandbox executes them, so a new agent is a profile and not a platform.", + "source_path": "", + "repo_path": "commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture" +} diff --git a/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/workflow.fz b/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..7326ebd93b3e80b117f49fdab8ca33e23cc89778 --- /dev/null +++ b/commerce-automation/commerce-automation/shopify-river-brain-hands-decoupling-architecture/workflow.fz @@ -0,0 +1,32 @@ +dev { # Dev - Slack +n1: circle label:"@River mention" +n2: rectangle label:"Agent request" +n12: rectangle label:"Receives response" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> harness.n3.handle(top) [label="Prompt"] +} + +harness { # Harness - Brain +n3: rectangle label:"Loads history" +n4: rectangle label:"Calls LLM" +n5: rectangle label:"Emits tool intents" +n11: rectangle label:"Responds to dev" +n3.handle(right) -> n4.handle(left) +n4.handle(right) -> n5.handle(left) +n5.handle(bottom) -> sandbox.n6.handle(top) [label="bash, edit"] +sandbox.n10.handle(top) -> n11.handle(bottom) [label="Result"] +n11.handle(top) -> dev.n12.handle(bottom) [label="Response"] +} + +sandbox { # Sandbox - Hands +n6: rectangle label:"Sets up environment" +n7: rectangle label:"Runs commands" +n8: diamond label:"OK?" +n9: rectangle label:"Raw output" +n10: rectangle label:"Returns output" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n6.handle(top) [label="No - retry"] +n9.handle(right) -> n10.handle(left) +} diff --git a/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/README.md b/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d33b3d1ff203b12be01f24262f6589bbd314296a --- /dev/null +++ b/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/README.md @@ -0,0 +1,19 @@ +# Shopify River 4-Layer Agent Architecture + +Slack as interface, River as agent surface, Aquifer as foundation and a separate harness: the four layers behind an internal agent that treats a session as a durable entity. + +**Template ID:** `shopify-river-four-layer-agent-architecture` +**Kind:** workflow +**Source domain:** Commerce Automation +**Primary use case:** commerce-automation +**Secondary use cases:** None +**Complexity:** 3/5 +**Nodes:** 13 +**Lanes:** 4 +**Tags:** [shopify, river, internal-agents, architecture, slack, session] +**Source path:** `` +**Repo path:** `commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/metadata.json b/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..74ada13f86a4116144d47b8f72d11025f3d491d2 --- /dev/null +++ b/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/metadata.json @@ -0,0 +1,26 @@ +{ + "template_id": "shopify-river-four-layer-agent-architecture", + "workflow_id": "shopify-river-four-layer-agent-architecture", + "title": "Shopify River 4-Layer Agent Architecture", + "kind": "workflow", + "source_domain": "Commerce Automation", + "primary_use_case": "commerce-automation", + "secondary_use_cases": [], + "use_cases": [ + "commerce-automation" + ], + "complexity": 3, + "num_nodes": 13, + "num_lanes": 4, + "tags": [ + "shopify", + "river", + "internal-agents", + "architecture", + "slack", + "session" + ], + "description": "Slack as interface, River as agent surface, Aquifer as foundation and a separate harness: the four layers behind an internal agent that treats a session as a durable entity.", + "source_path": "", + "repo_path": "commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture" +} diff --git a/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/workflow.fz b/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..445ca143c878a0504551a8880dd18944059d6e96 --- /dev/null +++ b/commerce-automation/commerce-automation/shopify-river-four-layer-agent-architecture/workflow.fz @@ -0,0 +1,38 @@ +slack { # Slack - Interface +n1: circle label:"@River in Slack" +n2: rectangle label:"Public channel question" +n11: rectangle label:"Response received" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> river.n3.handle(top) [label="1. Request"] +} + +river { # River - Agent Surface +n3: rectangle label:"Analyzes request" +n4: rectangle label:"Delegates to Aquifer" +n10: rectangle label:"Formats response" +n3.handle(right) -> n4.handle(left) +n4.handle(bottom) -> aquifer.n5.handle(top) [label="2. Session"] +aquifer.n9.handle(top) -> n10.handle(bottom) [label="5. Result"] +n10.handle(top) -> slack.n11.handle(bottom) [label="6. Response"] +} + +aquifer { # Aquifer - Foundation +n5: rectangle label:"Harness plans" +n6: rectangle label:"Sandbox executes" +n7: diamond label:"Done?" +n8: rectangle label:"Consolidates" +n9: rectangle label:"Returns result" +n5.handle(right) -> n6.handle(left) +n6.handle(bottom) -> world.n12.handle(top) [label="3. Read/write"] +n6.handle(right) -> n7.handle(left) +n7.handle(top) -> n5.handle(bottom) [label="No"] +n7.handle(bottom) -> n8.handle(top) [label="Yes"] +n8.handle(right) -> n9.handle(left) +} + +world { # World - Monorepo +n12: rectangle label:"Executes on repo" +n13: rectangle label:"Runs tests - opens PR" +n12.handle(right) -> n13.handle(left) +n13.handle(top) -> aquifer.n7.handle(bottom) [label="4. Output"] +} diff --git a/compliance/business-operations/consent-management-workflow/workflow.fz b/compliance/business-operations/consent-management-workflow/workflow.fz index 10c6a17cb8ef2420e1cc23e7ecce6666af0c1a06..939cec0e9e7d8e9f5ef33db454fe2feae996f7ab 100644 --- a/compliance/business-operations/consent-management-workflow/workflow.fz +++ b/compliance/business-operations/consent-management-workflow/workflow.fz @@ -1,42 +1,42 @@ -Visitor { # Visitor -n1: circle label:"Start" -n2: rectangle label:"Land on website" -n3: rectangle label:"View cookie banner" -n4: diamond label:"Accept all cookies?" -n5: rectangle label:"Customize preferences" -n6: rectangle label:"Browse with preferences" -n7: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(bottom) -> ConsentPlatform.n8.handle(top) [label="Check consent"] -n3.handle(right) -> n4.handle(left) -n4.handle(right) -> n6.handle(left) [label="Yes"] -n4.handle(bottom) -> n5.handle(top) [label="No"] -n5.handle(bottom) -> ConsentPlatform.n12.handle(top) [label="Save choices"] -n6.handle(right) -> n7.handle(left) -} -ConsentPlatform { # Consent Platform -n8: diamond label:"Prior consent exists?" -n9: rectangle label:"Load saved preferences" -n10: rectangle label:"Show cookie banner" -n11: rectangle label:"Store consent record" -n12: rectangle label:"Update preference record" -n13: rectangle label:"Sync with ad platforms" -n8.handle(right) -> n9.handle(left) [label="Yes"] -n8.handle(bottom) -> n10.handle(top) [label="No"] -n9.handle(top) -> Visitor.n6.handle(bottom) [label="Apply"] -n10.handle(top) -> Visitor.n3.handle(bottom) [label="Display"] -n11.handle(right) -> n13.handle(left) -n12.handle(right) -> n11.handle(left) -n13.handle(top) -> Visitor.n6.handle(bottom) [label="Ready"] -} -Analytics { # Analytics -n14: rectangle label:"Check consent for tracking" -n15: diamond label:"Analytics consent given?" -n16: rectangle label:"Initialize tracking scripts" -n17: rectangle label:"Run in privacy mode" -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) [label="Yes"] -n15.handle(bottom) -> n17.handle(top) [label="No"] -n16.handle(top) -> Visitor.n6.handle(bottom) [label="Tracking active"] -n17.handle(top) -> Visitor.n6.handle(bottom) [label="Limited mode"] +Visitor { # Visitor +n1: circle label:"Start" +n2: rectangle label:"Land on website" +n3: rectangle label:"View cookie banner" +n4: diamond label:"Accept all cookies?" +n5: rectangle label:"Customize preferences" +n6: rectangle label:"Browse with preferences" +n7: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> ConsentPlatform.n8.handle(top) [label="Check consent"] +n3.handle(right) -> n4.handle(left) +n4.handle(right) -> n6.handle(left) [label="Yes"] +n4.handle(bottom) -> n5.handle(top) [label="No"] +n5.handle(bottom) -> ConsentPlatform.n12.handle(top) [label="Save choices"] +n6.handle(right) -> n7.handle(left) +} +ConsentPlatform { # Consent Platform +n8: diamond label:"Prior consent exists?" +n9: rectangle label:"Load saved preferences" +n10: rectangle label:"Show cookie banner" +n11: rectangle label:"Store consent record" +n12: rectangle label:"Update preference record" +n13: rectangle label:"Sync with ad platforms" +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n10.handle(top) [label="No"] +n9.handle(top) -> Visitor.n6.handle(bottom) [label="Apply"] +n10.handle(top) -> Visitor.n3.handle(bottom) [label="Display"] +n11.handle(right) -> n13.handle(left) +n12.handle(right) -> n11.handle(left) +n13.handle(top) -> Visitor.n6.handle(bottom) [label="Ready"] +} +Analytics { # Analytics +n14: rectangle label:"Check consent for tracking" +n15: diamond label:"Analytics consent given?" +n16: rectangle label:"Initialize tracking scripts" +n17: rectangle label:"Run in privacy mode" +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) [label="Yes"] +n15.handle(bottom) -> n17.handle(top) [label="No"] +n16.handle(top) -> Visitor.n6.handle(bottom) [label="Tracking active"] +n17.handle(top) -> Visitor.n6.handle(bottom) [label="Limited mode"] } \ No newline at end of file diff --git a/compliance/business-operations/data-export-workflow/workflow.fz b/compliance/business-operations/data-export-workflow/workflow.fz index 2a0df912070991ab02dfa72a476a1cc1a4f27b46..b489a0e341e508f633d5337e899ce6c362a95120 100644 --- a/compliance/business-operations/data-export-workflow/workflow.fz +++ b/compliance/business-operations/data-export-workflow/workflow.fz @@ -1,41 +1,41 @@ -User { # User - n1: circle label:"Start" - n2: rectangle label:"Request data export" - n3: rectangle label:"Verify identity" - n4: rectangle label:"Download export file" - n5: circle label:"End" - n1.handle(right) -> n2.handle(left) - n2.handle(bottom) -> App.n6.handle(top) [label="Submit request"] - n3.handle(bottom) -> App.n9.handle(top) [label="Verified"] - n4.handle(right) -> n5.handle(left) -} -App { # Application - n6: rectangle label:"Validate request" - n7: rectangle label:"Send verification email" - n8: diamond label:"Identity confirmed?" - n9: rectangle label:"Queue export job" - n10: rectangle label:"Reject request" - n6.handle(right) -> n7.handle(left) - n7.handle(top) -> User.n3.handle(bottom) [label="Check email"] - n8.handle(right) -> n9.handle(left) [label="Yes"] - n8.handle(bottom) -> n10.handle(top) [label="No"] - n9.handle(bottom) -> ExportService.n11.handle(top) [label="Process"] - n10.handle(top) -> User.n5.handle(bottom) [label="Denied"] -} -ExportService { # Export Service - n11: rectangle label:"Gather data from all sources" - n12: rectangle label:"Compile user profile data" - n13: rectangle label:"Include activity history" - n14: rectangle label:"Package as ZIP archive" - n15: diamond label:"File size acceptable?" - n16: rectangle label:"Split into multiple files" - n17: rectangle label:"Generate download link" - n11.handle(right) -> n12.handle(left) - n12.handle(right) -> n13.handle(left) - n13.handle(right) -> n14.handle(left) - n14.handle(right) -> n15.handle(left) - n15.handle(right) -> n17.handle(left) [label="Yes"] - n15.handle(bottom) -> n16.handle(top) [label="No"] - n16.handle(right) -> n17.handle(top) - n17.handle(top) -> User.n4.handle(bottom) [label="Ready"] +User { # User + n1: circle label:"Start" + n2: rectangle label:"Request data export" + n3: rectangle label:"Verify identity" + n4: rectangle label:"Download export file" + n5: circle label:"End" + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> App.n6.handle(top) [label="Submit request"] + n3.handle(bottom) -> App.n9.handle(top) [label="Verified"] + n4.handle(right) -> n5.handle(left) +} +App { # Application + n6: rectangle label:"Validate request" + n7: rectangle label:"Send verification email" + n8: diamond label:"Identity confirmed?" + n9: rectangle label:"Queue export job" + n10: rectangle label:"Reject request" + n6.handle(right) -> n7.handle(left) + n7.handle(top) -> User.n3.handle(bottom) [label="Check email"] + n8.handle(right) -> n9.handle(left) [label="Yes"] + n8.handle(bottom) -> n10.handle(top) [label="No"] + n9.handle(bottom) -> ExportService.n11.handle(top) [label="Process"] + n10.handle(top) -> User.n5.handle(bottom) [label="Denied"] +} +ExportService { # Export Service + n11: rectangle label:"Gather data from all sources" + n12: rectangle label:"Compile user profile data" + n13: rectangle label:"Include activity history" + n14: rectangle label:"Package as ZIP archive" + n15: diamond label:"File size acceptable?" + n16: rectangle label:"Split into multiple files" + n17: rectangle label:"Generate download link" + n11.handle(right) -> n12.handle(left) + n12.handle(right) -> n13.handle(left) + n13.handle(right) -> n14.handle(left) + n14.handle(right) -> n15.handle(left) + n15.handle(right) -> n17.handle(left) [label="Yes"] + n15.handle(bottom) -> n16.handle(top) [label="No"] + n16.handle(right) -> n17.handle(top) + n17.handle(top) -> User.n4.handle(bottom) [label="Ready"] } \ No newline at end of file diff --git a/compliance/business-operations/gdpr-deletion-workflow/README.md b/compliance/business-operations/gdpr-deletion-workflow/README.md index 611ad42fb0abc0bde3068b903b37dfd39c35c8c2..c4c5b2c7478b2da33ef52ae7dd783c0fc3954ed8 100644 --- a/compliance/business-operations/gdpr-deletion-workflow/README.md +++ b/compliance/business-operations/gdpr-deletion-workflow/README.md @@ -6,7 +6,7 @@ GDPR data deletion workflow with identity verification, data inventory scan, PII **Kind:** workflow **Source domain:** business-operations **Primary use case:** compliance -**Secondary use cases:** None +**Secondary use cases:** process-mapping **Complexity:** 4/5 **Nodes:** 13 **Lanes:** 4 diff --git a/compliance/business-operations/gdpr-deletion-workflow/metadata.json b/compliance/business-operations/gdpr-deletion-workflow/metadata.json index 00882d49079fbbb68372fc6bc1f2185f23145d9e..baeb056e3abc3916da8b489124483c2b47f0d72f 100644 --- a/compliance/business-operations/gdpr-deletion-workflow/metadata.json +++ b/compliance/business-operations/gdpr-deletion-workflow/metadata.json @@ -5,9 +5,12 @@ "kind": "workflow", "source_domain": "business-operations", "primary_use_case": "compliance", - "secondary_use_cases": [], + "secondary_use_cases": [ + "process-mapping" + ], "use_cases": [ - "compliance" + "compliance", + "process-mapping" ], "complexity": 4, "num_nodes": 13, diff --git a/compliance/business-operations/gdpr-deletion-workflow/workflow.fz b/compliance/business-operations/gdpr-deletion-workflow/workflow.fz index d426f72a7c0534dae64384b1bd1e9d0c0fe542b6..4af3af54f0a612980eeb9305ea2512258b3b0c1f 100644 --- a/compliance/business-operations/gdpr-deletion-workflow/workflow.fz +++ b/compliance/business-operations/gdpr-deletion-workflow/workflow.fz @@ -1,41 +1,41 @@ -DataSubject { # Data Subject - n1: circle label:"Start" - n2: rectangle label:"Submit erasure request" - n3: rectangle label:"Verify identity via email" - n4: rectangle label:"Receive confirmation" - n5: circle label:"End" - n1.handle(right) -> n2.handle(left) - n2.handle(bottom) -> DPO.n6.handle(top) [label="Request received"] - n3.handle(bottom) -> DPO.n9.handle(top) [label="Identity confirmed"] - n4.handle(right) -> n5.handle(left) -} -DPO { # Data Protection Officer - n6: rectangle label:"Log request in register" - n7: rectangle label:"Send identity verification" - n8: diamond label:"Identity verified?" - n9: rectangle label:"Approve deletion request" - n10: rectangle label:"Reject with explanation" - n6.handle(right) -> n7.handle(left) - n7.handle(top) -> DataSubject.n3.handle(bottom) [label="Verify"] - n8.handle(right) -> n9.handle(left) [label="Yes"] - n8.handle(bottom) -> n10.handle(top) [label="No"] - n9.handle(bottom) -> DataSystems.n11.handle(top) [label="Execute"] - n10.handle(top) -> DataSubject.n4.handle(bottom) [label="Denied"] -} -DataSystems { # Data Systems - n11: rectangle label:"Query all data stores" - n12: rectangle label:"Delete from primary database" - n13: rectangle label:"Remove from analytics" - n14: rectangle label:"Purge from backups" - n15: diamond label:"Third-party data shared?" - n16: rectangle label:"Send deletion requests to partners" - n17: rectangle label:"Generate deletion certificate" - n11.handle(right) -> n12.handle(left) - n12.handle(right) -> n13.handle(left) - n13.handle(right) -> n14.handle(left) - n14.handle(right) -> n15.handle(left) - n15.handle(right) -> n16.handle(left) [label="Yes"] - n15.handle(bottom) -> n17.handle(top) [label="No"] - n16.handle(bottom) -> n17.handle(left) - n17.handle(top) -> DataSubject.n4.handle(bottom) [label="Complete"] +DataSubject { # Data Subject + n1: circle label:"Start" + n2: rectangle label:"Submit erasure request" + n3: rectangle label:"Verify identity via email" + n4: rectangle label:"Receive confirmation" + n5: circle label:"End" + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> DPO.n6.handle(top) [label="Request received"] + n3.handle(bottom) -> DPO.n9.handle(top) [label="Identity confirmed"] + n4.handle(right) -> n5.handle(left) +} +DPO { # Data Protection Officer + n6: rectangle label:"Log request in register" + n7: rectangle label:"Send identity verification" + n8: diamond label:"Identity verified?" + n9: rectangle label:"Approve deletion request" + n10: rectangle label:"Reject with explanation" + n6.handle(right) -> n7.handle(left) + n7.handle(top) -> DataSubject.n3.handle(bottom) [label="Verify"] + n8.handle(right) -> n9.handle(left) [label="Yes"] + n8.handle(bottom) -> n10.handle(top) [label="No"] + n9.handle(bottom) -> DataSystems.n11.handle(top) [label="Execute"] + n10.handle(top) -> DataSubject.n4.handle(bottom) [label="Denied"] +} +DataSystems { # Data Systems + n11: rectangle label:"Query all data stores" + n12: rectangle label:"Delete from primary database" + n13: rectangle label:"Remove from analytics" + n14: rectangle label:"Purge from backups" + n15: diamond label:"Third-party data shared?" + n16: rectangle label:"Send deletion requests to partners" + n17: rectangle label:"Generate deletion certificate" + n11.handle(right) -> n12.handle(left) + n12.handle(right) -> n13.handle(left) + n13.handle(right) -> n14.handle(left) + n14.handle(right) -> n15.handle(left) + n15.handle(right) -> n16.handle(left) [label="Yes"] + n15.handle(bottom) -> n17.handle(top) [label="No"] + n16.handle(bottom) -> n17.handle(left) + n17.handle(top) -> DataSubject.n4.handle(bottom) [label="Complete"] } \ No newline at end of file diff --git a/compliance/finance/financial-reporting-workflow/workflow.fz b/compliance/finance/financial-reporting-workflow/workflow.fz index d63631829efd5ea7ba85d2d269f6bb330e876de5..cdb0a918b11c1cd671d9c6c0951921551eed0a1a 100644 --- a/compliance/finance/financial-reporting-workflow/workflow.fz +++ b/compliance/finance/financial-reporting-workflow/workflow.fz @@ -1,28 +1,28 @@ -employee { # Employee - n1: circle label:"Start Financial Reporting" - n4: rectangle label:"Make Financial Reporting decision" - n7: rectangle label:"Continue Financial Reporting process" - n10: circle label:"End Financial Reporting" - n1.handle(bottom) -> manager.n2.handle(top) - n4.handle(bottom) -> manager.n5.handle(top) - n7.handle(bottom) -> manager.n8.handle(top) -} - -manager { # Manager - n2: rectangle label:"Receive Financial Reporting request" - n5: rectangle label:"Update records for Financial Reporting" - n8: rectangle label:"Continue Financial Reporting process" - n2.handle(bottom) -> finance_app.n3.handle(top) [label="Next"] - n5.handle(bottom) -> finance_app.n6.handle(top) [label="Done"] - n8.handle(bottom) -> finance_app.n9.handle(top) [label="Processed"] -} - -finance_app { # Finance_App - n3: rectangle label:"Review Financial Reporting details" - n6: diamond label:"Continue Financial Reporting process" - n9: rectangle label:"Continue Financial Reporting process" - n9.handle(right) -> employee.n10.handle(bottom) - n6.handle(right) -> employee.n7.handle(left) - n6.handle(left) -> manager.n5.handle(left) [label="Retry/Rejected"] - n3.handle(right) -> employee.n4.handle(left) -} +employee { # Employee + n1: circle label:"Start Financial Reporting" + n4: rectangle label:"Make Financial Reporting decision" + n7: rectangle label:"Continue Financial Reporting process" + n10: circle label:"End Financial Reporting" + n1.handle(bottom) -> manager.n2.handle(top) + n4.handle(bottom) -> manager.n5.handle(top) + n7.handle(bottom) -> manager.n8.handle(top) +} + +manager { # Manager + n2: rectangle label:"Receive Financial Reporting request" + n5: rectangle label:"Update records for Financial Reporting" + n8: rectangle label:"Continue Financial Reporting process" + n2.handle(bottom) -> finance_app.n3.handle(top) [label="Next"] + n5.handle(bottom) -> finance_app.n6.handle(top) [label="Done"] + n8.handle(bottom) -> finance_app.n9.handle(top) [label="Processed"] +} + +finance_app { # Finance_App + n3: rectangle label:"Review Financial Reporting details" + n6: diamond label:"Continue Financial Reporting process" + n9: rectangle label:"Continue Financial Reporting process" + n9.handle(right) -> employee.n10.handle(bottom) + n6.handle(right) -> employee.n7.handle(left) + n6.handle(left) -> manager.n5.handle(left) [label="Retry/Rejected"] + n3.handle(right) -> employee.n4.handle(left) +} diff --git a/compliance/finance/internal-controls-workflow/workflow.fz b/compliance/finance/internal-controls-workflow/workflow.fz index 0f2aa0aa0b7e70214aa6230a2520542eb770cb5b..bafa2de83f360b5f2be4fb939a75ba95072298ec 100644 --- a/compliance/finance/internal-controls-workflow/workflow.fz +++ b/compliance/finance/internal-controls-workflow/workflow.fz @@ -1,34 +1,34 @@ -employee { # Employee - n1: circle label:"Start Internal Controls" - n4: rectangle label:"Make Internal Controls decision" - n7: rectangle label:"Continue Internal Controls process" - n10: circle label:"End Internal Controls" - n1.handle(bottom) -> manager.n2.handle(top) - n1.handle(bottom) -> finance_app.n3.handle(top) - n1.handle(right) -> n4.handle(left) - n1.handle(bottom) -> manager.n5.handle(top) - n1.handle(bottom) -> finance_app.n6.handle(top) - n1.handle(right) -> n7.handle(left) - n1.handle(bottom) -> manager.n8.handle(top) - n1.handle(bottom) -> finance_app.n9.handle(top) - n7.handle(right) -> n10.handle(left) - n4.handle(top) -> n10.handle(top) -} - -manager { # Manager - n2: rectangle label:"Receive Internal Controls request" - n5: rectangle label:"Update records for Internal Controls" - n8: diamond label:"Continue Internal Controls process" - n5.handle(right) -> employee.n10.handle(bottom) - n8.handle(right) -> employee.n10.handle(bottom) - n2.handle(right) -> employee.n10.handle(bottom) -} - -finance_app { # Finance_App - n3: rectangle label:"Review Internal Controls details" - n6: rectangle label:"Continue Internal Controls process" - n9: rectangle label:"Continue Internal Controls process" - n9.handle(right) -> employee.n10.handle(bottom) - n6.handle(right) -> employee.n10.handle(bottom) - n3.handle(right) -> employee.n10.handle(bottom) -} +employee { # Employee + n1: circle label:"Start Internal Controls" + n4: rectangle label:"Make Internal Controls decision" + n7: rectangle label:"Continue Internal Controls process" + n10: circle label:"End Internal Controls" + n1.handle(bottom) -> manager.n2.handle(top) + n1.handle(bottom) -> finance_app.n3.handle(top) + n1.handle(right) -> n4.handle(left) + n1.handle(bottom) -> manager.n5.handle(top) + n1.handle(bottom) -> finance_app.n6.handle(top) + n1.handle(right) -> n7.handle(left) + n1.handle(bottom) -> manager.n8.handle(top) + n1.handle(bottom) -> finance_app.n9.handle(top) + n7.handle(right) -> n10.handle(left) + n4.handle(top) -> n10.handle(top) +} + +manager { # Manager + n2: rectangle label:"Receive Internal Controls request" + n5: rectangle label:"Update records for Internal Controls" + n8: diamond label:"Continue Internal Controls process" + n5.handle(right) -> employee.n10.handle(bottom) + n8.handle(right) -> employee.n10.handle(bottom) + n2.handle(right) -> employee.n10.handle(bottom) +} + +finance_app { # Finance_App + n3: rectangle label:"Review Internal Controls details" + n6: rectangle label:"Continue Internal Controls process" + n9: rectangle label:"Continue Internal Controls process" + n9.handle(right) -> employee.n10.handle(bottom) + n6.handle(right) -> employee.n10.handle(bottom) + n3.handle(right) -> employee.n10.handle(bottom) +} diff --git a/compliance/finance/payroll-processing-workflow/workflow.fz b/compliance/finance/payroll-processing-workflow/workflow.fz index 74e2a8077cbacfdca21d652b5db659a2ac736c22..6a66703508f887e3df41d49016675f0da51330b0 100644 --- a/compliance/finance/payroll-processing-workflow/workflow.fz +++ b/compliance/finance/payroll-processing-workflow/workflow.fz @@ -1,57 +1,57 @@ -HRSystem { # HR System -n1: circle label:"Start" -n2: rectangle label:"Collect timesheet data" -n3: rectangle label:"Import attendance records" -n4: rectangle label:"Calculate gross pay" -n5: rectangle label:"Finalize payroll" -n6: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(bottom) -> PayrollEngine.n7.handle(top) [label="Process"] -n4.handle(bottom) -> Compliance.n14.handle(top) [label="Validate"] -n5.handle(right) -> n6.handle(left) -} -PayrollEngine { # Payroll Engine -n7: rectangle label:"Apply pay rates" -n8: rectangle label:"Calculate overtime" -n9: rectangle label:"Add bonuses and commissions" -n10: rectangle label:"Process deductions" -n11: diamond label:"Deductions valid?" -n12: rectangle label:"Calculate net pay" -n13: rectangle label:"Flag for review" -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) -n9.handle(right) -> n10.handle(left) -n10.handle(right) -> n11.handle(left) -n11.handle(right) -> n12.handle(left) [label="Yes"] -n11.handle(bottom) -> n13.handle(top) [label="No"] -n12.handle(top) -> HRSystem.n4.handle(bottom) [label="Calculated"] -n13.handle(top) -> HRSystem.n4.handle(bottom) [label="Review needed"] -} -Compliance { # Compliance -n14: rectangle label:"Withhold federal taxes" -n15: rectangle label:"Withhold state taxes" -n16: rectangle label:"Calculate FICA" -n17: rectangle label:"Process benefits deductions" -n18: diamond label:"Compliance check passed?" -n19: rectangle label:"Generate pay stubs" -n20: rectangle label:"Flag compliance issue" -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n17.handle(left) -n17.handle(right) -> n18.handle(left) -n18.handle(right) -> n19.handle(left) [label="Yes"] -n18.handle(bottom) -> n20.handle(top) [label="No"] -n19.handle(bottom) -> Banking.n21.handle(top) [label="Disburse"] -n20.handle(top) -> HRSystem.n4.handle(bottom) [label="Fix required"] -} -Banking { # Banking -n21: rectangle label:"Create ACH batch file" -n22: rectangle label:"Submit to bank" -n23: rectangle label:"Confirm transfers" -n24: rectangle label:"Update payroll records" -n21.handle(right) -> n22.handle(left) -n22.handle(right) -> n23.handle(left) -n23.handle(right) -> n24.handle(left) -n24.handle(top) -> HRSystem.n5.handle(bottom) [label="Complete"] -} +HRSystem { # HR System +n1: circle label:"Start" +n2: rectangle label:"Collect timesheet data" +n3: rectangle label:"Import attendance records" +n4: rectangle label:"Calculate gross pay" +n5: rectangle label:"Finalize payroll" +n6: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> PayrollEngine.n7.handle(top) [label="Process"] +n4.handle(bottom) -> Compliance.n14.handle(top) [label="Validate"] +n5.handle(right) -> n6.handle(left) +} +PayrollEngine { # Payroll Engine +n7: rectangle label:"Apply pay rates" +n8: rectangle label:"Calculate overtime" +n9: rectangle label:"Add bonuses and commissions" +n10: rectangle label:"Process deductions" +n11: diamond label:"Deductions valid?" +n12: rectangle label:"Calculate net pay" +n13: rectangle label:"Flag for review" +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) +n9.handle(right) -> n10.handle(left) +n10.handle(right) -> n11.handle(left) +n11.handle(right) -> n12.handle(left) [label="Yes"] +n11.handle(bottom) -> n13.handle(top) [label="No"] +n12.handle(top) -> HRSystem.n4.handle(bottom) [label="Calculated"] +n13.handle(top) -> HRSystem.n4.handle(bottom) [label="Review needed"] +} +Compliance { # Compliance +n14: rectangle label:"Withhold federal taxes" +n15: rectangle label:"Withhold state taxes" +n16: rectangle label:"Calculate FICA" +n17: rectangle label:"Process benefits deductions" +n18: diamond label:"Compliance check passed?" +n19: rectangle label:"Generate pay stubs" +n20: rectangle label:"Flag compliance issue" +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n17.handle(left) +n17.handle(right) -> n18.handle(left) +n18.handle(right) -> n19.handle(left) [label="Yes"] +n18.handle(bottom) -> n20.handle(top) [label="No"] +n19.handle(bottom) -> Banking.n21.handle(top) [label="Disburse"] +n20.handle(top) -> HRSystem.n4.handle(bottom) [label="Fix required"] +} +Banking { # Banking +n21: rectangle label:"Create ACH batch file" +n22: rectangle label:"Submit to bank" +n23: rectangle label:"Confirm transfers" +n24: rectangle label:"Update payroll records" +n21.handle(right) -> n22.handle(left) +n22.handle(right) -> n23.handle(left) +n23.handle(right) -> n24.handle(left) +n24.handle(top) -> HRSystem.n5.handle(bottom) [label="Complete"] +} diff --git a/compliance/finance/tax-filing-workflow/workflow.fz b/compliance/finance/tax-filing-workflow/workflow.fz index dc3f3faeb8cb31a50e27d8948fdbec6227774342..180e90c46913a8dc51434abd7baf6528050b450f 100644 --- a/compliance/finance/tax-filing-workflow/workflow.fz +++ b/compliance/finance/tax-filing-workflow/workflow.fz @@ -1,46 +1,46 @@ -TaxTeam { # Tax Team -n1: circle label:"Start" -n2: rectangle label:"Gather financial data" -n3: rectangle label:"Prepare tax schedules" -n4: rectangle label:"Submit filing" -n5: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(bottom) -> Calculation.n6.handle(top) [label="Calculate"] -n4.handle(right) -> n5.handle(left) -} -Calculation { # Tax Calculation -n6: rectangle label:"Calculate taxable income" -n7: rectangle label:"Apply deductions" -n8: rectangle label:"Compute tax liability" -n9: diamond label:"Tax credits applicable?" -n10: rectangle label:"Apply tax credits" -n11: rectangle label:"Calculate final amount" -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) -n9.handle(right) -> n10.handle(left) [label="Yes"] -n9.handle(bottom) -> n11.handle(top) [label="No"] -n10.handle(right) -> n11.handle(top) -n11.handle(bottom) -> Review.n12.handle(top) [label="Review"] -} -Review { # Tax Review -n12: rectangle label:"Review calculations" -n13: diamond label:"Discrepancies found?" -n14: rectangle label:"Investigate variances" -n15: rectangle label:"Prepare filing documents" -n16: diamond label:"Filing type?" -n17: rectangle label:"E-file with IRS" -n18: rectangle label:"Mail paper return" -n19: rectangle label:"Confirm receipt" -n12.handle(right) -> n13.handle(left) -n13.handle(right) -> n15.handle(left) [label="No"] -n13.handle(bottom) -> n14.handle(top) [label="Yes"] -n14.handle(top) -> Calculation.n6.handle(bottom) [label="Recalculate"] -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n17.handle(left) [label="Electronic"] -n16.handle(bottom) -> n18.handle(top) [label="Paper"] -n17.handle(right) -> n19.handle(left) -n18.handle(right) -> n19.handle(top) -n19.handle(top) -> TaxTeam.n4.handle(bottom) [label="Filed"] -} +TaxTeam { # Tax Team +n1: circle label:"Start" +n2: rectangle label:"Gather financial data" +n3: rectangle label:"Prepare tax schedules" +n4: rectangle label:"Submit filing" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> Calculation.n6.handle(top) [label="Calculate"] +n4.handle(right) -> n5.handle(left) +} +Calculation { # Tax Calculation +n6: rectangle label:"Calculate taxable income" +n7: rectangle label:"Apply deductions" +n8: rectangle label:"Compute tax liability" +n9: diamond label:"Tax credits applicable?" +n10: rectangle label:"Apply tax credits" +n11: rectangle label:"Calculate final amount" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) +n9.handle(right) -> n10.handle(left) [label="Yes"] +n9.handle(bottom) -> n11.handle(top) [label="No"] +n10.handle(right) -> n11.handle(top) +n11.handle(bottom) -> Review.n12.handle(top) [label="Review"] +} +Review { # Tax Review +n12: rectangle label:"Review calculations" +n13: diamond label:"Discrepancies found?" +n14: rectangle label:"Investigate variances" +n15: rectangle label:"Prepare filing documents" +n16: diamond label:"Filing type?" +n17: rectangle label:"E-file with IRS" +n18: rectangle label:"Mail paper return" +n19: rectangle label:"Confirm receipt" +n12.handle(right) -> n13.handle(left) +n13.handle(right) -> n15.handle(left) [label="No"] +n13.handle(bottom) -> n14.handle(top) [label="Yes"] +n14.handle(top) -> Calculation.n6.handle(bottom) [label="Recalculate"] +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n17.handle(left) [label="Electronic"] +n16.handle(bottom) -> n18.handle(top) [label="Paper"] +n17.handle(right) -> n19.handle(left) +n18.handle(right) -> n19.handle(top) +n19.handle(top) -> TaxTeam.n4.handle(bottom) [label="Filed"] +} diff --git a/compliance/finance/yearly-audit-workflow/workflow.fz b/compliance/finance/yearly-audit-workflow/workflow.fz index 855194a66eba22f3917a92a333a763e668c9c3a4..4d26b11f7039facdd2d02088ab6d5998353a8397 100644 --- a/compliance/finance/yearly-audit-workflow/workflow.fz +++ b/compliance/finance/yearly-audit-workflow/workflow.fz @@ -1,28 +1,28 @@ -employee { # Employee - n1: circle label:"Start Yearly Audit" - n4: rectangle label:"Make Yearly Audit decision" - n7: diamond label:"Continue Yearly Audit process" - n10: circle label:"End Yearly Audit" - n1.handle(bottom) -> manager.n2.handle(top) - n4.handle(bottom) -> manager.n5.handle(top) - n7.handle(bottom) -> manager.n8.handle(top) - n7.handle(right) -> finance_app.n6.handle(right) [label="Retry/Rejected"] -} - -manager { # Manager - n2: rectangle label:"Receive Yearly Audit request" - n5: rectangle label:"Update records for Yearly Audit" - n8: rectangle label:"Continue Yearly Audit process" - n2.handle(bottom) -> finance_app.n3.handle(top) - n5.handle(bottom) -> finance_app.n6.handle(top) - n8.handle(bottom) -> finance_app.n9.handle(top) -} - -finance_app { # Finance_App - n3: rectangle label:"Review Yearly Audit details" - n6: rectangle label:"Continue Yearly Audit process" - n9: rectangle label:"Continue Yearly Audit process" - n6.handle(bottom) -> employee.n7.handle(top) [label="Success"] - n9.handle(right) -> employee.n10.handle(bottom) [label="Valid"] - n3.handle(right) -> employee.n4.handle(left) [label="Processed"] -} +employee { # Employee + n1: circle label:"Start Yearly Audit" + n4: rectangle label:"Make Yearly Audit decision" + n7: diamond label:"Continue Yearly Audit process" + n10: circle label:"End Yearly Audit" + n1.handle(bottom) -> manager.n2.handle(top) + n4.handle(bottom) -> manager.n5.handle(top) + n7.handle(bottom) -> manager.n8.handle(top) + n7.handle(right) -> finance_app.n6.handle(right) [label="Retry/Rejected"] +} + +manager { # Manager + n2: rectangle label:"Receive Yearly Audit request" + n5: rectangle label:"Update records for Yearly Audit" + n8: rectangle label:"Continue Yearly Audit process" + n2.handle(bottom) -> finance_app.n3.handle(top) + n5.handle(bottom) -> finance_app.n6.handle(top) + n8.handle(bottom) -> finance_app.n9.handle(top) +} + +finance_app { # Finance_App + n3: rectangle label:"Review Yearly Audit details" + n6: rectangle label:"Continue Yearly Audit process" + n9: rectangle label:"Continue Yearly Audit process" + n6.handle(bottom) -> employee.n7.handle(top) [label="Success"] + n9.handle(right) -> employee.n10.handle(bottom) [label="Valid"] + n3.handle(right) -> employee.n4.handle(left) [label="Processed"] +} diff --git a/compliance/hr/training-enrollment-workflow/workflow.fz b/compliance/hr/training-enrollment-workflow/workflow.fz index 9f6817a2a58faa7455a4e89933bdf873b684f97a..12012b9110d6c16043bbda057f0a65e46ccd7a83 100644 --- a/compliance/hr/training-enrollment-workflow/workflow.fz +++ b/compliance/hr/training-enrollment-workflow/workflow.fz @@ -1,18 +1,18 @@ -employee { # Employee - n1: circle label:"Start Training Enrollment" - n3: rectangle label:"Review Training Enrollment details" - n5: rectangle label:"Update records for Training Enrollment" - n7: circle label:"End Training Enrollment" - n1.handle(bottom) -> manager.n2.handle(top) [label="Success"] - n3.handle(bottom) -> manager.n4.handle(top) - n5.handle(bottom) -> manager.n6.handle(top) -} - -manager { # Manager - n2: rectangle label:"Receive Training Enrollment request" - n4: rectangle label:"Make Training Enrollment decision" - n6: rectangle label:"Continue Training Enrollment process" - n6.handle(right) -> employee.n7.handle(bottom) - n4.handle(right) -> employee.n5.handle(left) [label="Valid"] - n2.handle(right) -> employee.n3.handle(left) -} +employee { # Employee + n1: circle label:"Start Training Enrollment" + n3: rectangle label:"Review Training Enrollment details" + n5: rectangle label:"Update records for Training Enrollment" + n7: circle label:"End Training Enrollment" + n1.handle(bottom) -> manager.n2.handle(top) [label="Success"] + n3.handle(bottom) -> manager.n4.handle(top) + n5.handle(bottom) -> manager.n6.handle(top) +} + +manager { # Manager + n2: rectangle label:"Receive Training Enrollment request" + n4: rectangle label:"Make Training Enrollment decision" + n6: rectangle label:"Continue Training Enrollment process" + n6.handle(right) -> employee.n7.handle(bottom) + n4.handle(right) -> employee.n5.handle(left) [label="Valid"] + n2.handle(right) -> employee.n3.handle(left) +} diff --git a/compliance/logistics/cycle-counting-workflow/workflow.fz b/compliance/logistics/cycle-counting-workflow/workflow.fz index 4f5692e93cde05502d73268aaead753a452f30b7..3ff340360538125394a9efdb340be1efc3befa6c 100644 --- a/compliance/logistics/cycle-counting-workflow/workflow.fz +++ b/compliance/logistics/cycle-counting-workflow/workflow.fz @@ -1,34 +1,34 @@ -supplier { # Supplier - n1: circle label:"Start Cycle Counting" - n4: rectangle label:"Make Cycle Counting decision" - n7: rectangle label:"Continue Cycle Counting process" - n10: circle label:"End Cycle Counting" - n1.handle(bottom) -> warehouse.n2.handle(top) - n1.handle(bottom) -> iot_sensor.n3.handle(top) - n1.handle(right) -> n4.handle(left) - n1.handle(bottom) -> warehouse.n5.handle(top) - n1.handle(bottom) -> iot_sensor.n6.handle(top) - n1.handle(right) -> n7.handle(left) - n1.handle(bottom) -> warehouse.n8.handle(top) - n1.handle(bottom) -> iot_sensor.n9.handle(top) - n7.handle(right) -> n10.handle(left) - n4.handle(top) -> n10.handle(top) -} - -warehouse { # Warehouse - n2: rectangle label:"Receive Cycle Counting request" - n5: rectangle label:"Update records for Cycle Counting" - n8: rectangle label:"Continue Cycle Counting process" - n8.handle(right) -> supplier.n10.handle(bottom) - n5.handle(right) -> supplier.n10.handle(bottom) - n2.handle(right) -> supplier.n10.handle(bottom) -} - -iot_sensor { # Iot_Sensor - n3: rectangle label:"Review Cycle Counting details" - n6: rectangle label:"Continue Cycle Counting process" - n9: rectangle label:"Continue Cycle Counting process" - n9.handle(right) -> supplier.n10.handle(bottom) - n6.handle(right) -> supplier.n10.handle(bottom) - n3.handle(right) -> supplier.n10.handle(bottom) -} +supplier { # Supplier + n1: circle label:"Start Cycle Counting" + n4: rectangle label:"Make Cycle Counting decision" + n7: rectangle label:"Continue Cycle Counting process" + n10: circle label:"End Cycle Counting" + n1.handle(bottom) -> warehouse.n2.handle(top) + n1.handle(bottom) -> iot_sensor.n3.handle(top) + n1.handle(right) -> n4.handle(left) + n1.handle(bottom) -> warehouse.n5.handle(top) + n1.handle(bottom) -> iot_sensor.n6.handle(top) + n1.handle(right) -> n7.handle(left) + n1.handle(bottom) -> warehouse.n8.handle(top) + n1.handle(bottom) -> iot_sensor.n9.handle(top) + n7.handle(right) -> n10.handle(left) + n4.handle(top) -> n10.handle(top) +} + +warehouse { # Warehouse + n2: rectangle label:"Receive Cycle Counting request" + n5: rectangle label:"Update records for Cycle Counting" + n8: rectangle label:"Continue Cycle Counting process" + n8.handle(right) -> supplier.n10.handle(bottom) + n5.handle(right) -> supplier.n10.handle(bottom) + n2.handle(right) -> supplier.n10.handle(bottom) +} + +iot_sensor { # Iot_Sensor + n3: rectangle label:"Review Cycle Counting details" + n6: rectangle label:"Continue Cycle Counting process" + n9: rectangle label:"Continue Cycle Counting process" + n9.handle(right) -> supplier.n10.handle(bottom) + n6.handle(right) -> supplier.n10.handle(bottom) + n3.handle(right) -> supplier.n10.handle(bottom) +} diff --git a/compliance/logistics/fleet-maintenance-workflow/workflow.fz b/compliance/logistics/fleet-maintenance-workflow/workflow.fz index eb97055ff47445bf03072f78e28a1b0179ef6f07..4ab76a161296448c794541edc5d379715ffcc4ae 100644 --- a/compliance/logistics/fleet-maintenance-workflow/workflow.fz +++ b/compliance/logistics/fleet-maintenance-workflow/workflow.fz @@ -1,20 +1,20 @@ -supplier { # Supplier - n1: circle label:"Start Fleet Maintenance" - n2: diamond label:"Receive Fleet Maintenance request" - n3: rectangle label:"Review Fleet Maintenance details" - n5: rectangle label:"Update records for Fleet Maintenance" - n7: circle label:"End Fleet Maintenance" - n1.handle(right) -> n2.handle(left) - n2.handle(right) -> n3.handle(left) [label="Yes/Approved"] - n2.handle(bottom) -> warehouse.n4.handle(top) [label="No/Rejected"] - n3.handle(right) -> n5.handle(left) - n5.handle(bottom) -> warehouse.n6.handle(top) - loop [retry until success] n2 n3 n5 n4 n6 -} - -warehouse { # Warehouse - n4: rectangle label:"Make Fleet Maintenance decision" - n6: rectangle label:"Continue Fleet Maintenance process" - n6.handle(right) -> supplier.n7.handle(bottom) - n4.handle(right) -> supplier.n5.handle(top) -} +supplier { # Supplier + n1: circle label:"Start Fleet Maintenance" + n2: diamond label:"Receive Fleet Maintenance request" + n3: rectangle label:"Review Fleet Maintenance details" + n5: rectangle label:"Update records for Fleet Maintenance" + n7: circle label:"End Fleet Maintenance" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n3.handle(left) [label="Yes/Approved"] + n2.handle(bottom) -> warehouse.n4.handle(top) [label="No/Rejected"] + n3.handle(right) -> n5.handle(left) + n5.handle(bottom) -> warehouse.n6.handle(top) + loop [retry until success] n2 n3 n5 n4 n6 +} + +warehouse { # Warehouse + n4: rectangle label:"Make Fleet Maintenance decision" + n6: rectangle label:"Continue Fleet Maintenance process" + n6.handle(right) -> supplier.n7.handle(bottom) + n4.handle(right) -> supplier.n5.handle(top) +} diff --git a/compliance/patterns/audit-trail-workflow/README.md b/compliance/patterns/audit-trail-workflow/README.md index 117757223bb4371d055b7746e5c1e14d9aea3200..5e0c3606ecddb569e65a445035bcc636af556aa1 100644 --- a/compliance/patterns/audit-trail-workflow/README.md +++ b/compliance/patterns/audit-trail-workflow/README.md @@ -6,7 +6,7 @@ This workflow models logging all important actions for compliance. **Kind:** workflow **Source domain:** patterns **Primary use case:** compliance -**Secondary use cases:** None +**Secondary use cases:** patterns **Complexity:** 4/5 **Nodes:** 13 **Lanes:** 4 diff --git a/compliance/patterns/audit-trail-workflow/metadata.json b/compliance/patterns/audit-trail-workflow/metadata.json index fce506768c5f7e1057861c0be783c0de2d309e5d..46273e09ff1e991952a788b8dee24107cef7c946 100644 --- a/compliance/patterns/audit-trail-workflow/metadata.json +++ b/compliance/patterns/audit-trail-workflow/metadata.json @@ -5,9 +5,12 @@ "kind": "workflow", "source_domain": "patterns", "primary_use_case": "compliance", - "secondary_use_cases": [], + "secondary_use_cases": [ + "patterns" + ], "use_cases": [ - "compliance" + "compliance", + "patterns" ], "complexity": 4, "num_nodes": 13, diff --git a/compliance/patterns/audit-trail-workflow/workflow.fz b/compliance/patterns/audit-trail-workflow/workflow.fz index 923ad425c0056d53d9bf5b962c14367ae9f37cbd..87cf2b022f63a0548375658daf759dbd384b15f0 100644 --- a/compliance/patterns/audit-trail-workflow/workflow.fz +++ b/compliance/patterns/audit-trail-workflow/workflow.fz @@ -1,37 +1,37 @@ -user { # User - n1: circle label:"Start Audit Trail" - n2: diamond label:"Receive Audit Trail event" - n5: rectangle label:"Record Audit Trail outcome" - n9: rectangle label:"Monitor Audit Trail status" - n13: circle label:"End Audit Trail" - n1.handle(right) -> n2.handle(left) - n2.handle(bottom) -> service.n3.handle(top) [label="Yes/Approved"] - n2.handle(bottom) -> database.n4.handle(top) [label="No/Rejected"] - n5.handle(bottom) -> app.n6.handle(top) - n9.handle(bottom) -> app.n10.handle(top) -} - -app { # App - n6: rectangle label:"Monitor Audit Trail status" - n10: rectangle label:"Monitor Audit Trail status" - n6.handle(bottom) -> service.n7.handle(top) - n10.handle(bottom) -> service.n11.handle(top) -} - -service { # Service - n3: rectangle label:"Validate Audit Trail conditions" - n7: rectangle label:"Monitor Audit Trail status" - n11: rectangle label:"Monitor Audit Trail status" - n7.handle(bottom) -> database.n8.handle(top) - n11.handle(bottom) -> database.n12.handle(top) - n3.handle(right) -> user.n5.handle(left) -} - -database { # Database - n4: rectangle label:"Execute Audit Trail action" - n8: rectangle label:"Monitor Audit Trail status" - n12: rectangle label:"Monitor Audit Trail status" - n12.handle(right) -> user.n13.handle(bottom) - n8.handle(right) -> user.n9.handle(left) - n4.handle(right) -> user.n5.handle(bottom) -} +user { # User + n1: circle label:"Start Audit Trail" + n2: diamond label:"Receive Audit Trail event" + n5: rectangle label:"Record Audit Trail outcome" + n9: rectangle label:"Monitor Audit Trail status" + n13: circle label:"End Audit Trail" + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> service.n3.handle(top) [label="Yes/Approved"] + n2.handle(bottom) -> database.n4.handle(top) [label="No/Rejected"] + n5.handle(bottom) -> app.n6.handle(top) + n9.handle(bottom) -> app.n10.handle(top) +} + +app { # App + n6: rectangle label:"Monitor Audit Trail status" + n10: rectangle label:"Monitor Audit Trail status" + n6.handle(bottom) -> service.n7.handle(top) + n10.handle(bottom) -> service.n11.handle(top) +} + +service { # Service + n3: rectangle label:"Validate Audit Trail conditions" + n7: rectangle label:"Monitor Audit Trail status" + n11: rectangle label:"Monitor Audit Trail status" + n7.handle(bottom) -> database.n8.handle(top) + n11.handle(bottom) -> database.n12.handle(top) + n3.handle(right) -> user.n5.handle(left) +} + +database { # Database + n4: rectangle label:"Execute Audit Trail action" + n8: rectangle label:"Monitor Audit Trail status" + n12: rectangle label:"Monitor Audit Trail status" + n12.handle(right) -> user.n13.handle(bottom) + n8.handle(right) -> user.n9.handle(left) + n4.handle(right) -> user.n5.handle(bottom) +} diff --git a/compliance/patterns/event-sourcing-workflow/README.md b/compliance/patterns/event-sourcing-workflow/README.md index 677dde27dd6afc733db2327e05aa6437a8dbbe9f..bb41ece45969831f9106fdaed3177cd378ec06ad 100644 --- a/compliance/patterns/event-sourcing-workflow/README.md +++ b/compliance/patterns/event-sourcing-workflow/README.md @@ -6,7 +6,7 @@ Event sourcing pattern with event capture, event store persistence, aggregate re **Kind:** workflow **Source domain:** patterns **Primary use case:** compliance -**Secondary use cases:** None +**Secondary use cases:** patterns **Complexity:** 4/5 **Nodes:** 10 **Lanes:** 3 diff --git a/compliance/patterns/event-sourcing-workflow/metadata.json b/compliance/patterns/event-sourcing-workflow/metadata.json index 791a0f08a624376347601119e941e6bcf58ad628..7d8cf00c37cc321fd8b49a313bdf3e374e271693 100644 --- a/compliance/patterns/event-sourcing-workflow/metadata.json +++ b/compliance/patterns/event-sourcing-workflow/metadata.json @@ -5,9 +5,12 @@ "kind": "workflow", "source_domain": "patterns", "primary_use_case": "compliance", - "secondary_use_cases": [], + "secondary_use_cases": [ + "patterns" + ], "use_cases": [ - "compliance" + "compliance", + "patterns" ], "complexity": 4, "num_nodes": 10, diff --git a/compliance/patterns/event-sourcing-workflow/workflow.fz b/compliance/patterns/event-sourcing-workflow/workflow.fz index 4b4dff26bc1c319ffc15f76409e03857ac779ba2..5775119b5febc61def6c645e56f506f12a75df00 100644 --- a/compliance/patterns/event-sourcing-workflow/workflow.fz +++ b/compliance/patterns/event-sourcing-workflow/workflow.fz @@ -1,43 +1,43 @@ -Command { # Command Handler -n1: circle label:"Start" -n2: rectangle label:"Receive command" -n3: rectangle label:"Validate command" -n4: rectangle label:"Query current state" -n5: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(bottom) -> EventStore.n6.handle(top) [label="Process"] -n4.handle(right) -> n5.handle(left) -} -EventStore { # Event Store -n6: rectangle label:"Load aggregate events" -n7: rectangle label:"Replay to build state" -n8: diamond label:"Command valid for state?" -n9: rectangle label:"Create new event" -n10: rectangle label:"Reject command" -n11: rectangle label:"Append to event stream" -n12: rectangle label:"Publish to subscribers" -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) [label="Yes"] -n8.handle(bottom) -> n10.handle(top) [label="No"] -n9.handle(right) -> n11.handle(left) -n10.handle(top) -> Command.n4.handle(bottom) [label="Invalid"] -n11.handle(right) -> n12.handle(left) -n12.handle(bottom) -> Projection.n13.handle(top) [label="Notify"] -} -Projection { # Read Model Projection -n13: rectangle label:"Receive event notification" -n14: rectangle label:"Update read model" -n15: diamond label:"Projection type?" -n16: rectangle label:"Update SQL database" -n17: rectangle label:"Update search index" -n18: rectangle label:"Acknowledge processing" -n13.handle(right) -> n14.handle(left) -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) [label="Database"] -n15.handle(bottom) -> n17.handle(top) [label="Search"] -n16.handle(right) -> n18.handle(left) -n17.handle(right) -> n18.handle(top) -n18.handle(top) -> Command.n4.handle(bottom) [label="Complete"] -} +Command { # Command Handler +n1: circle label:"Start" +n2: rectangle label:"Receive command" +n3: rectangle label:"Validate command" +n4: rectangle label:"Query current state" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> EventStore.n6.handle(top) [label="Process"] +n4.handle(right) -> n5.handle(left) +} +EventStore { # Event Store +n6: rectangle label:"Load aggregate events" +n7: rectangle label:"Replay to build state" +n8: diamond label:"Command valid for state?" +n9: rectangle label:"Create new event" +n10: rectangle label:"Reject command" +n11: rectangle label:"Append to event stream" +n12: rectangle label:"Publish to subscribers" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n10.handle(top) [label="No"] +n9.handle(right) -> n11.handle(left) +n10.handle(top) -> Command.n4.handle(bottom) [label="Invalid"] +n11.handle(right) -> n12.handle(left) +n12.handle(bottom) -> Projection.n13.handle(top) [label="Notify"] +} +Projection { # Read Model Projection +n13: rectangle label:"Receive event notification" +n14: rectangle label:"Update read model" +n15: diamond label:"Projection type?" +n16: rectangle label:"Update SQL database" +n17: rectangle label:"Update search index" +n18: rectangle label:"Acknowledge processing" +n13.handle(right) -> n14.handle(left) +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) [label="Database"] +n15.handle(bottom) -> n17.handle(top) [label="Search"] +n16.handle(right) -> n18.handle(left) +n17.handle(right) -> n18.handle(top) +n18.handle(top) -> Command.n4.handle(bottom) [label="Complete"] +} diff --git a/context-management/architecture/context-episodic-memory/workflow.fz b/context-management/architecture/context-episodic-memory/workflow.fz index 6d91fdb7f6f6e79de0000349b55534ba6cdac252..5122354d73495b4cd0507241a1769c00e3e982e6 100644 --- a/context-management/architecture/context-episodic-memory/workflow.fz +++ b/context-management/architecture/context-episodic-memory/workflow.fz @@ -1,38 +1,38 @@ -User { - n1: circle label="1. Submit task" - n2: rectangle label="12. See result" - n1.handle(right) -> Agent.n3.handle(left) - Agent.n9.handle(right) -> n2.handle(left) -} - -Agent { - n3: rectangle label="1. Receive task" - n4: rectangle label="2. Search similar episodes" - n5: rectangle label="4. Past lessons" - n6: rectangle label="5. Execute plan" - n7: rectangle label="6. Capture outcome" - n8: rectangle label="7. Send episode for scoring" - n9: rectangle label="11. Return result" - n3.handle(right) -> n4.handle(left) - n5.handle(right) -> n6.handle(left) - n6.handle(right) -> n7.handle(left) - n7.handle(right) -> n8.handle(left) - n8.handle(right) -> Evaluator.n13.handle(left) [label="8. Outcome"] - EpisodeStore.n12.handle(right) -> n9.handle(left) [label="11.b Outcome"] -} - -EpisodeStore { - n10: rectangle label="3. Episode search" - n11: rectangle label="3.2 Search similar episodes" - n12: rectangle label="10. Episode + lesson" - Agent.n4.handle(right) -> n10.handle(left) [label="2. Search similar episodes"] - n10.handle(right) -> n11.handle(left) [label="3. Episode search"] - n11.handle(right) -> Agent.n5.handle(left) [label="4. Past lessons"] - Evaluator.n14.handle(right) -> n12.handle(left) [label="10. Episode + lesson"] -} - -Evaluator { - n13: rectangle label="9. Score outcome" - n14: rectangle label="9. Extract lesson" - n13.handle(right) -> n14.handle(left) -} +User { + n1: circle label="1. Submit task" + n2: rectangle label="12. See result" + n1.handle(right) -> Agent.n3.handle(left) + Agent.n9.handle(right) -> n2.handle(left) +} + +Agent { + n3: rectangle label="1. Receive task" + n4: rectangle label="2. Search similar episodes" + n5: rectangle label="4. Past lessons" + n6: rectangle label="5. Execute plan" + n7: rectangle label="6. Capture outcome" + n8: rectangle label="7. Send episode for scoring" + n9: rectangle label="11. Return result" + n3.handle(right) -> n4.handle(left) + n5.handle(right) -> n6.handle(left) + n6.handle(right) -> n7.handle(left) + n7.handle(right) -> n8.handle(left) + n8.handle(right) -> Evaluator.n13.handle(left) [label="8. Outcome"] + EpisodeStore.n12.handle(right) -> n9.handle(left) [label="11.b Outcome"] +} + +EpisodeStore { + n10: rectangle label="3. Episode search" + n11: rectangle label="3.2 Search similar episodes" + n12: rectangle label="10. Episode + lesson" + Agent.n4.handle(right) -> n10.handle(left) [label="2. Search similar episodes"] + n10.handle(right) -> n11.handle(left) [label="3. Episode search"] + n11.handle(right) -> Agent.n5.handle(left) [label="4. Past lessons"] + Evaluator.n14.handle(right) -> n12.handle(left) [label="10. Episode + lesson"] +} + +Evaluator { + n13: rectangle label="9. Score outcome" + n14: rectangle label="9. Extract lesson" + n13.handle(right) -> n14.handle(left) +} diff --git a/context-management/architecture/context-hybrid-retrieval-memory/workflow.fz b/context-management/architecture/context-hybrid-retrieval-memory/workflow.fz index 43570e7723eb47aeb3825d7d352f6fd26119a657..52e08387f774a7fa493b3b09d6a8370792ec4b4a 100644 --- a/context-management/architecture/context-hybrid-retrieval-memory/workflow.fz +++ b/context-management/architecture/context-hybrid-retrieval-memory/workflow.fz @@ -1,52 +1,52 @@ -User { - n1: circle label="Ask mixed query" - n2: rectangle label="See answer" - n1.handle(right) -> Agent.n3.handle(left) - Agent.n18.handle(right) -> n2.handle(left) -} - -Agent { - n3: rectangle label="Plan retrieval strategy" - n4: rectangle label="Trigger semantic search" - n5: rectangle label="Trigger keyword search" - n6: rectangle label="Trigger recent-history search" - n7: rectangle label="Merge and rerank" - n8: rectangle label="Build prompt with hybrid context" - n9: rectangle label="Call LLM" - n18: rectangle label="Return answer" - n3.handle(bottom) -> n4.handle(top) [label="Semantic"] - n3.handle(right) -> n5.handle(left) [label="Keyword"] - n3.handle(left) -> n6.handle(right) [label="Recent"] - n7.handle(right) -> n8.handle(left) - n8.handle(right) -> n9.handle(left) - n9.handle(right) -> LLM.n19.handle(left) -} - -Semantic { - n10: rectangle label="Vector search" - n11: rectangle label="Return semantic matches" - Agent.n4.handle(right) -> n10.handle(left) - n10.handle(right) -> n11.handle(left) - n11.handle(bottom) -> Agent.n7.handle(top) [label="Semantic"] -} - -Keyword { - n12: rectangle label="Exact/ID search" - n13: rectangle label="Return exact matches" - Agent.n5.handle(right) -> n12.handle(left) - n12.handle(right) -> n13.handle(left) - n13.handle(bottom) -> Agent.n7.handle(top) [label="Keyword"] -} - -Recent { - n14: rectangle label="Scan recent messages" - n15: rectangle label="Return recent matches" - Agent.n6.handle(right) -> n14.handle(left) - n14.handle(right) -> n15.handle(left) - n15.handle(bottom) -> Agent.n7.handle(top) [label="Recent"] -} - -LLM { - n19: rectangle label="Reason over hybrid context" - n19.handle(right) -> Agent.n18.handle(left) -} +User { + n1: circle label="Ask mixed query" + n2: rectangle label="See answer" + n1.handle(right) -> Agent.n3.handle(left) + Agent.n18.handle(right) -> n2.handle(left) +} + +Agent { + n3: rectangle label="Plan retrieval strategy" + n4: rectangle label="Trigger semantic search" + n5: rectangle label="Trigger keyword search" + n6: rectangle label="Trigger recent-history search" + n7: rectangle label="Merge and rerank" + n8: rectangle label="Build prompt with hybrid context" + n9: rectangle label="Call LLM" + n18: rectangle label="Return answer" + n3.handle(bottom) -> n4.handle(top) [label="Semantic"] + n3.handle(right) -> n5.handle(left) [label="Keyword"] + n3.handle(left) -> n6.handle(right) [label="Recent"] + n7.handle(right) -> n8.handle(left) + n8.handle(right) -> n9.handle(left) + n9.handle(right) -> LLM.n19.handle(left) +} + +Semantic { + n10: rectangle label="Vector search" + n11: rectangle label="Return semantic matches" + Agent.n4.handle(right) -> n10.handle(left) + n10.handle(right) -> n11.handle(left) + n11.handle(bottom) -> Agent.n7.handle(top) [label="Semantic"] +} + +Keyword { + n12: rectangle label="Exact/ID search" + n13: rectangle label="Return exact matches" + Agent.n5.handle(right) -> n12.handle(left) + n12.handle(right) -> n13.handle(left) + n13.handle(bottom) -> Agent.n7.handle(top) [label="Keyword"] +} + +Recent { + n14: rectangle label="Scan recent messages" + n15: rectangle label="Return recent matches" + Agent.n6.handle(right) -> n14.handle(left) + n14.handle(right) -> n15.handle(left) + n15.handle(bottom) -> Agent.n7.handle(top) [label="Recent"] +} + +LLM { + n19: rectangle label="Reason over hybrid context" + n19.handle(right) -> Agent.n18.handle(left) +} diff --git a/context-management/architecture/context-profile-memory/workflow.fz b/context-management/architecture/context-profile-memory/workflow.fz index 3ed133be2a9f7a69f222ddc147e9795b22a81169..a1d1506e2ee6574ebe4602d75e327fb28aeadb93 100644 --- a/context-management/architecture/context-profile-memory/workflow.fz +++ b/context-management/architecture/context-profile-memory/workflow.fz @@ -1,33 +1,33 @@ -User { - n1: circle label="Start session" - n2: rectangle label="Send request" - n3: rectangle label="See personalized reply" - n1.handle(right) -> n2.handle(left) - n2.handle(right) -> Agent.n4.handle(left) - Agent.n9.handle(right) -> n3.handle(left) -} - -Agent { - n4: rectangle label="Identify user" - n5: rectangle label="Load profile" - n6: rectangle label="Build prompt with profile" - n7: rectangle label="Call LLM" - n8: rectangle label="Optionally update profile" - n9: rectangle label="Return answer" - n4.handle(right) -> n5.handle(left) - n5.handle(right) -> n6.handle(left) - n6.handle(right) -> n7.handle(left) - n7.handle(right) -> LLM.n10.handle(left) - n8.handle(right) -> ProfileStore.n11.handle(left) [label="Write profile"] -} - -ProfileStore { - n11: rectangle label="Read/Write profile" - Agent.n5.handle(bottom) -> n11.handle(top) [label="Read profile"] - n11.handle(right) -> Agent.n5.handle(left) -} - -LLM { - n10: rectangle label="Generate answer using profile" - n10.handle(right) -> Agent.n9.handle(left) -} +User { + n1: circle label="Start session" + n2: rectangle label="Send request" + n3: rectangle label="See personalized reply" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> Agent.n4.handle(left) + Agent.n9.handle(right) -> n3.handle(left) +} + +Agent { + n4: rectangle label="Identify user" + n5: rectangle label="Load profile" + n6: rectangle label="Build prompt with profile" + n7: rectangle label="Call LLM" + n8: rectangle label="Optionally update profile" + n9: rectangle label="Return answer" + n4.handle(right) -> n5.handle(left) + n5.handle(right) -> n6.handle(left) + n6.handle(right) -> n7.handle(left) + n7.handle(right) -> LLM.n10.handle(left) + n8.handle(right) -> ProfileStore.n11.handle(left) [label="Write profile"] +} + +ProfileStore { + n11: rectangle label="Read/Write profile" + Agent.n5.handle(bottom) -> n11.handle(top) [label="Read profile"] + n11.handle(right) -> Agent.n5.handle(left) +} + +LLM { + n10: rectangle label="Generate answer using profile" + n10.handle(right) -> Agent.n9.handle(left) +} diff --git a/context-management/architecture/context-rolling-summary-memory/workflow.fz b/context-management/architecture/context-rolling-summary-memory/workflow.fz index 7e213ab3bea122a4e1702ac1e34d8e1cbabde344..7d34ea4ffe48e35fa8205e29d2c532370aae8ec8 100644 --- a/context-management/architecture/context-rolling-summary-memory/workflow.fz +++ b/context-management/architecture/context-rolling-summary-memory/workflow.fz @@ -1,39 +1,39 @@ -User { - n1: circle label="New message" - n2: rectangle label="See reply" - n1.handle(right) -> Agent.n3.handle(left) - Agent.n12.handle(right) -> n2.handle(left) -} - -Agent { - n3: rectangle label="Append turn to history" - n4: diamond label="Summary threshold reached?" - n5: rectangle label="Request latest summary" - n6: rectangle label="Build compact prompt" - n7: rectangle label="Call LLM" - n12: rectangle label="Return answer" - n3.handle(right) -> n4.handle(left) - n4.handle(right) -> Summarizer.n8.handle(left) [label="Yes"] - n4.handle(bottom) -> n5.handle(top) [label="No"] - n5.handle(bottom) -> SummaryStore.n10.handle(top) [label="Load summary"] - n6.handle(right) -> n7.handle(left) - n7.handle(right) -> LLM.n13.handle(left) -} - -Summarizer { - n8: rectangle label="Summarize recent turns" - n9: rectangle label="Store summary snapshot" - n8.handle(right) -> n9.handle(left) - n9.handle(bottom) -> SummaryStore.n11.handle(top) [label="Save summary"] -} - -SummaryStore { - n10: rectangle label="Read latest summary" - n11: rectangle label="Write summary" - n10.handle(right) -> Agent.n6.handle(left) -} - -LLM { - n13: rectangle label="Generate answer" - n13.handle(right) -> Agent.n12.handle(left) -} +User { + n1: circle label="New message" + n2: rectangle label="See reply" + n1.handle(right) -> Agent.n3.handle(left) + Agent.n12.handle(right) -> n2.handle(left) +} + +Agent { + n3: rectangle label="Append turn to history" + n4: diamond label="Summary threshold reached?" + n5: rectangle label="Request latest summary" + n6: rectangle label="Build compact prompt" + n7: rectangle label="Call LLM" + n12: rectangle label="Return answer" + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> Summarizer.n8.handle(left) [label="Yes"] + n4.handle(bottom) -> n5.handle(top) [label="No"] + n5.handle(bottom) -> SummaryStore.n10.handle(top) [label="Load summary"] + n6.handle(right) -> n7.handle(left) + n7.handle(right) -> LLM.n13.handle(left) +} + +Summarizer { + n8: rectangle label="Summarize recent turns" + n9: rectangle label="Store summary snapshot" + n8.handle(right) -> n9.handle(left) + n9.handle(bottom) -> SummaryStore.n11.handle(top) [label="Save summary"] +} + +SummaryStore { + n10: rectangle label="Read latest summary" + n11: rectangle label="Write summary" + n10.handle(right) -> Agent.n6.handle(left) +} + +LLM { + n13: rectangle label="Generate answer" + n13.handle(right) -> Agent.n12.handle(left) +} diff --git a/context-management/architecture/context-semantic-memory/workflow.fz b/context-management/architecture/context-semantic-memory/workflow.fz index 9d1b27413673f6d915d7e51838928081ae5f3be9..139e0f97efdca6d51bbec2f00d974867feddfc73 100644 --- a/context-management/architecture/context-semantic-memory/workflow.fz +++ b/context-management/architecture/context-semantic-memory/workflow.fz @@ -1,41 +1,41 @@ -User { - n1: circle label="Ask question" - n2: rectangle label="See answer with references" - n1.handle(right) -> Agent.n3.handle(left) - Agent.n12.handle(right) -> n2.handle(left) -} - -Agent { - n3: rectangle label="Receive query" - n4: rectangle label="Build memory search query" - n5: rectangle label="Send to retriever" - n6: rectangle label="Inject recalled memories" - n7: rectangle label="Assemble final prompt" - n8: rectangle label="Call LLM" - n12: rectangle label="Return answer" - n3.handle(right) -> n4.handle(left) - n4.handle(right) -> n5.handle(left) - n5.handle(bottom) -> Retriever.n9.handle(top) [label="Semantic query"] - n6.handle(right) -> n7.handle(left) - n7.handle(right) -> n8.handle(left) - n8.handle(right) -> LLM.n13.handle(left) -} - -Retriever { - n9: rectangle label="Embed query" - n10: rectangle label="Search vector store" - n11: rectangle label="Rerank top memories" - n9.handle(right) -> n10.handle(left) - n10.handle(right) -> n11.handle(left) - n11.handle(top) -> Agent.n6.handle(bottom) [label="Top memories"] -} - -VectorDB { - n13: rectangle label="Vector index" - Retriever.n10.handle(bottom) -> n13.handle(top) [label="Similarity search"] -} - -LLM { - n14: rectangle label="Answer using recalled facts" - n14.handle(right) -> Agent.n12.handle(left) -} +User { + n1: circle label="Ask question" + n2: rectangle label="See answer with references" + n1.handle(right) -> Agent.n3.handle(left) + Agent.n12.handle(right) -> n2.handle(left) +} + +Agent { + n3: rectangle label="Receive query" + n4: rectangle label="Build memory search query" + n5: rectangle label="Send to retriever" + n6: rectangle label="Inject recalled memories" + n7: rectangle label="Assemble final prompt" + n8: rectangle label="Call LLM" + n12: rectangle label="Return answer" + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) + n5.handle(bottom) -> Retriever.n9.handle(top) [label="Semantic query"] + n6.handle(right) -> n7.handle(left) + n7.handle(right) -> n8.handle(left) + n8.handle(right) -> LLM.n13.handle(left) +} + +Retriever { + n9: rectangle label="Embed query" + n10: rectangle label="Search vector store" + n11: rectangle label="Rerank top memories" + n9.handle(right) -> n10.handle(left) + n10.handle(right) -> n11.handle(left) + n11.handle(top) -> Agent.n6.handle(bottom) [label="Top memories"] +} + +VectorDB { + n13: rectangle label="Vector index" + Retriever.n10.handle(bottom) -> n13.handle(top) [label="Similarity search"] +} + +LLM { + n14: rectangle label="Answer using recalled facts" + n14.handle(right) -> Agent.n12.handle(left) +} diff --git a/context-management/architecture/context-session-memory/workflow.fz b/context-management/architecture/context-session-memory/workflow.fz index 9f258cfb367c9bf892faae8f44a798820a925c47..03199121603f200914926ec0fbcfd78a85daf144 100644 --- a/context-management/architecture/context-session-memory/workflow.fz +++ b/context-management/architecture/context-session-memory/workflow.fz @@ -1,39 +1,39 @@ -User { # User -n1: circle label="User sends message" -n2: rectangle label="See agent reply" - -n1.handle(right) -> Agent.n3.handle(left) -Agent.n8.handle(right) -> n2.handle(left) -} - -Agent { # Agent -n3: rectangle label="Receive message" -n4: rectangle label="Load session history" -n5: rectangle label="Assemble prompt" -n6: rectangle label="Call LLM" -n7: rectangle label="Receive LLM reply" -n8: rectangle label="Return answer to user" -n9: rectangle label="Persist updated session" - -n3.handle(right) -> n4.handle(left) -n4.handle(right) -> n5.handle(left) -n5.handle(right) -> n6.handle(left) -n6.handle(right) -> LLM.n10.handle(left) -n7.handle(right) -> n8.handle(left) -n8.handle(bottom) -> n9.handle(top) [label="Save session"] -} - -Memory { # Session Store -n11: rectangle label="Read session state" -n12: rectangle label="Write session state" - -n3.handle(bottom) -> n11.handle(top) [label="Get history"] -n11.handle(right) -> Agent.n4.handle(left) -Agent.n9.handle(bottom) -> n12.handle(top) [label="Store history"] -} - -LLM { # LLM -n10: rectangle label="Generate answer" - -n10.handle(right) -> Agent.n7.handle(left) -} +User { # User +n1: circle label="User sends message" +n2: rectangle label="See agent reply" + +n1.handle(right) -> Agent.n3.handle(left) +Agent.n8.handle(right) -> n2.handle(left) +} + +Agent { # Agent +n3: rectangle label="Receive message" +n4: rectangle label="Load session history" +n5: rectangle label="Assemble prompt" +n6: rectangle label="Call LLM" +n7: rectangle label="Receive LLM reply" +n8: rectangle label="Return answer to user" +n9: rectangle label="Persist updated session" + +n3.handle(right) -> n4.handle(left) +n4.handle(right) -> n5.handle(left) +n5.handle(right) -> n6.handle(left) +n6.handle(right) -> LLM.n10.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(bottom) -> n9.handle(top) [label="Save session"] +} + +Memory { # Session Store +n11: rectangle label="Read session state" +n12: rectangle label="Write session state" + +n3.handle(bottom) -> n11.handle(top) [label="Get history"] +n11.handle(right) -> Agent.n4.handle(left) +Agent.n9.handle(bottom) -> n12.handle(top) [label="Store history"] +} + +LLM { # LLM +n10: rectangle label="Generate answer" + +n10.handle(right) -> Agent.n7.handle(left) +} diff --git a/context-management/llm-operations/prompt-caching-static-prefix-workflow/README.md b/context-management/llm-operations/prompt-caching-static-prefix-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1c7c3effd2c996f5c417557a739f4edf9c63b8df --- /dev/null +++ b/context-management/llm-operations/prompt-caching-static-prefix-workflow/README.md @@ -0,0 +1,19 @@ +# Prompt Caching with Static Prefix Workflow + +Static system prompt assembled once and cached by the provider, then only the volatile user input is appended — a cache hit reads 50k tokens from the KV cache. + +**Template ID:** `prompt-caching-static-prefix-workflow` +**Kind:** workflow +**Source domain:** LLM Operations +**Primary use case:** context-management +**Secondary use cases:** llm-operations +**Complexity:** 3/5 +**Nodes:** 14 +**Lanes:** 2 +**Tags:** [token-optimization, prompt-caching, kv-cache, context-management, llmops] +**Source path:** `` +**Repo path:** `context-management/llm-operations/prompt-caching-static-prefix-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/context-management/llm-operations/prompt-caching-static-prefix-workflow/metadata.json b/context-management/llm-operations/prompt-caching-static-prefix-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..94639fadabeb049317a671fda58589d212fcf713 --- /dev/null +++ b/context-management/llm-operations/prompt-caching-static-prefix-workflow/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "prompt-caching-static-prefix-workflow", + "workflow_id": "prompt-caching-static-prefix", + "title": "Prompt Caching with Static Prefix Workflow", + "kind": "workflow", + "source_domain": "LLM Operations", + "primary_use_case": "context-management", + "secondary_use_cases": [ + "llm-operations" + ], + "use_cases": [ + "context-management", + "llm-operations" + ], + "complexity": 3, + "num_nodes": 14, + "num_lanes": 2, + "tags": [ + "token-optimization", + "prompt-caching", + "kv-cache", + "context-management", + "llmops" + ], + "description": "Static system prompt assembled once and cached by the provider, then only the volatile user input is appended — a cache hit reads 50k tokens from the KV cache.", + "source_path": "", + "repo_path": "context-management/llm-operations/prompt-caching-static-prefix-workflow" +} diff --git a/context-management/llm-operations/prompt-caching-static-prefix-workflow/workflow.fz b/context-management/llm-operations/prompt-caching-static-prefix-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..807178ee36579418a97b07643e31d935875a7b00 --- /dev/null +++ b/context-management/llm-operations/prompt-caching-static-prefix-workflow/workflow.fz @@ -0,0 +1,32 @@ +client { # Application +n1: circle label:"Start Run 1" +n2: rectangle label:"Assemble static system prompt" +n3: rectangle label:"Append volatile user input" +n7: rectangle label:"Receive Answer 1" +n8: circle label:"Start Run 2" +n9: rectangle label:"Reuse static system prompt" +n10: rectangle label:"Append new volatile user input" +n13: rectangle label:"Receive Answer 2" +n14: circle label:"Session done" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> provider.n4.handle(top) [label="Send 51k tokens"] +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) +n9.handle(right) -> n10.handle(left) +n10.handle(bottom) -> provider.n11.handle(top) [label="Send 51k tokens"] +n13.handle(right) -> n14.handle(left) +} + +provider { # Model Provider +n4: rectangle label:"Cache Miss: compute full attention" +n5: rectangle label:"Write KV cache for 50k prefix" +n6: rectangle label:"Compute 1k delta & generate" +n11: rectangle label:"Cache Hit: read 50k from KV cache" +n12: rectangle label:"Compute 1k delta & generate" +n4.handle(right) -> n5.handle(left) +n5.handle(right) -> n6.handle(left) +n6.handle(top) -> client.n7.handle(bottom) [label="Cost: $1.00"] +n11.handle(right) -> n12.handle(left) +n12.handle(top) -> client.n13.handle(bottom) [label="Cost: $0.10"] +} diff --git a/delivery/agent-simulation/agentworld-testing-pipeline-workflow/README.md b/delivery/agent-simulation/agentworld-testing-pipeline-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bcb5831fd0829c446cfd843205a079f91549de74 --- /dev/null +++ b/delivery/agent-simulation/agentworld-testing-pipeline-workflow/README.md @@ -0,0 +1,19 @@ +# AgentWorld Testing Pipeline Workflow + +A QA pipeline with a simulator in the loop: configure perturbations, add scenarios, run the agent under test and analyse the robustness report before release. + +**Template ID:** `agentworld-testing-pipeline-workflow` +**Kind:** workflow +**Source domain:** Agent Simulation +**Primary use case:** delivery +**Secondary use cases:** agent-simulation +**Complexity:** 3/5 +**Nodes:** 14 +**Lanes:** 3 +**Tags:** [qwen, agentworld, qa, test-pipeline, robustness] +**Source path:** `` +**Repo path:** `delivery/agent-simulation/agentworld-testing-pipeline-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/delivery/agent-simulation/agentworld-testing-pipeline-workflow/metadata.json b/delivery/agent-simulation/agentworld-testing-pipeline-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..89d2a0b7d76b205c5b9fe052bb3eca975b619295 --- /dev/null +++ b/delivery/agent-simulation/agentworld-testing-pipeline-workflow/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "agentworld-testing-pipeline-workflow", + "workflow_id": "agentworld-testing-pipeline", + "title": "AgentWorld Testing Pipeline Workflow", + "kind": "workflow", + "source_domain": "Agent Simulation", + "primary_use_case": "delivery", + "secondary_use_cases": [ + "agent-simulation" + ], + "use_cases": [ + "delivery", + "agent-simulation" + ], + "complexity": 3, + "num_nodes": 14, + "num_lanes": 3, + "tags": [ + "qwen", + "agentworld", + "qa", + "test-pipeline", + "robustness" + ], + "description": "A QA pipeline with a simulator in the loop: configure perturbations, add scenarios, run the agent under test and analyse the robustness report before release.", + "source_path": "", + "repo_path": "delivery/agent-simulation/agentworld-testing-pipeline-workflow" +} diff --git a/delivery/agent-simulation/agentworld-testing-pipeline-workflow/workflow.fz b/delivery/agent-simulation/agentworld-testing-pipeline-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..661117ffd917e4099c0da1b52aa4b36977b304dd --- /dev/null +++ b/delivery/agent-simulation/agentworld-testing-pipeline-workflow/workflow.fz @@ -0,0 +1,36 @@ +qa { # QA Team / Engineer + n1: circle label:"Define test scenarios" + n2: rectangle label:"Configure perturbations" + n3: rectangle label:"Analyze robustness report" + n4: diamond label:"Sufficient coverage?" + n5: circle label:"Workflow validated" + n6: rectangle label:"Add scenarios" + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> simulateur.n7.handle(top) [label="Send config"] + simulateur.n10.handle(top) -> n3.handle(bottom) [label="Test report"] + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) [label="Yes"] + n4.handle(bottom) -> n6.handle(top) [label="No"] + n6.handle(left) -> n2.handle(top) +} + +simulateur { # AgentWorld Simulator + n7: rectangle label:"Generate simulated environment" + n8: rectangle label:"Inject perturbations" + n9: rectangle label:"Execute agent with scenarios" + n10: rectangle label:"Produce robustness report" + n7.handle(right) -> n8.handle(left) + n8.handle(bottom) -> agent.n11.handle(top) [label="Environment + task"] + agent.n14.handle(top) -> n9.handle(bottom) [label="Agent results"] + n9.handle(right) -> n10.handle(left) +} + +agent { # Agent Under Test + n11: rectangle label:"Receive simulated environment" + n12: rectangle label:"Execute workflow" + n13: rectangle label:"Handle errors and edge cases" + n14: rectangle label:"Return detailed results" + n11.handle(right) -> n12.handle(left) + n12.handle(right) -> n13.handle(left) + n13.handle(right) -> n14.handle(left) +} diff --git a/delivery/architecture/agentic-sequential-pipeline/workflow.fz b/delivery/architecture/agentic-sequential-pipeline/workflow.fz index 6acd8083b44ab0e5c637a42556c0556d2d94ce2a..54a91b47cff3c972df80c4048b6a9fdf787be58f 100644 --- a/delivery/architecture/agentic-sequential-pipeline/workflow.fz +++ b/delivery/architecture/agentic-sequential-pipeline/workflow.fz @@ -1,23 +1,23 @@ -research_agent {# Research Agent - n1: rectangle label="Summarize Sources (RAG)" - n1.handle(right) -> outline_agent.n2.handle(left) [label="Raw Sources"] -} - -outline_agent {# Outline Agent - n2: rectangle label="Structure Headings" - n2.handle(right) -> writer_agent.n3.handle(left) [label="Document Outline"] -} - -writer_agent {# Writer Agent - n3: rectangle label="Draft Full Text" - n3.handle(right) -> editor_agent.n4.handle(left) [label="First Draft"] -} - -editor_agent {# Editor Agent - n4: rectangle label="Refine Tone & Grammar" - n4.handle(right) -> seo_agent.n5.handle(left) [label="Refined Text"] -} - -seo_agent {# SEO Agent - n5: rectangle label="Add Keywords & Meta" -} +research_agent {# Research Agent + n1: rectangle label="Summarize Sources (RAG)" + n1.handle(right) -> outline_agent.n2.handle(left) [label="Raw Sources"] +} + +outline_agent {# Outline Agent + n2: rectangle label="Structure Headings" + n2.handle(right) -> writer_agent.n3.handle(left) [label="Document Outline"] +} + +writer_agent {# Writer Agent + n3: rectangle label="Draft Full Text" + n3.handle(right) -> editor_agent.n4.handle(left) [label="First Draft"] +} + +editor_agent {# Editor Agent + n4: rectangle label="Refine Tone & Grammar" + n4.handle(right) -> seo_agent.n5.handle(left) [label="Refined Text"] +} + +seo_agent {# SEO Agent + n5: rectangle label="Add Keywords & Meta" +} diff --git a/delivery/architecture/ai-native-parallel-fan-out-architecture/workflow.fz b/delivery/architecture/ai-native-parallel-fan-out-architecture/workflow.fz index cb7675fb535eaf553c116d56883f9e951c2b3122..9315f978347b47a41b1df38ab10e4aca2cf0913a 100644 --- a/delivery/architecture/ai-native-parallel-fan-out-architecture/workflow.fz +++ b/delivery/architecture/ai-native-parallel-fan-out-architecture/workflow.fz @@ -1,29 +1,29 @@ -Trigger { # Trigger -n1: circle label:"Start" -n2: rectangle label:"PR submitted for review" -n1.handle(right) -> n2.handle(left) -n2.handle(bottom) -> Coordinator.n3.handle(top) [label="PR payload"] -} -Coordinator { # Coordinator Agent -n3: rectangle label:"Fan out to reviewers" -n4: rectangle label:"Gather all reviews" -n5: diamond label:"All passed?" -n6: rectangle label:"Approve PR" -n7: rectangle label:"Request changes" -n8: circle label:"Done" -n3.handle(bottom) -> Reviewers.n9.handle(top) [label="Style check"] -n3.handle(bottom) -> Reviewers.n10.handle(top) [label="Security audit"] -n3.handle(bottom) -> Reviewers.n11.handle(top) [label="Perf analysis"] -n4.handle(right) -> n5.handle(left) -n5.handle(right) -> n6.handle(left) [label="Yes"] -n5.handle(bottom) -> n7.handle(top) [label="No"] -n6.handle(right) -> n8.handle(left) -} -Reviewers { # Parallel Review Agents -n9: rectangle label:"Style Agent" -n10: rectangle label:"Security Agent" -n11: rectangle label:"Performance Agent" -n9.handle(top) -> Coordinator.n4.handle(bottom) [label="Style report"] -n10.handle(top) -> Coordinator.n4.handle(bottom) [label="Security report"] -n11.handle(top) -> Coordinator.n4.handle(bottom) [label="Perf report"] -} +Trigger { # Trigger +n1: circle label:"Start" +n2: rectangle label:"PR submitted for review" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> Coordinator.n3.handle(top) [label="PR payload"] +} +Coordinator { # Coordinator Agent +n3: rectangle label:"Fan out to reviewers" +n4: rectangle label:"Gather all reviews" +n5: diamond label:"All passed?" +n6: rectangle label:"Approve PR" +n7: rectangle label:"Request changes" +n8: circle label:"Done" +n3.handle(bottom) -> Reviewers.n9.handle(top) [label="Style check"] +n3.handle(bottom) -> Reviewers.n10.handle(top) [label="Security audit"] +n3.handle(bottom) -> Reviewers.n11.handle(top) [label="Perf analysis"] +n4.handle(right) -> n5.handle(left) +n5.handle(right) -> n6.handle(left) [label="Yes"] +n5.handle(bottom) -> n7.handle(top) [label="No"] +n6.handle(right) -> n8.handle(left) +} +Reviewers { # Parallel Review Agents +n9: rectangle label:"Style Agent" +n10: rectangle label:"Security Agent" +n11: rectangle label:"Performance Agent" +n9.handle(top) -> Coordinator.n4.handle(bottom) [label="Style report"] +n10.handle(top) -> Coordinator.n4.handle(bottom) [label="Security report"] +n11.handle(top) -> Coordinator.n4.handle(bottom) [label="Perf report"] +} diff --git a/delivery/architecture/ai-native-sequential-pipeline-architecture/README.md b/delivery/architecture/ai-native-sequential-pipeline-architecture/README.md index 56798957c191cfadafb15f3106bc638ab7caf358..39b82b534d9599adf281efa505d36dbea6a8e861 100644 --- a/delivery/architecture/ai-native-sequential-pipeline-architecture/README.md +++ b/delivery/architecture/ai-native-sequential-pipeline-architecture/README.md @@ -6,7 +6,7 @@ A sequential pipeline architecture chaining multiple agents in a fixed order (pa **Kind:** architecture **Source domain:** Architecture **Primary use case:** delivery -**Secondary use cases:** agentic, ai-orchestration +**Secondary use cases:** agentic, ai-orchestration, architecture **Complexity:** 2/5 **Nodes:** 7 **Lanes:** 2 diff --git a/delivery/architecture/ai-native-sequential-pipeline-architecture/metadata.json b/delivery/architecture/ai-native-sequential-pipeline-architecture/metadata.json index 6eccf687794fd249c7e66ecd962c8989d0e7ccb4..0c04b2840ed9b2581be5ec65f4db896db7f33617 100644 --- a/delivery/architecture/ai-native-sequential-pipeline-architecture/metadata.json +++ b/delivery/architecture/ai-native-sequential-pipeline-architecture/metadata.json @@ -7,12 +7,14 @@ "primary_use_case": "delivery", "secondary_use_cases": [ "agentic", - "ai-orchestration" + "ai-orchestration", + "architecture" ], "use_cases": [ "delivery", "agentic", - "ai-orchestration" + "ai-orchestration", + "architecture" ], "complexity": 2, "num_nodes": 7, diff --git a/delivery/architecture/ai-native-sequential-pipeline-architecture/workflow.fz b/delivery/architecture/ai-native-sequential-pipeline-architecture/workflow.fz index 1366040981dc0453068e1f692dfe412b1d338ad1..fa50bfb6ad41dcb8d576c5feb678d8c29822a191 100644 --- a/delivery/architecture/ai-native-sequential-pipeline-architecture/workflow.fz +++ b/delivery/architecture/ai-native-sequential-pipeline-architecture/workflow.fz @@ -1,18 +1,18 @@ -Trigger { # Trigger -n1: circle label:"Start" -n2: rectangle label:"Incoming request" -n1.handle(right) -> n2.handle(left) -n2.handle(bottom) -> Pipeline.n3.handle(top) [label="Input"] -} -Pipeline { # Sequential Pipeline -n3: rectangle label:"Agent A: Parse input" -n4: rectangle label:"Agent B: Enrich data" -n5: rectangle label:"Agent C: Analyze" -n6: rectangle label:"Agent D: Format output" -n7: circle label:"Done" -n3.handle(right) -> n4.handle(left) -n4.handle(right) -> n5.handle(left) -n5.handle(right) -> n6.handle(left) -n6.handle(right) -> n7.handle(left) -n6.handle(top) -> Trigger.n2.handle(bottom) [label="Final output"] -} +Trigger { # Trigger +n1: circle label:"Start" +n2: rectangle label:"Incoming request" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> Pipeline.n3.handle(top) [label="Input"] +} +Pipeline { # Sequential Pipeline +n3: rectangle label:"Agent A: Parse input" +n4: rectangle label:"Agent B: Enrich data" +n5: rectangle label:"Agent C: Analyze" +n6: rectangle label:"Agent D: Format output" +n7: circle label:"Done" +n3.handle(right) -> n4.handle(left) +n4.handle(right) -> n5.handle(left) +n5.handle(right) -> n6.handle(left) +n6.handle(right) -> n7.handle(left) +n6.handle(top) -> Trigger.n2.handle(bottom) [label="Final output"] +} diff --git a/delivery/architecture/ai-orchestration-sequential-pipeline/workflow.fz b/delivery/architecture/ai-orchestration-sequential-pipeline/workflow.fz index 1d7076493007afa29860550bb1a067c5f4a06e70..8c34945416751240dee5d912bd70a41dc3c6470c 100644 --- a/delivery/architecture/ai-orchestration-sequential-pipeline/workflow.fz +++ b/delivery/architecture/ai-orchestration-sequential-pipeline/workflow.fz @@ -1,19 +1,19 @@ -Trigger { # User - n1: circle label="Start" - n2: rectangle label="Submit complex task" - n1.handle(right) -> n2.handle(left) - n2.handle(bottom) -> Pipeline.n3.handle(top) [label="Task"] -} - -Pipeline { # Sequential Pipeline - n3: rectangle label="Agent A: Parse input" - n4: rectangle label="Agent B: Enrich data" - n5: rectangle label="Agent C: Analyze" - n6: rectangle label="Agent D: Format output" - n7: circle label="Done" - n3.handle(right) -> n4.handle(left) - n4.handle(right) -> n5.handle(left) - n5.handle(right) -> n6.handle(left) - n6.handle(right) -> n7.handle(left) - n6.handle(top) -> Trigger.n2.handle(bottom) [label="Final output"] -} +Trigger { # User + n1: circle label="Start" + n2: rectangle label="Submit complex task" + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> Pipeline.n3.handle(top) [label="Task"] +} + +Pipeline { # Sequential Pipeline + n3: rectangle label="Agent A: Parse input" + n4: rectangle label="Agent B: Enrich data" + n5: rectangle label="Agent C: Analyze" + n6: rectangle label="Agent D: Format output" + n7: circle label="Done" + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) + n5.handle(right) -> n6.handle(left) + n6.handle(right) -> n7.handle(left) + n6.handle(top) -> Trigger.n2.handle(bottom) [label="Final output"] +} diff --git a/delivery/architecture/event-driven-event-streaming-pipeline-architecture/README.md b/delivery/architecture/event-driven-event-streaming-pipeline-architecture/README.md index 1a84593ae2657a888e493bf87679f739e3c6fbee..add5125326026da99136d6bf5a1bf6b4fc93f671 100644 --- a/delivery/architecture/event-driven-event-streaming-pipeline-architecture/README.md +++ b/delivery/architecture/event-driven-event-streaming-pipeline-architecture/README.md @@ -6,7 +6,7 @@ A real-time event streaming pipeline architecture diagram with IoT sensors, appl **Kind:** architecture **Source domain:** Architecture **Primary use case:** delivery -**Secondary use cases:** None +**Secondary use cases:** architecture **Complexity:** 4/5 **Nodes:** 18 **Lanes:** 4 diff --git a/delivery/architecture/event-driven-event-streaming-pipeline-architecture/metadata.json b/delivery/architecture/event-driven-event-streaming-pipeline-architecture/metadata.json index 63f04ae9910a49bb9e5666c83f7124918ff91dd3..aa3c01304487952bd05fcfd7e9e4cc0b63c1ccf0 100644 --- a/delivery/architecture/event-driven-event-streaming-pipeline-architecture/metadata.json +++ b/delivery/architecture/event-driven-event-streaming-pipeline-architecture/metadata.json @@ -5,9 +5,12 @@ "kind": "architecture", "source_domain": "Architecture", "primary_use_case": "delivery", - "secondary_use_cases": [], + "secondary_use_cases": [ + "architecture" + ], "use_cases": [ - "delivery" + "delivery", + "architecture" ], "complexity": 4, "num_nodes": 18, diff --git a/delivery/architecture/event-driven-event-streaming-pipeline-architecture/workflow.fz b/delivery/architecture/event-driven-event-streaming-pipeline-architecture/workflow.fz index ed1e035e964acd8cdf389dba5ec6f44be4baebe1..85ee8a9c476a5a82fcc79a0941a10a9b4b4b3de3 100644 --- a/delivery/architecture/event-driven-event-streaming-pipeline-architecture/workflow.fz +++ b/delivery/architecture/event-driven-event-streaming-pipeline-architecture/workflow.fz @@ -1,44 +1,44 @@ -Sources { # Data Sources -n1: rectangle label:"IoT Sensor Stream" -n2: rectangle label:"Application Logs" -n3: rectangle label:"User Clickstream" -n4: rectangle label:"Transaction Events" -n1.handle(bottom) -> Ingestion.n5.handle(top) [label="MQTT"] -n2.handle(bottom) -> Ingestion.n5.handle(top) [label="Fluentd"] -n3.handle(bottom) -> Ingestion.n6.handle(top) [label="Kafka Connect"] -n4.handle(bottom) -> Ingestion.n6.handle(top) [label="CDC"] -} -Ingestion { # Stream Ingestion (Kafka) -n5: rectangle label:"Kafka Topic: Raw Events" -n6: rectangle label:"Kafka Topic: Enriched Events" -n7: rectangle label:"Schema Registry Validate" -n8: rectangle label:"Partition by Key" -n5.handle(right) -> n7.handle(left) [label="Validate"] -n7.handle(right) -> n8.handle(left) [label="Schema OK"] -n8.handle(bottom) -> Processing.n9.handle(top) [label="Partitioned"] -n6.handle(bottom) -> Processing.n9.handle(top) [label="Stream"] -} -Processing { # Stream Processing (Flink/Spark) -n9: rectangle label:"Window Aggregation" -n10: rectangle label:"Filter and Transform" -n11: rectangle label:"Join Streams" -n12: diamond label:"Anomaly Detected?" -n13: rectangle label:"Emit Alert Event" -n14: rectangle label:"Write to Sink" -n9.handle(right) -> n10.handle(left) [label="5-min Window"] -n10.handle(right) -> n11.handle(left) [label="Cleaned"] -n11.handle(right) -> n12.handle(left) [label="Enriched"] -n12.handle(right) -> n14.handle(left) [label="Normal"] -n12.handle(bottom) -> n13.handle(top) [label="Anomaly"] -n13.handle(right) -> n14.handle(left) [label="Alert + Data"] -n14.handle(bottom) -> Sinks.n15.handle(top) [label="Output"] -} -Sinks { # Data Sinks -n15: rectangle label:"Data Lake (S3/HDFS)" -n16: rectangle label:"Real-Time Dashboard" -n17: rectangle label:"Alert Notification" -n18: rectangle label:"Search Index (Elasticsearch)" -n15.handle(right) -> n16.handle(left) [label="Batch Analytics"] -n16.handle(right) -> n17.handle(left) [label="Alerts"] -n17.handle(right) -> n18.handle(left) [label="Index"] -} +Sources { # Data Sources +n1: rectangle label:"IoT Sensor Stream" +n2: rectangle label:"Application Logs" +n3: rectangle label:"User Clickstream" +n4: rectangle label:"Transaction Events" +n1.handle(bottom) -> Ingestion.n5.handle(top) [label="MQTT"] +n2.handle(bottom) -> Ingestion.n5.handle(top) [label="Fluentd"] +n3.handle(bottom) -> Ingestion.n6.handle(top) [label="Kafka Connect"] +n4.handle(bottom) -> Ingestion.n6.handle(top) [label="CDC"] +} +Ingestion { # Stream Ingestion (Kafka) +n5: rectangle label:"Kafka Topic: Raw Events" +n6: rectangle label:"Kafka Topic: Enriched Events" +n7: rectangle label:"Schema Registry Validate" +n8: rectangle label:"Partition by Key" +n5.handle(right) -> n7.handle(left) [label="Validate"] +n7.handle(right) -> n8.handle(left) [label="Schema OK"] +n8.handle(bottom) -> Processing.n9.handle(top) [label="Partitioned"] +n6.handle(bottom) -> Processing.n9.handle(top) [label="Stream"] +} +Processing { # Stream Processing (Flink/Spark) +n9: rectangle label:"Window Aggregation" +n10: rectangle label:"Filter and Transform" +n11: rectangle label:"Join Streams" +n12: diamond label:"Anomaly Detected?" +n13: rectangle label:"Emit Alert Event" +n14: rectangle label:"Write to Sink" +n9.handle(right) -> n10.handle(left) [label="5-min Window"] +n10.handle(right) -> n11.handle(left) [label="Cleaned"] +n11.handle(right) -> n12.handle(left) [label="Enriched"] +n12.handle(right) -> n14.handle(left) [label="Normal"] +n12.handle(bottom) -> n13.handle(top) [label="Anomaly"] +n13.handle(right) -> n14.handle(left) [label="Alert + Data"] +n14.handle(bottom) -> Sinks.n15.handle(top) [label="Output"] +} +Sinks { # Data Sinks +n15: rectangle label:"Data Lake (S3/HDFS)" +n16: rectangle label:"Real-Time Dashboard" +n17: rectangle label:"Alert Notification" +n18: rectangle label:"Search Index (Elasticsearch)" +n15.handle(right) -> n16.handle(left) [label="Batch Analytics"] +n16.handle(right) -> n17.handle(left) [label="Alerts"] +n17.handle(right) -> n18.handle(left) [label="Index"] +} diff --git a/delivery/architecture/gitops-deployment-architecture/workflow.fz b/delivery/architecture/gitops-deployment-architecture/workflow.fz index d5913888d67b467882ec1aa5fc67acaddfa8e58a..fb1a51b6465ed8697a99c506e94dfc8c2292f79b 100644 --- a/delivery/architecture/gitops-deployment-architecture/workflow.fz +++ b/delivery/architecture/gitops-deployment-architecture/workflow.fz @@ -1,45 +1,45 @@ -Developer { # Developer -n1: circle label:"Code Change" -n2: rectangle label:"Git Push to Main" -n3: rectangle label:"Open Pull Request" -n4: rectangle label:"Merge After Review" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) [label="Feature Branch"] -n3.handle(right) -> n4.handle(left) [label="Approved"] -n4.handle(bottom) -> CICD.n5.handle(top) [label="Trigger"] -} -CICD { # CI/CD Pipeline -n5: rectangle label:"Run Tests and Lint" -n6: rectangle label:"Build Container Image" -n7: rectangle label:"Push to Registry" -n8: rectangle label:"Update Manifest in Git" -n5.handle(right) -> n6.handle(left) [label="Tests Pass"] -n6.handle(right) -> n7.handle(left) [label="Tag: sha-abc123"] -n7.handle(right) -> n8.handle(left) [label="Update Image Tag"] -n8.handle(bottom) -> GitOps.n9.handle(top) [label="Commit Manifest"] -} -GitOps { # GitOps Controller (ArgoCD/Flux) -n9: rectangle label:"Detect Git Diff" -n10: rectangle label:"Compare Desired vs Live" -n11: diamond label:"Drift Detected?" -n12: rectangle label:"Sync to Cluster" -n13: rectangle label:"State Already Synced" -n14: rectangle label:"Health Check" -n9.handle(right) -> n10.handle(left) [label="Poll/Webhook"] -n10.handle(right) -> n11.handle(left) -n11.handle(right) -> n12.handle(left) [label="Yes"] -n11.handle(bottom) -> n13.handle(top) [label="No"] -n12.handle(right) -> n14.handle(left) [label="Apply"] -n14.handle(bottom) -> Cluster.n15.handle(top) [label="Deploy"] -} -Cluster { # Kubernetes Cluster -n15: rectangle label:"Rolling Update Deployment" -n16: rectangle label:"New Pods Created" -n17: rectangle label:"Old Pods Terminated" -n18: rectangle label:"Service Routes Traffic" -n19: circle label:"Deployment Complete" -n15.handle(right) -> n16.handle(left) [label="Scale Up"] -n16.handle(right) -> n17.handle(left) [label="Healthy"] -n17.handle(right) -> n18.handle(left) [label="Cutover"] -n18.handle(right) -> n19.handle(left) -} +Developer { # Developer +n1: circle label:"Code Change" +n2: rectangle label:"Git Push to Main" +n3: rectangle label:"Open Pull Request" +n4: rectangle label:"Merge After Review" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) [label="Feature Branch"] +n3.handle(right) -> n4.handle(left) [label="Approved"] +n4.handle(bottom) -> CICD.n5.handle(top) [label="Trigger"] +} +CICD { # CI/CD Pipeline +n5: rectangle label:"Run Tests and Lint" +n6: rectangle label:"Build Container Image" +n7: rectangle label:"Push to Registry" +n8: rectangle label:"Update Manifest in Git" +n5.handle(right) -> n6.handle(left) [label="Tests Pass"] +n6.handle(right) -> n7.handle(left) [label="Tag: sha-abc123"] +n7.handle(right) -> n8.handle(left) [label="Update Image Tag"] +n8.handle(bottom) -> GitOps.n9.handle(top) [label="Commit Manifest"] +} +GitOps { # GitOps Controller (ArgoCD/Flux) +n9: rectangle label:"Detect Git Diff" +n10: rectangle label:"Compare Desired vs Live" +n11: diamond label:"Drift Detected?" +n12: rectangle label:"Sync to Cluster" +n13: rectangle label:"State Already Synced" +n14: rectangle label:"Health Check" +n9.handle(right) -> n10.handle(left) [label="Poll/Webhook"] +n10.handle(right) -> n11.handle(left) +n11.handle(right) -> n12.handle(left) [label="Yes"] +n11.handle(bottom) -> n13.handle(top) [label="No"] +n12.handle(right) -> n14.handle(left) [label="Apply"] +n14.handle(bottom) -> Cluster.n15.handle(top) [label="Deploy"] +} +Cluster { # Kubernetes Cluster +n15: rectangle label:"Rolling Update Deployment" +n16: rectangle label:"New Pods Created" +n17: rectangle label:"Old Pods Terminated" +n18: rectangle label:"Service Routes Traffic" +n19: circle label:"Deployment Complete" +n15.handle(right) -> n16.handle(left) [label="Scale Up"] +n16.handle(right) -> n17.handle(left) [label="Healthy"] +n17.handle(right) -> n18.handle(left) [label="Cutover"] +n18.handle(right) -> n19.handle(left) +} diff --git a/delivery/architecture/microservices-strangler-fig-migration/README.md b/delivery/architecture/microservices-strangler-fig-migration/README.md index 055909dca249b7758f584e469d076e243da92173..312ac06a22491559f165e2a7d0bf07fd9aed42e8 100644 --- a/delivery/architecture/microservices-strangler-fig-migration/README.md +++ b/delivery/architecture/microservices-strangler-fig-migration/README.md @@ -6,7 +6,7 @@ A strangler fig migration architecture diagram showing the incremental replaceme **Kind:** architecture **Source domain:** Architecture **Primary use case:** delivery -**Secondary use cases:** None +**Secondary use cases:** architecture **Complexity:** 4/5 **Nodes:** 16 **Lanes:** 4 diff --git a/delivery/architecture/microservices-strangler-fig-migration/metadata.json b/delivery/architecture/microservices-strangler-fig-migration/metadata.json index 84880981a7141394dd669077ccd70b92c57d7514..4d1c30e0a503ce622fbf620537b8d0dd28c900ca 100644 --- a/delivery/architecture/microservices-strangler-fig-migration/metadata.json +++ b/delivery/architecture/microservices-strangler-fig-migration/metadata.json @@ -5,9 +5,12 @@ "kind": "architecture", "source_domain": "Architecture", "primary_use_case": "delivery", - "secondary_use_cases": [], + "secondary_use_cases": [ + "architecture" + ], "use_cases": [ - "delivery" + "delivery", + "architecture" ], "complexity": 4, "num_nodes": 16, diff --git a/delivery/architecture/microservices-strangler-fig-migration/workflow.fz b/delivery/architecture/microservices-strangler-fig-migration/workflow.fz index 995fa13ad8695e812aa8da916b1951774cf01708..96ae5cb69a3a453a8ddd5b666252138382b2926e 100644 --- a/delivery/architecture/microservices-strangler-fig-migration/workflow.fz +++ b/delivery/architecture/microservices-strangler-fig-migration/workflow.fz @@ -1,41 +1,41 @@ -Client { # Client -n1: circle label:"User Request" -n2: rectangle label:"Anti-Corruption Layer" -n3: rectangle label:"Receive Response" -n4: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(bottom) -> Router.n5.handle(top) [label="Translate"] -n3.handle(right) -> n4.handle(left) -} -Router { # Strangler Fig Router -n5: rectangle label:"Inspect Request Path" -n6: diamond label:"Migrated Endpoint?" -n7: rectangle label:"Route to New Service" -n8: rectangle label:"Route to Legacy Monolith" -n9: rectangle label:"Log Migration Metrics" -n5.handle(right) -> n6.handle(left) -n6.handle(right) -> n7.handle(left) [label="Yes"] -n6.handle(bottom) -> n8.handle(top) [label="No"] -n7.handle(bottom) -> NewServices.n10.handle(top) [label="Forward"] -n8.handle(bottom) -> Legacy.n14.handle(top) [label="Forward"] -n7.handle(right) -> n9.handle(left) [label="Track"] -n8.handle(right) -> n9.handle(left) [label="Track"] -} -NewServices { # New Microservices -n10: rectangle label:"Process in New Service" -n11: rectangle label:"New Service Database" -n12: rectangle label:"Publish Domain Event" -n13: rectangle label:"Return Response" -n10.handle(right) -> n11.handle(left) [label="Query"] -n11.handle(right) -> n12.handle(left) [label="Write"] -n12.handle(right) -> n13.handle(left) -n13.handle(top) -> Client.n3.handle(bottom) [label="New Response"] -} -Legacy { # Legacy Monolith -n14: rectangle label:"Process in Monolith" -n15: rectangle label:"Legacy Database" -n16: rectangle label:"Return Legacy Response" -n14.handle(right) -> n15.handle(left) [label="SQL"] -n15.handle(right) -> n16.handle(left) [label="Result"] -n16.handle(top) -> Client.n3.handle(bottom) [label="Legacy Response"] -} +Client { # Client +n1: circle label:"User Request" +n2: rectangle label:"Anti-Corruption Layer" +n3: rectangle label:"Receive Response" +n4: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> Router.n5.handle(top) [label="Translate"] +n3.handle(right) -> n4.handle(left) +} +Router { # Strangler Fig Router +n5: rectangle label:"Inspect Request Path" +n6: diamond label:"Migrated Endpoint?" +n7: rectangle label:"Route to New Service" +n8: rectangle label:"Route to Legacy Monolith" +n9: rectangle label:"Log Migration Metrics" +n5.handle(right) -> n6.handle(left) +n6.handle(right) -> n7.handle(left) [label="Yes"] +n6.handle(bottom) -> n8.handle(top) [label="No"] +n7.handle(bottom) -> NewServices.n10.handle(top) [label="Forward"] +n8.handle(bottom) -> Legacy.n14.handle(top) [label="Forward"] +n7.handle(right) -> n9.handle(left) [label="Track"] +n8.handle(right) -> n9.handle(left) [label="Track"] +} +NewServices { # New Microservices +n10: rectangle label:"Process in New Service" +n11: rectangle label:"New Service Database" +n12: rectangle label:"Publish Domain Event" +n13: rectangle label:"Return Response" +n10.handle(right) -> n11.handle(left) [label="Query"] +n11.handle(right) -> n12.handle(left) [label="Write"] +n12.handle(right) -> n13.handle(left) +n13.handle(top) -> Client.n3.handle(bottom) [label="New Response"] +} +Legacy { # Legacy Monolith +n14: rectangle label:"Process in Monolith" +n15: rectangle label:"Legacy Database" +n16: rectangle label:"Return Legacy Response" +n14.handle(right) -> n15.handle(left) [label="SQL"] +n15.handle(right) -> n16.handle(left) [label="Result"] +n16.handle(top) -> Client.n3.handle(bottom) [label="Legacy Response"] +} diff --git a/delivery/architecture/openclaw-docker-isolated-architecture/README.md b/delivery/architecture/openclaw-docker-isolated-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..23661f48d42ad2abf8bc18737646e7f6453b3d7e --- /dev/null +++ b/delivery/architecture/openclaw-docker-isolated-architecture/README.md @@ -0,0 +1,19 @@ +# OpenClaw Docker Isolated Architecture + +OpenClaw Docker deployment with an isolated gateway runtime, mounted workspace and config volumes, and a commercial LLM API. + +**Template ID:** `openclaw-docker-isolated-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** delivery +**Secondary use cases:** None +**Complexity:** 2/5 +**Nodes:** 7 +**Lanes:** 3 +**Tags:** [OpenClaw, Docker, Docker Container, OpenClaw Docker, AI Agent Deployment, Self-Hosted AI Agent, Volume Mount, Local AI Agent] +**Source path:** `` +**Repo path:** `delivery/architecture/openclaw-docker-isolated-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/delivery/architecture/openclaw-docker-isolated-architecture/metadata.json b/delivery/architecture/openclaw-docker-isolated-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..6e366c346d1aa30dd631a7dedc1b115435fa565f --- /dev/null +++ b/delivery/architecture/openclaw-docker-isolated-architecture/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "openclaw-docker-isolated-architecture", + "workflow_id": "openclaw-docker-isolated-architecture", + "title": "OpenClaw Docker Isolated Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "delivery", + "secondary_use_cases": [], + "use_cases": [ + "delivery" + ], + "complexity": 2, + "num_nodes": 7, + "num_lanes": 3, + "tags": [ + "OpenClaw", + "Docker", + "Docker Container", + "OpenClaw Docker", + "AI Agent Deployment", + "Self-Hosted AI Agent", + "Volume Mount", + "Local AI Agent" + ], + "description": "OpenClaw Docker deployment with an isolated gateway runtime, mounted workspace and config volumes, and a commercial LLM API.", + "source_path": "", + "repo_path": "delivery/architecture/openclaw-docker-isolated-architecture" +} diff --git a/delivery/architecture/openclaw-docker-isolated-architecture/workflow.fz b/delivery/architecture/openclaw-docker-isolated-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..45eed932208db2a9d540ecf5ff7f185019d75d20 --- /dev/null +++ b/delivery/architecture/openclaw-docker-isolated-architecture/workflow.fz @@ -0,0 +1,20 @@ +User { # User +n1: circle label:"Start" +n2: rectangle label:"Send message via Web UI" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> Docker.n3.handle(top) [label="localhost"] +} +Docker { # Docker Container +n3: rectangle label:"OpenClaw Gateway" +n4: rectangle label:"Mounted Workspace Volume" +n5: rectangle label:"Mounted Config Volume" +n3.handle(right) -> n4.handle(left) +n3.handle(bottom) -> n5.handle(top) +n3.handle(bottom) -> LLM.n6.handle(top) [label="API Request"] +} +LLM { # Commercial LLM API +n6: rectangle label:"Claude / GPT / Gemini" +n7: rectangle label:"Generate response" +n6.handle(right) -> n7.handle(left) +n7.handle(top) -> Docker.n3.handle(bottom) [label="Response"] +} diff --git a/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/README.md b/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9233c6ca16079b07dcf47228e40a670e1ba4964b --- /dev/null +++ b/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/README.md @@ -0,0 +1,19 @@ +# OpenClaw Hybrid Cloud + Local Nodes Architecture + +Hybrid OpenClaw architecture with a cloud gateway, local nodes for device actions, persistent agent state, and commercial LLM provider calls. + +**Template ID:** `openclaw-hybrid-cloud-local-nodes-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** delivery +**Secondary use cases:** mcp +**Complexity:** 4/5 +**Nodes:** 10 +**Lanes:** 4 +**Tags:** [OpenClaw, Hybrid Architecture, Cloud Gateway, Local Nodes, AI Agent Deployment, Remote AI Agent, WhatsApp, 24/7 AI Agent] +**Source path:** `` +**Repo path:** `delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/metadata.json b/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..3a06b564312e8257c40c1f3fb833fd299ca54717 --- /dev/null +++ b/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/metadata.json @@ -0,0 +1,31 @@ +{ + "template_id": "openclaw-hybrid-cloud-local-nodes-architecture", + "workflow_id": "openclaw-hybrid-cloud-local-nodes-architecture", + "title": "OpenClaw Hybrid Cloud + Local Nodes Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "delivery", + "secondary_use_cases": [ + "mcp" + ], + "use_cases": [ + "delivery", + "mcp" + ], + "complexity": 4, + "num_nodes": 10, + "num_lanes": 4, + "tags": [ + "OpenClaw", + "Hybrid Architecture", + "Cloud Gateway", + "Local Nodes", + "AI Agent Deployment", + "Remote AI Agent", + "WhatsApp", + "24/7 AI Agent" + ], + "description": "Hybrid OpenClaw architecture with a cloud gateway, local nodes for device actions, persistent agent state, and commercial LLM provider calls.", + "source_path": "", + "repo_path": "delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture" +} diff --git a/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/workflow.fz b/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..7a9b1b64c18b89c24c1485f785f90d1578ce9a86 --- /dev/null +++ b/delivery/architecture/openclaw-hybrid-cloud-local-nodes-architecture/workflow.fz @@ -0,0 +1,29 @@ +User { # User +n1: circle label:"Start" +n2: rectangle label:"Send command via WhatsApp" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> CloudGW.n3.handle(top) [label="Internet"] +} +CloudGW { # Cloud Gateway (VPS) +n3: rectangle label:"OpenClaw Gateway" +n4: rectangle label:"Agent Memory + State" +n5: diamond label:"Local task needed?" +n3.handle(right) -> n4.handle(left) +n4.handle(right) -> n5.handle(left) +n5.handle(bottom) -> LocalNode.n6.handle(top) [label="Yes - Dispatch"] +n5.handle(right) -> n8.handle(left) [label="No - API only"] +n3.handle(bottom) -> LLM.n9.handle(top) [label="API Request"] +} +LocalNode { # Local Node (Mac / iPhone) +n6: rectangle label:"Screen + Camera + System" +n7: rectangle label:"Execute local action" +n6.handle(right) -> n7.handle(left) +n7.handle(top) -> CloudGW.n3.handle(bottom) [label="Result"] +} +LLM { # LLM Provider +n8: rectangle label:"Direct cloud task" +n9: rectangle label:"Claude Opus 4.5" +n10: rectangle label:"Generate response" +n9.handle(right) -> n10.handle(left) +n10.handle(top) -> CloudGW.n3.handle(bottom) [label="Response"] +} diff --git a/delivery/architecture/openclaw-managed-cloud-architecture/README.md b/delivery/architecture/openclaw-managed-cloud-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e0b7a2417e627b89c8a523c69a6a9e74c46f7d50 --- /dev/null +++ b/delivery/architecture/openclaw-managed-cloud-architecture/README.md @@ -0,0 +1,19 @@ +# OpenClaw Managed Cloud Architecture + +Managed cloud OpenClaw deployment using platforms like Railway or Northflank with a hosted gateway, integrations, monitoring, and commercial LLM APIs. + +**Template ID:** `openclaw-managed-cloud-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** delivery +**Secondary use cases:** None +**Complexity:** 3/5 +**Nodes:** 9 +**Lanes:** 3 +**Tags:** [OpenClaw, Managed Cloud, Railway, Northflank, Cloud Deployment, AI Agent Hosting, One-Click Deploy, Hosted AI Agent] +**Source path:** `` +**Repo path:** `delivery/architecture/openclaw-managed-cloud-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/delivery/architecture/openclaw-managed-cloud-architecture/metadata.json b/delivery/architecture/openclaw-managed-cloud-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..69043027a66f38c7b8be155462ae81adb36ee829 --- /dev/null +++ b/delivery/architecture/openclaw-managed-cloud-architecture/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "openclaw-managed-cloud-architecture", + "workflow_id": "openclaw-managed-cloud-architecture", + "title": "OpenClaw Managed Cloud Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "delivery", + "secondary_use_cases": [], + "use_cases": [ + "delivery" + ], + "complexity": 3, + "num_nodes": 9, + "num_lanes": 3, + "tags": [ + "OpenClaw", + "Managed Cloud", + "Railway", + "Northflank", + "Cloud Deployment", + "AI Agent Hosting", + "One-Click Deploy", + "Hosted AI Agent" + ], + "description": "Managed cloud OpenClaw deployment using platforms like Railway or Northflank with a hosted gateway, integrations, monitoring, and commercial LLM APIs.", + "source_path": "", + "repo_path": "delivery/architecture/openclaw-managed-cloud-architecture" +} diff --git a/delivery/architecture/openclaw-managed-cloud-architecture/workflow.fz b/delivery/architecture/openclaw-managed-cloud-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..f9f316185dd6405bdf0f61698f9426bff53b24d1 --- /dev/null +++ b/delivery/architecture/openclaw-managed-cloud-architecture/workflow.fz @@ -0,0 +1,24 @@ +User { # User +n1: circle label:"Start" +n2: rectangle label:"Click Deploy on Railway" +n3: rectangle label:"Configure API key in wizard" +n4: rectangle label:"Chat via Telegram / Discord" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(right) -> n4.handle(left) +n4.handle(bottom) -> Cloud.n5.handle(top) [label="Internet"] +} +Cloud { # Managed Cloud Platform +n5: rectangle label:"OpenClaw Gateway (managed)" +n6: rectangle label:"Auto-updates + Monitoring" +n7: rectangle label:"Pre-configured Integrations" +n5.handle(right) -> n6.handle(left) +n6.handle(right) -> n7.handle(left) +n5.handle(bottom) -> LLM.n8.handle(top) [label="API Request"] +} +LLM { # Commercial LLM API +n8: rectangle label:"Claude / GPT / Gemini" +n9: rectangle label:"Generate response" +n8.handle(right) -> n9.handle(left) +n9.handle(top) -> Cloud.n5.handle(bottom) [label="Response"] +} diff --git a/delivery/architecture/openclaw-native-install-architecture/README.md b/delivery/architecture/openclaw-native-install-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0ba6b344ab9ebc77d4b9c00f6ffa9aa018d39ad0 --- /dev/null +++ b/delivery/architecture/openclaw-native-install-architecture/README.md @@ -0,0 +1,19 @@ +# OpenClaw Native Install Architecture + +OpenClaw deployment on your everyday machine with the gateway, workspace, and commercial LLM API connected locally through the web UI. + +**Template ID:** `openclaw-native-install-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** delivery +**Secondary use cases:** None +**Complexity:** 2/5 +**Nodes:** 9 +**Lanes:** 3 +**Tags:** [OpenClaw, AI Agent Deployment, Native Install, Local Install, Self-Hosted AI Agent, Web UI, Claude, GPT, Gemini] +**Source path:** `` +**Repo path:** `delivery/architecture/openclaw-native-install-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/delivery/architecture/openclaw-native-install-architecture/metadata.json b/delivery/architecture/openclaw-native-install-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..70b52d2e2f3788b17c3302976fd569739f7f84f3 --- /dev/null +++ b/delivery/architecture/openclaw-native-install-architecture/metadata.json @@ -0,0 +1,29 @@ +{ + "template_id": "openclaw-native-install-architecture", + "workflow_id": "openclaw-native-install-architecture", + "title": "OpenClaw Native Install Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "delivery", + "secondary_use_cases": [], + "use_cases": [ + "delivery" + ], + "complexity": 2, + "num_nodes": 9, + "num_lanes": 3, + "tags": [ + "OpenClaw", + "AI Agent Deployment", + "Native Install", + "Local Install", + "Self-Hosted AI Agent", + "Web UI", + "Claude", + "GPT", + "Gemini" + ], + "description": "OpenClaw deployment on your everyday machine with the gateway, workspace, and commercial LLM API connected locally through the web UI.", + "source_path": "", + "repo_path": "delivery/architecture/openclaw-native-install-architecture" +} diff --git a/delivery/architecture/openclaw-native-install-architecture/workflow.fz b/delivery/architecture/openclaw-native-install-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..b42faabdc3b229830b2cd059a289d77902283ac1 --- /dev/null +++ b/delivery/architecture/openclaw-native-install-architecture/workflow.fz @@ -0,0 +1,23 @@ +User { # User +n1: circle label:"Start" +n2: rectangle label:"Open Terminal" +n3: rectangle label:"Send message via Web UI" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> Machine.n4.handle(top) [label="localhost"] +} +Machine { # Your Everyday Machine +n4: rectangle label:"OpenClaw Gateway" +n5: rectangle label:"Workspace + Files" +n6: rectangle label:"LLM API call" +n7: circle label:"Task Done" +n4.handle(right) -> n5.handle(left) +n4.handle(bottom) -> LLM.n8.handle(top) [label="API Request"] +n5.handle(right) -> n7.handle(left) +} +LLM { # Commercial LLM API +n8: rectangle label:"Claude / GPT / Gemini" +n9: rectangle label:"Generate response" +n8.handle(right) -> n9.handle(left) +n9.handle(top) -> Machine.n4.handle(bottom) [label="Response"] +} diff --git a/delivery/architecture/openclaw-vps-self-managed-architecture/README.md b/delivery/architecture/openclaw-vps-self-managed-architecture/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c82447ab17d0997600a306a7f76debe2ac26fb87 --- /dev/null +++ b/delivery/architecture/openclaw-vps-self-managed-architecture/README.md @@ -0,0 +1,19 @@ +# OpenClaw VPS Self-Managed Architecture + +Self-managed OpenClaw VPS deployment with gateway, workspace, firewall/auth layer, and commercial LLM provider access from any device. + +**Template ID:** `openclaw-vps-self-managed-architecture` +**Kind:** architecture +**Source domain:** Architecture +**Primary use case:** delivery +**Secondary use cases:** None +**Complexity:** 2/5 +**Nodes:** 7 +**Lanes:** 3 +**Tags:** [OpenClaw, VPS, Self-Managed VPS, Cloud Deployment, Hetzner, DigitalOcean, Remote Access, SSH Tunnel] +**Source path:** `` +**Repo path:** `delivery/architecture/openclaw-vps-self-managed-architecture` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/delivery/architecture/openclaw-vps-self-managed-architecture/metadata.json b/delivery/architecture/openclaw-vps-self-managed-architecture/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..7e61d4b04a46f48da021181b90385c8961caf883 --- /dev/null +++ b/delivery/architecture/openclaw-vps-self-managed-architecture/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "openclaw-vps-self-managed-architecture", + "workflow_id": "openclaw-vps-self-managed-architecture", + "title": "OpenClaw VPS Self-Managed Architecture", + "kind": "architecture", + "source_domain": "Architecture", + "primary_use_case": "delivery", + "secondary_use_cases": [], + "use_cases": [ + "delivery" + ], + "complexity": 2, + "num_nodes": 7, + "num_lanes": 3, + "tags": [ + "OpenClaw", + "VPS", + "Self-Managed VPS", + "Cloud Deployment", + "Hetzner", + "DigitalOcean", + "Remote Access", + "SSH Tunnel" + ], + "description": "Self-managed OpenClaw VPS deployment with gateway, workspace, firewall/auth layer, and commercial LLM provider access from any device.", + "source_path": "", + "repo_path": "delivery/architecture/openclaw-vps-self-managed-architecture" +} diff --git a/delivery/architecture/openclaw-vps-self-managed-architecture/workflow.fz b/delivery/architecture/openclaw-vps-self-managed-architecture/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..76720a0191a6ea5a3d248dfda17b58b9c19ea0ec --- /dev/null +++ b/delivery/architecture/openclaw-vps-self-managed-architecture/workflow.fz @@ -0,0 +1,20 @@ +User { # User (Any Device) +n1: circle label:"Start" +n2: rectangle label:"Send command via Telegram" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> VPS.n3.handle(top) [label="Internet / SSH Tunnel"] +} +VPS { # VPS (DigitalOcean / Hetzner) +n3: rectangle label:"OpenClaw Gateway" +n4: rectangle label:"Workspace + State" +n5: rectangle label:"Firewall + Auth" +n3.handle(right) -> n4.handle(left) +n3.handle(bottom) -> n5.handle(top) +n3.handle(bottom) -> LLM.n6.handle(top) [label="API Request"] +} +LLM { # Commercial LLM API +n6: rectangle label:"Claude / GPT / Gemini" +n7: rectangle label:"Generate response" +n6.handle(right) -> n7.handle(left) +n7.handle(top) -> VPS.n3.handle(bottom) [label="Response"] +} diff --git a/delivery/architecture/saga-orchestration-pattern-architecture/README.md b/delivery/architecture/saga-orchestration-pattern-architecture/README.md index 909705cc351311dd4a9deaec2e3e039be0359e0c..02dc7617cb3275f49fe31bf4a53b2b341c2b4134 100644 --- a/delivery/architecture/saga-orchestration-pattern-architecture/README.md +++ b/delivery/architecture/saga-orchestration-pattern-architecture/README.md @@ -6,7 +6,7 @@ A saga orchestration architecture diagram with a central orchestrator coordinati **Kind:** architecture **Source domain:** Architecture **Primary use case:** delivery -**Secondary use cases:** ai-orchestration +**Secondary use cases:** ai-orchestration, architecture, patterns **Complexity:** 4/5 **Nodes:** 19 **Lanes:** 5 diff --git a/delivery/architecture/saga-orchestration-pattern-architecture/metadata.json b/delivery/architecture/saga-orchestration-pattern-architecture/metadata.json index 7f2c04b1777b81b717b6d2b97d27bfa8ecd0b927..938479eb9306719f2331285b5cda761e99a8e4b6 100644 --- a/delivery/architecture/saga-orchestration-pattern-architecture/metadata.json +++ b/delivery/architecture/saga-orchestration-pattern-architecture/metadata.json @@ -6,11 +6,15 @@ "source_domain": "Architecture", "primary_use_case": "delivery", "secondary_use_cases": [ - "ai-orchestration" + "ai-orchestration", + "architecture", + "patterns" ], "use_cases": [ "delivery", - "ai-orchestration" + "ai-orchestration", + "architecture", + "patterns" ], "complexity": 4, "num_nodes": 19, diff --git a/delivery/architecture/saga-orchestration-pattern-architecture/workflow.fz b/delivery/architecture/saga-orchestration-pattern-architecture/workflow.fz index cb2b5938d154d35994a494180e517a4b14a71ad5..417252c6711e02888f9ecbb74ab52fb5dbc47fba 100644 --- a/delivery/architecture/saga-orchestration-pattern-architecture/workflow.fz +++ b/delivery/architecture/saga-orchestration-pattern-architecture/workflow.fz @@ -1,60 +1,60 @@ -Orchestrator { # Saga Orchestrator -n1: circle label:"Start Saga" -n2: rectangle label:"Create Saga Instance" -n3: rectangle label:"Execute Step 1: Create Order" -n8: rectangle label:"Execute Step 2: Reserve Inventory" -n12: rectangle label:"Execute Step 3: Process Payment" -n16: diamond label:"All Steps Succeeded?" -n17: rectangle label:"Mark Saga Complete" -n18: rectangle label:"Begin Compensation" -n19: circle label:"Saga Finished" -n25: rectangle label:"Rollback Confirmed" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) [label="Initialize"] -n3.handle(bottom) -> OrderService.n4.handle(top) [label="Command"] -n8.handle(bottom) -> InventoryService.n9.handle(top) [label="Command"] -n12.handle(bottom) -> PaymentService.n13.handle(top) [label="Command"] -n16.handle(right) -> n17.handle(left) [label="Yes"] -n16.handle(bottom) -> n18.handle(top) [label="No"] -n17.handle(right) -> n19.handle(left) -n18.handle(bottom) -> Compensation.n20.handle(top) [label="Rollback"] -n25.handle(right) -> n19.handle(left) -} -OrderService { # Order Service -n4: rectangle label:"Create Order Record" -n5: rectangle label:"Return Order ID" -n6: rectangle label:"Send Order Result" -n7: rectangle label:"Forward to Orchestrator" -n4.handle(right) -> n5.handle(left) [label="Persisted"] -n5.handle(right) -> n6.handle(left) -n6.handle(right) -> n7.handle(left) -n7.handle(top) -> Orchestrator.n8.handle(bottom) [label="Step 1 OK"] -} -InventoryService { # Inventory Service -n9: rectangle label:"Reserve Stock Items" -n10: rectangle label:"Return Reservation ID" -n11: rectangle label:"Forward to Orchestrator" -n9.handle(right) -> n10.handle(left) [label="Reserved"] -n10.handle(right) -> n11.handle(left) -n11.handle(top) -> Orchestrator.n12.handle(bottom) [label="Step 2 OK"] -} -PaymentService { # Payment Service -n13: rectangle label:"Charge Payment Method" -n14: rectangle label:"Return Transaction ID" -n15: rectangle label:"Forward to Orchestrator" -n13.handle(right) -> n14.handle(left) [label="Charged"] -n14.handle(right) -> n15.handle(left) -n15.handle(top) -> Orchestrator.n16.handle(bottom) [label="Result"] -} -Compensation { # Compensation Steps -n20: rectangle label:"Reverse Payment" -n21: rectangle label:"Release Inventory" -n22: rectangle label:"Cancel Order" -n23: rectangle label:"Notify Orchestrator" -n24: rectangle label:"Send Rollback Status" -n20.handle(right) -> n21.handle(left) [label="Refund"] -n21.handle(right) -> n22.handle(left) [label="Unreserve"] -n22.handle(right) -> n23.handle(left) [label="Cancelled"] -n23.handle(right) -> n24.handle(left) -n24.handle(top) -> Orchestrator.n25.handle(bottom) [label="Rollback Complete"] -} +Orchestrator { # Saga Orchestrator +n1: circle label:"Start Saga" +n2: rectangle label:"Create Saga Instance" +n3: rectangle label:"Execute Step 1: Create Order" +n8: rectangle label:"Execute Step 2: Reserve Inventory" +n12: rectangle label:"Execute Step 3: Process Payment" +n16: diamond label:"All Steps Succeeded?" +n17: rectangle label:"Mark Saga Complete" +n18: rectangle label:"Begin Compensation" +n19: circle label:"Saga Finished" +n25: rectangle label:"Rollback Confirmed" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) [label="Initialize"] +n3.handle(bottom) -> OrderService.n4.handle(top) [label="Command"] +n8.handle(bottom) -> InventoryService.n9.handle(top) [label="Command"] +n12.handle(bottom) -> PaymentService.n13.handle(top) [label="Command"] +n16.handle(right) -> n17.handle(left) [label="Yes"] +n16.handle(bottom) -> n18.handle(top) [label="No"] +n17.handle(right) -> n19.handle(left) +n18.handle(bottom) -> Compensation.n20.handle(top) [label="Rollback"] +n25.handle(right) -> n19.handle(left) +} +OrderService { # Order Service +n4: rectangle label:"Create Order Record" +n5: rectangle label:"Return Order ID" +n6: rectangle label:"Send Order Result" +n7: rectangle label:"Forward to Orchestrator" +n4.handle(right) -> n5.handle(left) [label="Persisted"] +n5.handle(right) -> n6.handle(left) +n6.handle(right) -> n7.handle(left) +n7.handle(top) -> Orchestrator.n8.handle(bottom) [label="Step 1 OK"] +} +InventoryService { # Inventory Service +n9: rectangle label:"Reserve Stock Items" +n10: rectangle label:"Return Reservation ID" +n11: rectangle label:"Forward to Orchestrator" +n9.handle(right) -> n10.handle(left) [label="Reserved"] +n10.handle(right) -> n11.handle(left) +n11.handle(top) -> Orchestrator.n12.handle(bottom) [label="Step 2 OK"] +} +PaymentService { # Payment Service +n13: rectangle label:"Charge Payment Method" +n14: rectangle label:"Return Transaction ID" +n15: rectangle label:"Forward to Orchestrator" +n13.handle(right) -> n14.handle(left) [label="Charged"] +n14.handle(right) -> n15.handle(left) +n15.handle(top) -> Orchestrator.n16.handle(bottom) [label="Result"] +} +Compensation { # Compensation Steps +n20: rectangle label:"Reverse Payment" +n21: rectangle label:"Release Inventory" +n22: rectangle label:"Cancel Order" +n23: rectangle label:"Notify Orchestrator" +n24: rectangle label:"Send Rollback Status" +n20.handle(right) -> n21.handle(left) [label="Refund"] +n21.handle(right) -> n22.handle(left) [label="Unreserve"] +n22.handle(right) -> n23.handle(left) [label="Cancelled"] +n23.handle(right) -> n24.handle(left) +n24.handle(top) -> Orchestrator.n25.handle(bottom) [label="Rollback Complete"] +} diff --git a/delivery/architecture/serverless-data-pipeline-architecture/README.md b/delivery/architecture/serverless-data-pipeline-architecture/README.md index 06a91c33323d8e5e7bd7ae05ae1684f9793a5f1a..31f86b76f2f4f969d58990687e5908a5e0058f12 100644 --- a/delivery/architecture/serverless-data-pipeline-architecture/README.md +++ b/delivery/architecture/serverless-data-pipeline-architecture/README.md @@ -6,7 +6,7 @@ A serverless data pipeline architecture diagram with Kinesis ingestion, Lambda t **Kind:** architecture **Source domain:** Architecture **Primary use case:** delivery -**Secondary use cases:** None +**Secondary use cases:** architecture **Complexity:** 4/5 **Nodes:** 17 **Lanes:** 4 diff --git a/delivery/architecture/serverless-data-pipeline-architecture/metadata.json b/delivery/architecture/serverless-data-pipeline-architecture/metadata.json index 0b5bf812b4c418392b2882498fbc73d4657d544b..2ad0c5a0c978dc3ed44abce6933d03a4c4261ffe 100644 --- a/delivery/architecture/serverless-data-pipeline-architecture/metadata.json +++ b/delivery/architecture/serverless-data-pipeline-architecture/metadata.json @@ -5,9 +5,12 @@ "kind": "architecture", "source_domain": "Architecture", "primary_use_case": "delivery", - "secondary_use_cases": [], + "secondary_use_cases": [ + "architecture" + ], "use_cases": [ - "delivery" + "delivery", + "architecture" ], "complexity": 4, "num_nodes": 17, diff --git a/delivery/architecture/serverless-data-pipeline-architecture/workflow.fz b/delivery/architecture/serverless-data-pipeline-architecture/workflow.fz index ecdbf690462768badbb59c0d910cac623ef213ed..46155f68f9bd52129413c13e8387229ee4444efd 100644 --- a/delivery/architecture/serverless-data-pipeline-architecture/workflow.fz +++ b/delivery/architecture/serverless-data-pipeline-architecture/workflow.fz @@ -1,41 +1,41 @@ -Ingestion { # Data Ingestion -n1: rectangle label:"Kinesis Data Stream" -n2: rectangle label:"API Gateway Endpoint" -n3: rectangle label:"IoT Core MQTT" -n4: rectangle label:"Kinesis Firehose" -n1.handle(right) -> n4.handle(left) [label="Stream"] -n2.handle(right) -> n4.handle(left) [label="Batch"] -n3.handle(right) -> n4.handle(left) [label="Device Data"] -n4.handle(bottom) -> Transform.n5.handle(top) [label="Buffer + Deliver"] -} -Transform { # Serverless Transform -n5: rectangle label:"Lambda Transform Function" -n6: rectangle label:"Validate Schema" -n7: diamond label:"Valid Record?" -n8: rectangle label:"Enrich with Reference Data" -n9: rectangle label:"Route to Error Bucket" -n10: rectangle label:"Partition by Date" -n5.handle(right) -> n6.handle(left) -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) [label="Valid"] -n7.handle(bottom) -> n9.handle(top) [label="Invalid"] -n8.handle(right) -> n10.handle(left) [label="Enriched"] -n10.handle(bottom) -> Storage.n11.handle(top) [label="Partitioned"] -} -Storage { # Data Lake Storage -n11: rectangle label:"S3 Raw Zone" -n12: rectangle label:"S3 Curated Zone" -n13: rectangle label:"Glue Catalog" -n14: rectangle label:"Athena Query Engine" -n11.handle(right) -> n12.handle(left) [label="Glue ETL Job"] -n12.handle(right) -> n13.handle(left) [label="Register Schema"] -n13.handle(right) -> n14.handle(left) [label="Queryable"] -} -Analytics { # Analytics Layer -n15: rectangle label:"QuickSight Dashboard" -n16: rectangle label:"SageMaker ML Model" -n17: rectangle label:"Redshift Data Warehouse" -n14.handle(bottom) -> Analytics.n15.handle(top) [label="Visualize"] -n14.handle(bottom) -> Analytics.n16.handle(top) [label="Train Model"] -n14.handle(bottom) -> Analytics.n17.handle(top) [label="COPY INTO"] -} +Ingestion { # Data Ingestion +n1: rectangle label:"Kinesis Data Stream" +n2: rectangle label:"API Gateway Endpoint" +n3: rectangle label:"IoT Core MQTT" +n4: rectangle label:"Kinesis Firehose" +n1.handle(right) -> n4.handle(left) [label="Stream"] +n2.handle(right) -> n4.handle(left) [label="Batch"] +n3.handle(right) -> n4.handle(left) [label="Device Data"] +n4.handle(bottom) -> Transform.n5.handle(top) [label="Buffer + Deliver"] +} +Transform { # Serverless Transform +n5: rectangle label:"Lambda Transform Function" +n6: rectangle label:"Validate Schema" +n7: diamond label:"Valid Record?" +n8: rectangle label:"Enrich with Reference Data" +n9: rectangle label:"Route to Error Bucket" +n10: rectangle label:"Partition by Date" +n5.handle(right) -> n6.handle(left) +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) [label="Valid"] +n7.handle(bottom) -> n9.handle(top) [label="Invalid"] +n8.handle(right) -> n10.handle(left) [label="Enriched"] +n10.handle(bottom) -> Storage.n11.handle(top) [label="Partitioned"] +} +Storage { # Data Lake Storage +n11: rectangle label:"S3 Raw Zone" +n12: rectangle label:"S3 Curated Zone" +n13: rectangle label:"Glue Catalog" +n14: rectangle label:"Athena Query Engine" +n11.handle(right) -> n12.handle(left) [label="Glue ETL Job"] +n12.handle(right) -> n13.handle(left) [label="Register Schema"] +n13.handle(right) -> n14.handle(left) [label="Queryable"] +} +Analytics { # Analytics Layer +n15: rectangle label:"QuickSight Dashboard" +n16: rectangle label:"SageMaker ML Model" +n17: rectangle label:"Redshift Data Warehouse" +n14.handle(bottom) -> Analytics.n15.handle(top) [label="Visualize"] +n14.handle(bottom) -> Analytics.n16.handle(top) [label="Train Model"] +n14.handle(bottom) -> Analytics.n17.handle(top) [label="COPY INTO"] +} diff --git a/delivery/commerce-automation/ai-product-sync-pipeline-workflow/README.md b/delivery/commerce-automation/ai-product-sync-pipeline-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..048b68716b70f655ceffb06ec7214e8602fb1982 --- /dev/null +++ b/delivery/commerce-automation/ai-product-sync-pipeline-workflow/README.md @@ -0,0 +1,19 @@ +# AI Product Sync Pipeline Workflow + +Product sync between platforms with an AI agent in the middle: field extraction, category mapping and schema normalization before the write-back returns 200 OK. + +**Template ID:** `ai-product-sync-pipeline-workflow` +**Kind:** workflow +**Source domain:** Commerce Automation +**Primary use case:** delivery +**Secondary use cases:** commerce-automation +**Complexity:** 2/5 +**Nodes:** 12 +**Lanes:** 3 +**Tags:** [n8n, product-sync, ai-agents, schema-normalization, ecommerce] +**Source path:** `` +**Repo path:** `delivery/commerce-automation/ai-product-sync-pipeline-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/delivery/commerce-automation/ai-product-sync-pipeline-workflow/metadata.json b/delivery/commerce-automation/ai-product-sync-pipeline-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..e1cf935fe8acaa13e81fa0a890e29bfa3f643677 --- /dev/null +++ b/delivery/commerce-automation/ai-product-sync-pipeline-workflow/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "ai-product-sync-pipeline-workflow", + "workflow_id": "ai-product-sync-pipeline", + "title": "AI Product Sync Pipeline Workflow", + "kind": "workflow", + "source_domain": "Commerce Automation", + "primary_use_case": "delivery", + "secondary_use_cases": [ + "commerce-automation" + ], + "use_cases": [ + "delivery", + "commerce-automation" + ], + "complexity": 2, + "num_nodes": 12, + "num_lanes": 3, + "tags": [ + "n8n", + "product-sync", + "ai-agents", + "schema-normalization", + "ecommerce" + ], + "description": "Product sync between platforms with an AI agent in the middle: field extraction, category mapping and schema normalization before the write-back returns 200 OK.", + "source_path": "", + "repo_path": "delivery/commerce-automation/ai-product-sync-pipeline-workflow" +} diff --git a/delivery/commerce-automation/ai-product-sync-pipeline-workflow/workflow.fz b/delivery/commerce-automation/ai-product-sync-pipeline-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..dd02ecbad4024ac5a1565c3ad863ece76aca1ea7 --- /dev/null +++ b/delivery/commerce-automation/ai-product-sync-pipeline-workflow/workflow.fz @@ -0,0 +1,34 @@ +source { # Source Platform + n1: circle label:"Product Created" + n2: rectangle label:"Shopify Webhook" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n8n.n3.handle(left) [label="POST product"] +} + +n8n { # n8n AI Agent Layer + n3: rectangle label:"Receive Webhook" + n4: rectangle label:"AI: Extract Fields" + n5: diamond label:"Has Variants?" + n6: rectangle label:"AI: Normalize Schema" + n7: rectangle label:"AI: Map Categories" + n8: rectangle label:"Queue Sync Tasks" + n3.handle(left) -> source.n2.handle(right) [label="200 OK"] + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) + n5.handle(right) -> n6.handle(left) [label="yes"] + n5.handle(bottom) -> n7.handle(top) [label="no"] + n6.handle(right) -> n8.handle(left) + n7.handle(right) -> n8.handle(left) + n8.handle(right) -> target.n9.handle(left) [label="push product"] +} + +target { # Target Platforms + n9: rectangle label:"Target API Router" + n10: rectangle label:"WooCommerce API" + n11: rectangle label:"Amazon SP-API" + n12: circle label:"Synced" + n9.handle(left) -> n8n.n8.handle(right) [label="ack"] + n9.handle(right) -> n10.handle(left) + n10.handle(right) -> n11.handle(left) + n11.handle(right) -> n12.handle(left) +} diff --git a/delivery/devops/backup-restore-workflow/workflow.fz b/delivery/devops/backup-restore-workflow/workflow.fz index e9b334ee987ffdbc0716b220493fc7e609f8a500..3f3bfcec51d4f7226576198f1b30e4e0aba0d5d4 100644 --- a/delivery/devops/backup-restore-workflow/workflow.fz +++ b/delivery/devops/backup-restore-workflow/workflow.fz @@ -1,47 +1,47 @@ -BackupScheduler { # Backup Scheduler -n1: circle label:"Start" -n2: rectangle label:"Trigger scheduled backup" -n3: rectangle label:"Select backup targets" -n4: rectangle label:"Verify backup completion" -n5: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(bottom) -> BackupAgent.n6.handle(top) [label="Execute"] -n4.handle(right) -> n5.handle(left) -} -BackupAgent { # Backup Agent -n6: rectangle label:"Create database snapshot" -n7: rectangle label:"Compress backup files" -n8: rectangle label:"Encrypt with AES-256" -n9: rectangle label:"Upload to S3 bucket" -n10: diamond label:"Upload successful?" -n11: rectangle label:"Update backup catalog" -n12: rectangle label:"Retry upload" -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) -n9.handle(right) -> n10.handle(left) -n10.handle(right) -> n11.handle(left) [label="Yes"] -n10.handle(bottom) -> n12.handle(top) [label="No"] -n11.handle(top) -> BackupScheduler.n4.handle(bottom) [label="Complete"] -n12.handle(top) -> n9.handle(bottom) [label="Retry"] -} -RestoreProcess { # Restore Process -n13: rectangle label:"Select restore point" -n14: rectangle label:"Download from S3" -n15: rectangle label:"Decrypt backup" -n16: rectangle label:"Decompress files" -n17: diamond label:"Restore type?" -n18: rectangle label:"Full database restore" -n19: rectangle label:"Point-in-time recovery" -n20: rectangle label:"Verify data integrity" -n13.handle(right) -> n14.handle(left) -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n17.handle(left) -n17.handle(right) -> n18.handle(left) [label="Full"] -n17.handle(bottom) -> n19.handle(top) [label="PITR"] -n18.handle(right) -> n20.handle(left) -n19.handle(right) -> n20.handle(top) -n20.handle(top) -> BackupScheduler.n4.handle(bottom) [label="Restored"] +BackupScheduler { # Backup Scheduler +n1: circle label:"Start" +n2: rectangle label:"Trigger scheduled backup" +n3: rectangle label:"Select backup targets" +n4: rectangle label:"Verify backup completion" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> BackupAgent.n6.handle(top) [label="Execute"] +n4.handle(right) -> n5.handle(left) +} +BackupAgent { # Backup Agent +n6: rectangle label:"Create database snapshot" +n7: rectangle label:"Compress backup files" +n8: rectangle label:"Encrypt with AES-256" +n9: rectangle label:"Upload to S3 bucket" +n10: diamond label:"Upload successful?" +n11: rectangle label:"Update backup catalog" +n12: rectangle label:"Retry upload" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) +n9.handle(right) -> n10.handle(left) +n10.handle(right) -> n11.handle(left) [label="Yes"] +n10.handle(bottom) -> n12.handle(top) [label="No"] +n11.handle(top) -> BackupScheduler.n4.handle(bottom) [label="Complete"] +n12.handle(top) -> n9.handle(bottom) [label="Retry"] +} +RestoreProcess { # Restore Process +n13: rectangle label:"Select restore point" +n14: rectangle label:"Download from S3" +n15: rectangle label:"Decrypt backup" +n16: rectangle label:"Decompress files" +n17: diamond label:"Restore type?" +n18: rectangle label:"Full database restore" +n19: rectangle label:"Point-in-time recovery" +n20: rectangle label:"Verify data integrity" +n13.handle(right) -> n14.handle(left) +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n17.handle(left) +n17.handle(right) -> n18.handle(left) [label="Full"] +n17.handle(bottom) -> n19.handle(top) [label="PITR"] +n18.handle(right) -> n20.handle(left) +n19.handle(right) -> n20.handle(top) +n20.handle(top) -> BackupScheduler.n4.handle(bottom) [label="Restored"] } \ No newline at end of file diff --git a/delivery/devops/ci-cd-pipeline-workflow/workflow.fz b/delivery/devops/ci-cd-pipeline-workflow/workflow.fz index 5eb02e6ffdfc7a1e9b834395a0970895777497e8..78cc274b456aebd5e03b7e2741311b3cc2ede923 100644 --- a/delivery/devops/ci-cd-pipeline-workflow/workflow.fz +++ b/delivery/devops/ci-cd-pipeline-workflow/workflow.fz @@ -1,53 +1,53 @@ -Developer { # Developer -n1: circle label:"Start" -n2: rectangle label:"Push code to repository" -n3: rectangle label:"Review pipeline status" -n4: rectangle label:"Merge to main branch" -n5: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(bottom) -> CI.n6.handle(top) [label="Trigger build"] -n3.handle(right) -> n4.handle(left) -n4.handle(bottom) -> CD.n18.handle(top) [label="Deploy"] -} -CI { # Continuous Integration -n6: rectangle label:"Checkout source code" -n7: rectangle label:"Install dependencies" -n8: rectangle label:"Run linting checks" -n9: diamond label:"Lint passed?" -n10: rectangle label:"Run unit tests" -n11: diamond label:"Tests passed?" -n12: rectangle label:"Build artifacts" -n13: rectangle label:"Push to artifact registry" -n14: rectangle label:"Notify build failure" -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) -n9.handle(right) -> n10.handle(left) [label="Yes"] -n9.handle(bottom) -> n14.handle(top) [label="No"] -n10.handle(right) -> n11.handle(left) -n11.handle(right) -> n12.handle(left) [label="Yes"] -n11.handle(bottom) -> n14.handle(top) [label="No"] -n12.handle(right) -> n13.handle(left) -n13.handle(top) -> Developer.n3.handle(bottom) [label="Build ready"] -n14.handle(top) -> Developer.n3.handle(bottom) [label="Failed"] -} -CD { # Continuous Deployment -n15: rectangle label:"Pull latest artifacts" -n16: rectangle label:"Deploy to staging" -n17: diamond label:"Staging tests pass?" -n18: rectangle label:"Deploy to production" -n19: rectangle label:"Run smoke tests" -n20: diamond label:"Health check OK?" -n21: rectangle label:"Update load balancer" -n22: rectangle label:"Rollback deployment" -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n17.handle(left) -n17.handle(right) -> n18.handle(left) [label="Yes"] -n17.handle(bottom) -> n22.handle(top) [label="No"] -n18.handle(right) -> n19.handle(left) -n19.handle(right) -> n20.handle(left) -n20.handle(right) -> n21.handle(left) [label="Yes"] -n20.handle(bottom) -> n22.handle(top) [label="No"] -n21.handle(top) -> Developer.n5.handle(bottom) [label="Live"] -n22.handle(top) -> Developer.n3.handle(bottom) [label="Rolled back"] +Developer { # Developer +n1: circle label:"Start" +n2: rectangle label:"Push code to repository" +n3: rectangle label:"Review pipeline status" +n4: rectangle label:"Merge to main branch" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> CI.n6.handle(top) [label="Trigger build"] +n3.handle(right) -> n4.handle(left) +n4.handle(bottom) -> CD.n18.handle(top) [label="Deploy"] +} +CI { # Continuous Integration +n6: rectangle label:"Checkout source code" +n7: rectangle label:"Install dependencies" +n8: rectangle label:"Run linting checks" +n9: diamond label:"Lint passed?" +n10: rectangle label:"Run unit tests" +n11: diamond label:"Tests passed?" +n12: rectangle label:"Build artifacts" +n13: rectangle label:"Push to artifact registry" +n14: rectangle label:"Notify build failure" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) +n9.handle(right) -> n10.handle(left) [label="Yes"] +n9.handle(bottom) -> n14.handle(top) [label="No"] +n10.handle(right) -> n11.handle(left) +n11.handle(right) -> n12.handle(left) [label="Yes"] +n11.handle(bottom) -> n14.handle(top) [label="No"] +n12.handle(right) -> n13.handle(left) +n13.handle(top) -> Developer.n3.handle(bottom) [label="Build ready"] +n14.handle(top) -> Developer.n3.handle(bottom) [label="Failed"] +} +CD { # Continuous Deployment +n15: rectangle label:"Pull latest artifacts" +n16: rectangle label:"Deploy to staging" +n17: diamond label:"Staging tests pass?" +n18: rectangle label:"Deploy to production" +n19: rectangle label:"Run smoke tests" +n20: diamond label:"Health check OK?" +n21: rectangle label:"Update load balancer" +n22: rectangle label:"Rollback deployment" +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n17.handle(left) +n17.handle(right) -> n18.handle(left) [label="Yes"] +n17.handle(bottom) -> n22.handle(top) [label="No"] +n18.handle(right) -> n19.handle(left) +n19.handle(right) -> n20.handle(left) +n20.handle(right) -> n21.handle(left) [label="Yes"] +n20.handle(bottom) -> n22.handle(top) [label="No"] +n21.handle(top) -> Developer.n5.handle(bottom) [label="Live"] +n22.handle(top) -> Developer.n3.handle(bottom) [label="Rolled back"] } \ No newline at end of file diff --git a/delivery/devops/infrastructure-provisioning-workflow/workflow.fz b/delivery/devops/infrastructure-provisioning-workflow/workflow.fz index 8ba71b252176c0efc7bb742f189833fda3213bc0..a63761cbada194503bca44d2e044c0ffb72c18f8 100644 --- a/delivery/devops/infrastructure-provisioning-workflow/workflow.fz +++ b/delivery/devops/infrastructure-provisioning-workflow/workflow.fz @@ -1,46 +1,46 @@ -DevOps { # DevOps Engineer -n1: circle label:"Start" -n2: rectangle label:"Define infrastructure requirements" -n3: rectangle label:"Write Terraform configuration" -n4: rectangle label:"Review provisioned resources" -n5: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(bottom) -> Terraform.n6.handle(top) [label="Plan"] -n4.handle(right) -> n5.handle(left) -} -Terraform { # Terraform -n6: rectangle label:"Initialize providers" -n7: rectangle label:"Generate execution plan" -n8: diamond label:"Plan valid?" -n9: rectangle label:"Display planned changes" -n10: rectangle label:"Show validation errors" -n11: diamond label:"Approve changes?" -n12: rectangle label:"Apply configuration" -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) [label="Yes"] -n8.handle(bottom) -> n10.handle(top) [label="No"] -n9.handle(right) -> n11.handle(left) -n10.handle(top) -> DevOps.n3.handle(bottom) [label="Fix config"] -n11.handle(right) -> n12.handle(left) [label="Yes"] -n11.handle(bottom) -> DevOps.n3.handle(bottom) [label="No"] -n12.handle(bottom) -> CloudProvider.n13.handle(top) [label="Provision"] -} -CloudProvider { # Cloud Provider -n13: rectangle label:"Create VPC and subnets" -n14: rectangle label:"Provision compute instances" -n15: rectangle label:"Configure load balancers" -n16: rectangle label:"Set up security groups" -n17: diamond label:"All resources healthy?" -n18: rectangle label:"Output resource IDs" -n19: rectangle label:"Rollback failed resources" -n13.handle(right) -> n14.handle(left) -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n17.handle(left) -n17.handle(right) -> n18.handle(left) [label="Yes"] -n17.handle(bottom) -> n19.handle(top) [label="No"] -n18.handle(top) -> DevOps.n4.handle(bottom) [label="Complete"] -n19.handle(top) -> Terraform.n12.handle(bottom) [label="Retry"] -} +DevOps { # DevOps Engineer +n1: circle label:"Start" +n2: rectangle label:"Define infrastructure requirements" +n3: rectangle label:"Write Terraform configuration" +n4: rectangle label:"Review provisioned resources" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> Terraform.n6.handle(top) [label="Plan"] +n4.handle(right) -> n5.handle(left) +} +Terraform { # Terraform +n6: rectangle label:"Initialize providers" +n7: rectangle label:"Generate execution plan" +n8: diamond label:"Plan valid?" +n9: rectangle label:"Display planned changes" +n10: rectangle label:"Show validation errors" +n11: diamond label:"Approve changes?" +n12: rectangle label:"Apply configuration" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n10.handle(top) [label="No"] +n9.handle(right) -> n11.handle(left) +n10.handle(top) -> DevOps.n3.handle(bottom) [label="Fix config"] +n11.handle(right) -> n12.handle(left) [label="Yes"] +n11.handle(bottom) -> DevOps.n3.handle(bottom) [label="No"] +n12.handle(bottom) -> CloudProvider.n13.handle(top) [label="Provision"] +} +CloudProvider { # Cloud Provider +n13: rectangle label:"Create VPC and subnets" +n14: rectangle label:"Provision compute instances" +n15: rectangle label:"Configure load balancers" +n16: rectangle label:"Set up security groups" +n17: diamond label:"All resources healthy?" +n18: rectangle label:"Output resource IDs" +n19: rectangle label:"Rollback failed resources" +n13.handle(right) -> n14.handle(left) +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n17.handle(left) +n17.handle(right) -> n18.handle(left) [label="Yes"] +n17.handle(bottom) -> n19.handle(top) [label="No"] +n18.handle(top) -> DevOps.n4.handle(bottom) [label="Complete"] +n19.handle(top) -> Terraform.n12.handle(bottom) [label="Retry"] +} diff --git a/delivery/devops/load-testing-workflow/workflow.fz b/delivery/devops/load-testing-workflow/workflow.fz index f2ce9c1dbd91866d933f49037ceb4f205d99ee0c..282f399d4b097d38adadaa7854a2811c35400e56 100644 --- a/delivery/devops/load-testing-workflow/workflow.fz +++ b/delivery/devops/load-testing-workflow/workflow.fz @@ -1,45 +1,45 @@ -QAEngineer { # QA Engineer -n1: circle label:"Start" -n2: rectangle label:"Define load test scenarios" -n3: rectangle label:"Configure virtual users" -n4: rectangle label:"Review test results" -n5: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(bottom) -> LoadGenerator.n6.handle(top) [label="Execute"] -n4.handle(right) -> n5.handle(left) -} -LoadGenerator { # Load Generator -n6: rectangle label:"Spin up worker nodes" -n7: rectangle label:"Ramp up virtual users" -n8: rectangle label:"Execute test scripts" -n9: diamond label:"Target load reached?" -n10: rectangle label:"Maintain steady state" -n11: rectangle label:"Increase load gradually" -n12: rectangle label:"Ramp down users" -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) -n9.handle(right) -> n10.handle(left) [label="Yes"] -n9.handle(bottom) -> n11.handle(top) [label="No"] -n10.handle(right) -> n12.handle(left) -n11.handle(top) -> n8.handle(bottom) [label="Continue"] -n12.handle(bottom) -> Metrics.n13.handle(top) [label="Collect metrics"] -} -Metrics { # Metrics Collection -n13: rectangle label:"Aggregate response times" -n14: rectangle label:"Calculate percentiles" -n15: rectangle label:"Measure throughput" -n16: diamond label:"SLA met?" -n17: rectangle label:"Generate pass report" -n18: rectangle label:"Flag performance issues" -n19: rectangle label:"Create detailed report" -n13.handle(right) -> n14.handle(left) -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n17.handle(left) [label="Yes"] -n16.handle(bottom) -> n18.handle(top) [label="No"] -n17.handle(right) -> n19.handle(left) -n18.handle(right) -> n19.handle(top) -n19.handle(top) -> QAEngineer.n4.handle(bottom) [label="Results ready"] -} +QAEngineer { # QA Engineer +n1: circle label:"Start" +n2: rectangle label:"Define load test scenarios" +n3: rectangle label:"Configure virtual users" +n4: rectangle label:"Review test results" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> LoadGenerator.n6.handle(top) [label="Execute"] +n4.handle(right) -> n5.handle(left) +} +LoadGenerator { # Load Generator +n6: rectangle label:"Spin up worker nodes" +n7: rectangle label:"Ramp up virtual users" +n8: rectangle label:"Execute test scripts" +n9: diamond label:"Target load reached?" +n10: rectangle label:"Maintain steady state" +n11: rectangle label:"Increase load gradually" +n12: rectangle label:"Ramp down users" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) +n9.handle(right) -> n10.handle(left) [label="Yes"] +n9.handle(bottom) -> n11.handle(top) [label="No"] +n10.handle(right) -> n12.handle(left) +n11.handle(top) -> n8.handle(bottom) [label="Continue"] +n12.handle(bottom) -> Metrics.n13.handle(top) [label="Collect metrics"] +} +Metrics { # Metrics Collection +n13: rectangle label:"Aggregate response times" +n14: rectangle label:"Calculate percentiles" +n15: rectangle label:"Measure throughput" +n16: diamond label:"SLA met?" +n17: rectangle label:"Generate pass report" +n18: rectangle label:"Flag performance issues" +n19: rectangle label:"Create detailed report" +n13.handle(right) -> n14.handle(left) +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n17.handle(left) [label="Yes"] +n16.handle(bottom) -> n18.handle(top) [label="No"] +n17.handle(right) -> n19.handle(left) +n18.handle(right) -> n19.handle(top) +n19.handle(top) -> QAEngineer.n4.handle(bottom) [label="Results ready"] +} diff --git a/delivery/patterns/blue-green-deploy-workflow/README.md b/delivery/patterns/blue-green-deploy-workflow/README.md index 77c0f245b04000c9db4ecf08e430fff257e2f805..6a3d0caca8cb58d725483178a0da92e4aad0ea94 100644 --- a/delivery/patterns/blue-green-deploy-workflow/README.md +++ b/delivery/patterns/blue-green-deploy-workflow/README.md @@ -6,7 +6,7 @@ Blue-green deployment pattern with parallel environment setup, smoke testing, lo **Kind:** workflow **Source domain:** patterns **Primary use case:** delivery -**Secondary use cases:** None +**Secondary use cases:** patterns **Complexity:** 4/5 **Nodes:** 13 **Lanes:** 4 diff --git a/delivery/patterns/blue-green-deploy-workflow/metadata.json b/delivery/patterns/blue-green-deploy-workflow/metadata.json index 787d2bb87f5d7caecc083ed043d987e69f65f726..6038bd32d97b9b04373255776b3de58d4594c541 100644 --- a/delivery/patterns/blue-green-deploy-workflow/metadata.json +++ b/delivery/patterns/blue-green-deploy-workflow/metadata.json @@ -5,9 +5,12 @@ "kind": "workflow", "source_domain": "patterns", "primary_use_case": "delivery", - "secondary_use_cases": [], + "secondary_use_cases": [ + "patterns" + ], "use_cases": [ - "delivery" + "delivery", + "patterns" ], "complexity": 4, "num_nodes": 13, diff --git a/delivery/patterns/blue-green-deploy-workflow/workflow.fz b/delivery/patterns/blue-green-deploy-workflow/workflow.fz index 44c2696442a022bfcf6156380e11c423fc0e1dba..82b83f09b970208d9b4679e38953b826111ec848 100644 --- a/delivery/patterns/blue-green-deploy-workflow/workflow.fz +++ b/delivery/patterns/blue-green-deploy-workflow/workflow.fz @@ -1,48 +1,48 @@ -CI { # CI Pipeline -n1: circle label:"Start" -n2: rectangle label:"Build new version" -n3: rectangle label:"Run automated tests" -n4: rectangle label:"Verify deployment success" -n5: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(right) -> n3.handle(left) -n3.handle(bottom) -> BlueGreen.n6.handle(top) [label="Deploy"] -n4.handle(right) -> n5.handle(left) -} -BlueGreen { # Blue-Green Controller -n6: rectangle label:"Identify current environment" -n7: diamond label:"Current active?" -n8: rectangle label:"Deploy to Green" -n9: rectangle label:"Deploy to Blue" -n10: rectangle label:"Run smoke tests" -n11: diamond label:"Tests passed?" -n12: rectangle label:"Switch load balancer" -n13: rectangle label:"Rollback deployment" -n6.handle(right) -> n7.handle(left) -n7.handle(right) -> n8.handle(left) [label="Blue"] -n7.handle(bottom) -> n9.handle(top) [label="Green"] -n8.handle(right) -> n10.handle(left) -n9.handle(right) -> n10.handle(top) -n10.handle(right) -> n11.handle(left) -n11.handle(right) -> n12.handle(left) [label="Yes"] -n11.handle(bottom) -> n13.handle(top) [label="No"] -n12.handle(bottom) -> LoadBalancer.n14.handle(top) [label="Switch"] -n13.handle(top) -> CI.n4.handle(bottom) [label="Failed"] -} -LoadBalancer { # Load Balancer -n14: rectangle label:"Update target group" -n15: rectangle label:"Drain old connections" -n16: rectangle label:"Route traffic to new env" -n17: rectangle label:"Monitor error rates" -n18: diamond label:"Stable?" -n19: rectangle label:"Mark deployment complete" -n20: rectangle label:"Revert to old environment" -n14.handle(right) -> n15.handle(left) -n15.handle(right) -> n16.handle(left) -n16.handle(right) -> n17.handle(left) -n17.handle(right) -> n18.handle(left) -n18.handle(right) -> n19.handle(left) [label="Yes"] -n18.handle(bottom) -> n20.handle(top) [label="No"] -n19.handle(top) -> CI.n4.handle(bottom) [label="Success"] -n20.handle(top) -> CI.n4.handle(bottom) [label="Rolled back"] -} +CI { # CI Pipeline +n1: circle label:"Start" +n2: rectangle label:"Build new version" +n3: rectangle label:"Run automated tests" +n4: rectangle label:"Verify deployment success" +n5: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> BlueGreen.n6.handle(top) [label="Deploy"] +n4.handle(right) -> n5.handle(left) +} +BlueGreen { # Blue-Green Controller +n6: rectangle label:"Identify current environment" +n7: diamond label:"Current active?" +n8: rectangle label:"Deploy to Green" +n9: rectangle label:"Deploy to Blue" +n10: rectangle label:"Run smoke tests" +n11: diamond label:"Tests passed?" +n12: rectangle label:"Switch load balancer" +n13: rectangle label:"Rollback deployment" +n6.handle(right) -> n7.handle(left) +n7.handle(right) -> n8.handle(left) [label="Blue"] +n7.handle(bottom) -> n9.handle(top) [label="Green"] +n8.handle(right) -> n10.handle(left) +n9.handle(right) -> n10.handle(top) +n10.handle(right) -> n11.handle(left) +n11.handle(right) -> n12.handle(left) [label="Yes"] +n11.handle(bottom) -> n13.handle(top) [label="No"] +n12.handle(bottom) -> LoadBalancer.n14.handle(top) [label="Switch"] +n13.handle(top) -> CI.n4.handle(bottom) [label="Failed"] +} +LoadBalancer { # Load Balancer +n14: rectangle label:"Update target group" +n15: rectangle label:"Drain old connections" +n16: rectangle label:"Route traffic to new env" +n17: rectangle label:"Monitor error rates" +n18: diamond label:"Stable?" +n19: rectangle label:"Mark deployment complete" +n20: rectangle label:"Revert to old environment" +n14.handle(right) -> n15.handle(left) +n15.handle(right) -> n16.handle(left) +n16.handle(right) -> n17.handle(left) +n17.handle(right) -> n18.handle(left) +n18.handle(right) -> n19.handle(left) [label="Yes"] +n18.handle(bottom) -> n20.handle(top) [label="No"] +n19.handle(top) -> CI.n4.handle(bottom) [label="Success"] +n20.handle(top) -> CI.n4.handle(bottom) [label="Rolled back"] +} diff --git a/delivery/patterns/saga-pattern-workflow/README.md b/delivery/patterns/saga-pattern-workflow/README.md index 7b063524ed831abf7acc510ebb4d9f6129cd5927..e084ebb455f02d1f81f1f5282183bdfef53cdff6 100644 --- a/delivery/patterns/saga-pattern-workflow/README.md +++ b/delivery/patterns/saga-pattern-workflow/README.md @@ -6,7 +6,7 @@ Saga orchestration pattern for distributed transactions across Order, Payment, a **Kind:** workflow **Source domain:** patterns **Primary use case:** delivery -**Secondary use cases:** ai-orchestration +**Secondary use cases:** ai-orchestration, architecture, patterns **Complexity:** 5/5 **Nodes:** 20 **Lanes:** 4 diff --git a/delivery/patterns/saga-pattern-workflow/metadata.json b/delivery/patterns/saga-pattern-workflow/metadata.json index 1c954d1a24bf6a4b21396b17f00dbd2ddba1189c..d545cea34f2d7b7da497c0dc9fa32d81f9466f3c 100644 --- a/delivery/patterns/saga-pattern-workflow/metadata.json +++ b/delivery/patterns/saga-pattern-workflow/metadata.json @@ -6,11 +6,15 @@ "source_domain": "patterns", "primary_use_case": "delivery", "secondary_use_cases": [ - "ai-orchestration" + "ai-orchestration", + "architecture", + "patterns" ], "use_cases": [ "delivery", - "ai-orchestration" + "ai-orchestration", + "architecture", + "patterns" ], "complexity": 5, "num_nodes": 20, diff --git a/delivery/patterns/saga-pattern-workflow/workflow.fz b/delivery/patterns/saga-pattern-workflow/workflow.fz index 4db2e0e6fe35c611786d5a04aa526f23a773f9d9..064d5e5ca4acc355854c276a347a4d5d1d597942 100644 --- a/delivery/patterns/saga-pattern-workflow/workflow.fz +++ b/delivery/patterns/saga-pattern-workflow/workflow.fz @@ -1,50 +1,50 @@ -Orchestrator { # Saga Orchestrator -n1: circle label:"Start" -n2: rectangle label:"Begin distributed transaction" -n3: rectangle label:"Coordinate saga steps" -n4: rectangle label:"Commit saga" -n5: rectangle label:"Trigger compensations" -n6: circle label:"End" -n1.handle(right) -> n2.handle(left) -n2.handle(bottom) -> OrderService.n7.handle(top) [label="Step 1"] -n3.handle(bottom) -> PaymentService.n11.handle(top) [label="Step 2"] -n4.handle(right) -> n6.handle(left) -n5.handle(bottom) -> PaymentService.n15.handle(top) [label="Rollback"] -} -OrderService { # Order Service -n7: rectangle label:"Create order record" -n8: diamond label:"Order created?" -n9: rectangle label:"Reserve inventory" -n10: rectangle label:"Cancel order" -n7.handle(right) -> n8.handle(left) -n8.handle(right) -> n9.handle(left) [label="Yes"] -n8.handle(bottom) -> n10.handle(top) [label="No"] -n9.handle(top) -> Orchestrator.n3.handle(bottom) [label="Success"] -n10.handle(top) -> Orchestrator.n5.handle(bottom) [label="Failed"] -} -PaymentService { # Payment Service -n11: rectangle label:"Process payment" -n12: diamond label:"Payment successful?" -n13: rectangle label:"Confirm transaction" -n14: rectangle label:"Report payment failure" -n15: rectangle label:"Refund payment" -n16: rectangle label:"Release inventory" -n11.handle(right) -> n12.handle(left) -n12.handle(right) -> n13.handle(left) [label="Yes"] -n12.handle(bottom) -> n14.handle(top) [label="No"] -n13.handle(bottom) -> ShippingService.n17.handle(top) [label="Step 3"] -n14.handle(top) -> Orchestrator.n5.handle(bottom) [label="Compensate"] -n15.handle(right) -> n16.handle(left) -n16.handle(top) -> OrderService.n10.handle(bottom) [label="Undo order"] -} -ShippingService { # Shipping Service -n17: rectangle label:"Schedule shipment" -n18: diamond label:"Shipment scheduled?" -n19: rectangle label:"Generate tracking number" -n20: rectangle label:"Report shipping failure" -n17.handle(right) -> n18.handle(left) -n18.handle(right) -> n19.handle(left) [label="Yes"] -n18.handle(bottom) -> n20.handle(top) [label="No"] -n19.handle(top) -> Orchestrator.n4.handle(bottom) [label="Complete"] -n20.handle(top) -> Orchestrator.n5.handle(bottom) [label="Compensate"] -} +Orchestrator { # Saga Orchestrator +n1: circle label:"Start" +n2: rectangle label:"Begin distributed transaction" +n3: rectangle label:"Coordinate saga steps" +n4: rectangle label:"Commit saga" +n5: rectangle label:"Trigger compensations" +n6: circle label:"End" +n1.handle(right) -> n2.handle(left) +n2.handle(bottom) -> OrderService.n7.handle(top) [label="Step 1"] +n3.handle(bottom) -> PaymentService.n11.handle(top) [label="Step 2"] +n4.handle(right) -> n6.handle(left) +n5.handle(bottom) -> PaymentService.n15.handle(top) [label="Rollback"] +} +OrderService { # Order Service +n7: rectangle label:"Create order record" +n8: diamond label:"Order created?" +n9: rectangle label:"Reserve inventory" +n10: rectangle label:"Cancel order" +n7.handle(right) -> n8.handle(left) +n8.handle(right) -> n9.handle(left) [label="Yes"] +n8.handle(bottom) -> n10.handle(top) [label="No"] +n9.handle(top) -> Orchestrator.n3.handle(bottom) [label="Success"] +n10.handle(top) -> Orchestrator.n5.handle(bottom) [label="Failed"] +} +PaymentService { # Payment Service +n11: rectangle label:"Process payment" +n12: diamond label:"Payment successful?" +n13: rectangle label:"Confirm transaction" +n14: rectangle label:"Report payment failure" +n15: rectangle label:"Refund payment" +n16: rectangle label:"Release inventory" +n11.handle(right) -> n12.handle(left) +n12.handle(right) -> n13.handle(left) [label="Yes"] +n12.handle(bottom) -> n14.handle(top) [label="No"] +n13.handle(bottom) -> ShippingService.n17.handle(top) [label="Step 3"] +n14.handle(top) -> Orchestrator.n5.handle(bottom) [label="Compensate"] +n15.handle(right) -> n16.handle(left) +n16.handle(top) -> OrderService.n10.handle(bottom) [label="Undo order"] +} +ShippingService { # Shipping Service +n17: rectangle label:"Schedule shipment" +n18: diamond label:"Shipment scheduled?" +n19: rectangle label:"Generate tracking number" +n20: rectangle label:"Report shipping failure" +n17.handle(right) -> n18.handle(left) +n18.handle(right) -> n19.handle(left) [label="Yes"] +n18.handle(bottom) -> n20.handle(top) [label="No"] +n19.handle(top) -> Orchestrator.n4.handle(bottom) [label="Complete"] +n20.handle(top) -> Orchestrator.n5.handle(bottom) [label="Compensate"] +} diff --git a/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/README.md b/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/README.md new file mode 100644 index 0000000000000000000000000000000000000000..41ce84726e5ca1daaf47326e6f355450e9e6a805 --- /dev/null +++ b/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/README.md @@ -0,0 +1,19 @@ +# Cross-Cloud Failover Deployment Pipeline + +CI builds the container, pushes it to a cross-cloud registry, deploys to AWS, GCP and metal, health-checks every endpoint and updates mesh routing only when all are healthy. + +**Template ID:** `cross-cloud-failover-deployment-pipeline` +**Kind:** workflow +**Source domain:** Platform Reliability +**Primary use case:** delivery +**Secondary use cases:** platform-reliability +**Complexity:** 2/5 +**Nodes:** 11 +**Lanes:** 5 +**Tags:** [multi-cloud, deployment, failover, ci-cd, health-check] +**Source path:** `` +**Repo path:** `delivery/platform-reliability/cross-cloud-failover-deployment-pipeline` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/metadata.json b/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..f0026f7d365c784cbe48ffeb908ad134693ef2c8 --- /dev/null +++ b/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "cross-cloud-failover-deployment-pipeline", + "workflow_id": "cross-cloud-failover-deployment-pipeline", + "title": "Cross-Cloud Failover Deployment Pipeline", + "kind": "workflow", + "source_domain": "Platform Reliability", + "primary_use_case": "delivery", + "secondary_use_cases": [ + "platform-reliability" + ], + "use_cases": [ + "delivery", + "platform-reliability" + ], + "complexity": 2, + "num_nodes": 11, + "num_lanes": 5, + "tags": [ + "multi-cloud", + "deployment", + "failover", + "ci-cd", + "health-check" + ], + "description": "CI builds the container, pushes it to a cross-cloud registry, deploys to AWS, GCP and metal, health-checks every endpoint and updates mesh routing only when all are healthy.", + "source_path": "", + "repo_path": "delivery/platform-reliability/cross-cloud-failover-deployment-pipeline" +} diff --git a/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/workflow.fz b/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..a6286f79820bc299efb1606360f07fe33e650410 --- /dev/null +++ b/delivery/platform-reliability/cross-cloud-failover-deployment-pipeline/workflow.fz @@ -0,0 +1,38 @@ +pipeline { # Cross-Cloud Failover Deployment +n1: circle label:"Push to Git" +n2: rectangle label:"CI builds container" +n3: rectangle label:"Push image to cross-cloud registry" +n4: rectangle label:"Health check all endpoints" +n5: diamond label:"All healthy?" +n6: rectangle label:"Update mesh routing table" +n7: circle label:"Live — Multi-Cloud Active" +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> n3.handle(left) +n3.handle(bottom) -> aws.n9.handle(top) +n3.handle(bottom) -> gcp.n10.handle(top) +n3.handle(bottom) -> metal.n11.handle(top) +aws.n9.handle(bottom) -> n4.handle(top) +gcp.n10.handle(bottom) -> n4.handle(top) +metal.n11.handle(bottom) -> n4.handle(top) +n4.handle(right) -> n5.handle(left) +n5.handle(right) -> n6.handle(left) [label="Yes"] +n5.handle(bottom) -> rollback.n8.handle(top) [label="No"] +n6.handle(right) -> n7.handle(left) +} + +aws { # AWS +n9: rectangle label:"Deploy to AWS (primary)" +} + +gcp { # GCP +n10: rectangle label:"Deploy to GCP (secondary)" +} + +metal { # Metal +n11: rectangle label:"Deploy to Metal (tertiary)" +} + +rollback { # Rollback +n8: rectangle label:"Alert + rollback failed cloud" +n8.handle(right) -> pipeline.n4.handle(bottom) [label="retry"] +} diff --git a/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/README.md b/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7b7d8f1fb248494e61ade0b41c564f38becfcba2 --- /dev/null +++ b/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/README.md @@ -0,0 +1,19 @@ +# AI-Assisted E-Commerce Onboarding Workflow + +Vibe-coding example: a cart lane and an AI lane, where the assistant analyses the shopper profile, asks for missing details and adds the suggested products to the cart. + +**Template ID:** `ai-assisted-ecommerce-onboarding-workflow` +**Kind:** workflow +**Source domain:** Diagram Authoring +**Primary use case:** diagram-authoring +**Secondary use cases:** onboarding, security, commerce-automation +**Complexity:** 2/5 +**Nodes:** 10 +**Lanes:** 2 +**Tags:** [flowzap-code, vibe-coding, ecommerce, ai-assistant, cart] +**Source path:** `` +**Repo path:** `diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/metadata.json b/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..65472120916bb6752e7ff990f70c451a92303d5a --- /dev/null +++ b/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/metadata.json @@ -0,0 +1,32 @@ +{ + "template_id": "ai-assisted-ecommerce-onboarding-workflow", + "workflow_id": "ai-assisted-ecommerce-onboarding", + "title": "AI-Assisted E-Commerce Onboarding Workflow", + "kind": "workflow", + "source_domain": "Diagram Authoring", + "primary_use_case": "diagram-authoring", + "secondary_use_cases": [ + "onboarding", + "security", + "commerce-automation" + ], + "use_cases": [ + "diagram-authoring", + "onboarding", + "security", + "commerce-automation" + ], + "complexity": 2, + "num_nodes": 10, + "num_lanes": 2, + "tags": [ + "flowzap-code", + "vibe-coding", + "ecommerce", + "ai-assistant", + "cart" + ], + "description": "Vibe-coding example: a cart lane and an AI lane, where the assistant analyses the shopper profile, asks for missing details and adds the suggested products to the cart.", + "source_path": "", + "repo_path": "diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow" +} diff --git a/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/workflow.fz b/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..a0e0de5d56041cfab450949e15b171070fb4f38a --- /dev/null +++ b/diagram-authoring/diagram-authoring/ai-assisted-ecommerce-onboarding-workflow/workflow.fz @@ -0,0 +1,33 @@ +User { # User +n1: circle label:"Start" +n2: rectangle label:"Sign up with email & interests" +n3: diamond label:"Vibe confirmed?" +n4: rectangle label:"Ask for more details" +n5: rectangle label:"Show default product list" +n6: circle label:"End" + +n1.handle(right) -> n2.handle(left) +n2.handle(right) -> AI Recommender.n7.handle(left) [label="Submit details"] +AI Recommender.n7.handle(right) -> n3.handle(left) [label="Suggestions ready"] +n3.handle(right) -> AI Recommender.n8.handle(left) [label="Yes"] +n3.handle(bottom) -> n4.handle(top) [label="No"] +n4.handle(right) -> AI Recommender.n7.handle(left) [label="Refine"] +n4.handle(bottom) -> n5.handle(top) [label="Max retries: 2"] +n5.handle(right) -> Cart.n9.handle(left) [label="Proceed with defaults"] +} + +AI Recommender { # AI Recommender +n7: rectangle label:"Analyze profile & suggest 3 products" +n8: rectangle label:"Prepare cart data" + +n8.handle(right) -> Cart.n9.handle(left) [label="Add to cart"] +loop [retry up to 2 times] n7 n3 n4 +} + +Cart { # Cart +n9: rectangle label:"Auto-add products to cart" +n10: rectangle label:"Send welcome email" + +n9.handle(right) -> n10.handle(left) [label="Email"] +n10.handle(right) -> User.n6.handle(left) [label="Complete"] +} diff --git a/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/README.md b/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/README.md new file mode 100644 index 0000000000000000000000000000000000000000..aa45625a6a1cf5e7cb9780ec39d71abd00960e2a --- /dev/null +++ b/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/README.md @@ -0,0 +1,19 @@ +# FZ File Sequence Diagram Example + +The reference example from the .fz file announcement: a text-first sequence diagram with two lanes, four nodes and one labeled message, stored as a portable .fz file. + +**Template ID:** `fz-file-sequence-diagram-example` +**Kind:** workflow +**Source domain:** Diagram Authoring +**Primary use case:** diagram-authoring +**Secondary use cases:** security +**Complexity:** 1/5 +**Nodes:** 4 +**Lanes:** 2 +**Tags:** [flowzap-code, fz-file, diagrams-as-code, sequence-diagram] +**Source path:** `` +**Repo path:** `diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/metadata.json b/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..8850509f988d80af5556556bb361596a6949a163 --- /dev/null +++ b/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/metadata.json @@ -0,0 +1,27 @@ +{ + "template_id": "fz-file-sequence-diagram-example", + "workflow_id": "fz-file-sequence-diagram-example", + "title": "FZ File Sequence Diagram Example", + "kind": "workflow", + "source_domain": "Diagram Authoring", + "primary_use_case": "diagram-authoring", + "secondary_use_cases": [ + "security" + ], + "use_cases": [ + "diagram-authoring", + "security" + ], + "complexity": 1, + "num_nodes": 4, + "num_lanes": 2, + "tags": [ + "flowzap-code", + "fz-file", + "diagrams-as-code", + "sequence-diagram" + ], + "description": "The reference example from the .fz file announcement: a text-first sequence diagram with two lanes, four nodes and one labeled message, stored as a portable .fz file.", + "source_path": "", + "repo_path": "diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example" +} diff --git a/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/workflow.fz b/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..1bdb5d6e7875854eeabb0bd436643c6a665e9b40 --- /dev/null +++ b/diagram-authoring/diagram-authoring/fz-file-sequence-diagram-example/workflow.fz @@ -0,0 +1,12 @@ +user { # User + n1: circle label:"Start" + n2: rectangle label:"Submit" + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> app.n3.handle(top) [label="Send"] +} + +app { # App + n3: rectangle label:"Process" + n4: circle label:"Done" + n3.handle(right) -> n4.handle(left) +} diff --git a/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/README.md b/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/README.md new file mode 100644 index 0000000000000000000000000000000000000000..66b20e411c0dbc13f0051821cd5e706454c21083 --- /dev/null +++ b/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/README.md @@ -0,0 +1,19 @@ +# MCP Server Order Fulfillment Example + +Compact order fulfillment diagram generated through the FlowZap MCP server, written with the shorthand syntax: sales validation with a validity gate, then fulfillment processing and shipping. + +**Template ID:** `mcp-server-order-fulfillment-example` +**Kind:** workflow +**Source domain:** Diagram Authoring +**Primary use case:** diagram-authoring +**Secondary use cases:** security, mcp +**Complexity:** 2/5 +**Nodes:** 6 +**Lanes:** 2 +**Tags:** [mcp, flowzap-code, shorthand-syntax, order-fulfillment] +**Source path:** `` +**Repo path:** `diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/metadata.json b/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..cb5621cc51cda603b229ae072fe59685676cf50e --- /dev/null +++ b/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/metadata.json @@ -0,0 +1,29 @@ +{ + "template_id": "mcp-server-order-fulfillment-example", + "workflow_id": "mcp-server-order-fulfillment-example", + "title": "MCP Server Order Fulfillment Example", + "kind": "workflow", + "source_domain": "Diagram Authoring", + "primary_use_case": "diagram-authoring", + "secondary_use_cases": [ + "security", + "mcp" + ], + "use_cases": [ + "diagram-authoring", + "security", + "mcp" + ], + "complexity": 2, + "num_nodes": 6, + "num_lanes": 2, + "tags": [ + "mcp", + "flowzap-code", + "shorthand-syntax", + "order-fulfillment" + ], + "description": "Compact order fulfillment diagram generated through the FlowZap MCP server, written with the shorthand syntax: sales validation with a validity gate, then fulfillment processing and shipping.", + "source_path": "", + "repo_path": "diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example" +} diff --git a/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/workflow.fz b/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..b568db9172fd9f244ed640e9088128a79ae2554f --- /dev/null +++ b/diagram-authoring/diagram-authoring/mcp-server-order-fulfillment-example/workflow.fz @@ -0,0 +1,16 @@ +sales { # Sales Team + n1: circle label:"Order Received" + n2: rectangle label:"Validate Order" + n3: diamond label:"Valid?" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n3.handle(left) + n3.handle(right) -> fulfillment.n4.handle(left) [label="Yes"] +} + +fulfillment { # Fulfillment + n4: rectangle label:"Process Order" + n5: rectangle label:"Ship Items" + n6: circle label:"Complete" + n4.handle(right) -> n5.handle(left) + n5.handle(right) -> n6.handle(left) +} diff --git a/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/README.md b/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4a698106976b1e3860560b981ee96ee56caae2bf --- /dev/null +++ b/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/README.md @@ -0,0 +1,19 @@ +# n8n JSON Workflow as FlowZap Code + +An n8n automation rendered as FlowZap Code: manual trigger, spreadsheet read, batch iteration, AI field mapping, PDF generation, email send, with success and error logging branches. + +**Template ID:** `n8n-json-workflow-as-flowzap-code` +**Kind:** workflow +**Source domain:** Diagram Authoring +**Primary use case:** diagram-authoring +**Secondary use cases:** security +**Complexity:** 2/5 +**Nodes:** 11 +**Lanes:** 1 +**Tags:** [n8n, flowzap-code, automation, json, conversion] +**Source path:** `` +**Repo path:** `diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/metadata.json b/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..c0df77095ecc2a572b9b24607a87ada0c12c8f09 --- /dev/null +++ b/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/metadata.json @@ -0,0 +1,28 @@ +{ + "template_id": "n8n-json-workflow-as-flowzap-code", + "workflow_id": "n8n-json-workflow-as-flowzap-code", + "title": "n8n JSON Workflow as FlowZap Code", + "kind": "workflow", + "source_domain": "Diagram Authoring", + "primary_use_case": "diagram-authoring", + "secondary_use_cases": [ + "security" + ], + "use_cases": [ + "diagram-authoring", + "security" + ], + "complexity": 2, + "num_nodes": 11, + "num_lanes": 1, + "tags": [ + "n8n", + "flowzap-code", + "automation", + "json", + "conversion" + ], + "description": "An n8n automation rendered as FlowZap Code: manual trigger, spreadsheet read, batch iteration, AI field mapping, PDF generation, email send, with success and error logging branches.", + "source_path": "", + "repo_path": "diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code" +} diff --git a/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/workflow.fz b/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..66e3341971820251545ac14a1124e78e23da1bbe --- /dev/null +++ b/diagram-authoring/diagram-authoring/n8n-json-workflow-as-flowzap-code/workflow.fz @@ -0,0 +1,25 @@ +N8n { # N8n + n2: circle label:"Manual Trigger" + n3: rectangle label:"Spreadsheet File: Read Rows" + n4: rectangle label:"Split In Batches: Iterate Items" + n5: rectangle label:"Set: Map Fields" + n6: rectangle label:"HTTP Request: Generate PDF" + n1: diamond label:"IF" + n7: rectangle label:"Gmail: Send Email" + n8: diamond label:"IF" + n9: rectangle label:"Set: Log Success" + n10: circle label:"Set: End" + n11: rectangle label:"Set: Log Error" + n2.handle(right) -> n3.handle(left) + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) + n5.handle(right) -> n6.handle(left) + n6.handle(right) -> n1.handle(left) + n1.handle(right) -> n7.handle(left) [label="Yes"] + n7.handle(right) -> n8.handle(left) + n8.handle(right) -> n9.handle(left) [label="Yes"] + n8.handle(bottom) -> n11.handle(bottom) [label="No"] + n9.handle(right) -> n10.handle(left) + n1.handle(top) -> n11.handle(top) [label="No"] + n11.handle(left) -> n10.handle(right) +} diff --git a/edge-cases/edge-cases/bidirectional-loop-workflow/README.md b/edge-cases/edge-cases/bidirectional-loop-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..51860905de21da192c49477ab4f0f7848660150a --- /dev/null +++ b/edge-cases/edge-cases/bidirectional-loop-workflow/README.md @@ -0,0 +1,19 @@ +# Bidirectional Loop Workflow + +This workflow models circular references between nodes in both directions. + +**Template ID:** `bidirectional-loop-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 5/5 +**Nodes:** 16 +**Lanes:** 4 +**Tags:** [bidirectional, loop, decision] +**Source path:** `edge-cases/bidirectional-loop` +**Repo path:** `edge-cases/edge-cases/bidirectional-loop-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/bidirectional-loop-workflow/metadata.json b/edge-cases/edge-cases/bidirectional-loop-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..b4ad8284e18621435d54d8286ead8f6f9c0eeafd --- /dev/null +++ b/edge-cases/edge-cases/bidirectional-loop-workflow/metadata.json @@ -0,0 +1,23 @@ +{ + "template_id": "bidirectional-loop-workflow", + "workflow_id": "bidirectional-loop", + "title": "Bidirectional Loop Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 5, + "num_nodes": 16, + "num_lanes": 4, + "tags": [ + "bidirectional", + "loop", + "decision" + ], + "description": "This workflow models circular references between nodes in both directions.", + "source_path": "edge-cases/bidirectional-loop", + "repo_path": "edge-cases/edge-cases/bidirectional-loop-workflow" +} diff --git a/edge-cases/edge-cases/bidirectional-loop-workflow/workflow.fz b/edge-cases/edge-cases/bidirectional-loop-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..7dbb773c939ad2076647a62a4f8404f5f0e07354 --- /dev/null +++ b/edge-cases/edge-cases/bidirectional-loop-workflow/workflow.fz @@ -0,0 +1,46 @@ +laneA { # Lanea + n1: circle label:"Start Bidirectional Loop" + n2: diamond label:"Bidirectional Loop step 2" + n5: rectangle label:"Bidirectional Loop step 5" + n9: rectangle label:"Bidirectional Loop step 9" + n13: rectangle label:"Bidirectional Loop step 13" + n1.handle(right) -> n2.handle(left) + n2.handle(bottom) -> laneC.n3.handle(top) [label="Yes/Approved"] + n2.handle(bottom) -> laneD.n4.handle(top) [label="No/Rejected"] + n5.handle(bottom) -> laneB.n6.handle(top) + n9.handle(bottom) -> laneB.n10.handle(top) + n13.handle(bottom) -> laneB.n14.handle(top) + n2.handle(right) -> laneC.n3.handle(left) [label="Forward"] + loop [retry until success] n2 n5 n9 n13 n6 n10 n14 n3 n7 n11 n15 n4 n8 n12 +} + +laneB { # Laneb + n6: rectangle label:"Bidirectional Loop step 6" + n10: rectangle label:"Bidirectional Loop step 10" + n14: rectangle label:"Bidirectional Loop step 14" + n6.handle(bottom) -> laneC.n7.handle(top) + n10.handle(bottom) -> laneC.n11.handle(top) + n14.handle(bottom) -> laneC.n15.handle(top) +} + +laneC { # Lanec + n3: rectangle label:"Bidirectional Loop step 3" + n7: rectangle label:"Bidirectional Loop step 7" + n11: rectangle label:"Bidirectional Loop step 11" + n15: rectangle label:"Bidirectional Loop step 15" + n7.handle(bottom) -> laneD.n8.handle(top) + n11.handle(bottom) -> laneD.n12.handle(top) + n15.handle(bottom) -> laneD.n16.handle(top) + n3.handle(left) -> laneA.n2.handle(right) [label="Back"] + n3.handle(right) -> laneA.n5.handle(left) +} + +laneD { # Laned + n4: rectangle label:"Bidirectional Loop step 4" + n8: rectangle label:"Bidirectional Loop step 8" + n12: rectangle label:"Bidirectional Loop step 12" + n16: circle label:"End Bidirectional Loop" + n12.handle(right) -> laneA.n13.handle(left) + n8.handle(right) -> laneA.n9.handle(left) + n4.handle(right) -> laneA.n5.handle(left) +} diff --git a/edge-cases/edge-cases/comment-like-labels-workflow/README.md b/edge-cases/edge-cases/comment-like-labels-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d56a3ae90561d9d83add3ea8b8502437d41e396b --- /dev/null +++ b/edge-cases/edge-cases/comment-like-labels-workflow/README.md @@ -0,0 +1,19 @@ +# Comment Like Labels Workflow + +This workflow models labels that look like code comments. + +**Template ID:** `comment-like-labels-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 1/5 +**Nodes:** 5 +**Lanes:** 1 +**Tags:** [comment, like, labels] +**Source path:** `edge-cases/comment-like-labels` +**Repo path:** `edge-cases/edge-cases/comment-like-labels-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/comment-like-labels-workflow/metadata.json b/edge-cases/edge-cases/comment-like-labels-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..25e13aa77d2f80813f4ef9959c0dbff2dde3fb15 --- /dev/null +++ b/edge-cases/edge-cases/comment-like-labels-workflow/metadata.json @@ -0,0 +1,23 @@ +{ + "template_id": "comment-like-labels-workflow", + "workflow_id": "comment-like-labels", + "title": "Comment Like Labels Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 1, + "num_nodes": 5, + "num_lanes": 1, + "tags": [ + "comment", + "like", + "labels" + ], + "description": "This workflow models labels that look like code comments.", + "source_path": "edge-cases/comment-like-labels", + "repo_path": "edge-cases/edge-cases/comment-like-labels-workflow" +} diff --git a/edge-cases/edge-cases/comment-like-labels-workflow/workflow.fz b/edge-cases/edge-cases/comment-like-labels-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..2044d5504a77c776ef514b96ef589b1b6e868846 --- /dev/null +++ b/edge-cases/edge-cases/comment-like-labels-workflow/workflow.fz @@ -0,0 +1,12 @@ +laneA { # Lanea + n1: circle label:"Start Comment Like Labels" + n2: rectangle label:"// looks like a comment" + n3: rectangle label:"# also looks like a comment" + n4: rectangle label:"Comment Like Labels step 4" + n5: circle label:"End Comment Like Labels" + + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n3.handle(left) [label="Next"] + n3.handle(right) -> n4.handle(left) + n4.handle(right) -> n5.handle(left) +} \ No newline at end of file diff --git a/edge-cases/edge-cases/cross-lane-circular-workflow/README.md b/edge-cases/edge-cases/cross-lane-circular-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..79d42d3debc6a3ecb7d7ab18cb774812b9310880 --- /dev/null +++ b/edge-cases/edge-cases/cross-lane-circular-workflow/README.md @@ -0,0 +1,19 @@ +# Cross Lane Circular Workflow + +This workflow models arrows that loop across lanes. + +**Template ID:** `cross-lane-circular-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 4/5 +**Nodes:** 13 +**Lanes:** 4 +**Tags:** [cross, lane, circular] +**Source path:** `edge-cases/cross-lane-circular` +**Repo path:** `edge-cases/edge-cases/cross-lane-circular-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/cross-lane-circular-workflow/metadata.json b/edge-cases/edge-cases/cross-lane-circular-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..54f1eca2bb1a8cc11f55bede958ffe62c6e17f79 --- /dev/null +++ b/edge-cases/edge-cases/cross-lane-circular-workflow/metadata.json @@ -0,0 +1,23 @@ +{ + "template_id": "cross-lane-circular-workflow", + "workflow_id": "cross-lane-circular", + "title": "Cross Lane Circular Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 4, + "num_nodes": 13, + "num_lanes": 4, + "tags": [ + "cross", + "lane", + "circular" + ], + "description": "This workflow models arrows that loop across lanes.", + "source_path": "edge-cases/cross-lane-circular", + "repo_path": "edge-cases/edge-cases/cross-lane-circular-workflow" +} diff --git a/edge-cases/edge-cases/cross-lane-circular-workflow/workflow.fz b/edge-cases/edge-cases/cross-lane-circular-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..5057e4cbf5d8ee1ffaa75c32528d9ffdec4248bc --- /dev/null +++ b/edge-cases/edge-cases/cross-lane-circular-workflow/workflow.fz @@ -0,0 +1,38 @@ +laneA { # Lane A + n1: circle label:"Start Cross Lane Circular" + n5: rectangle label:"Cross Lane Circular step 5" + n9: rectangle label:"Cross Lane Circular step 9" + n13: circle label:"End Cross Lane Circular" + n1.handle(bottom) -> laneB.n2.handle(top) + n5.handle(bottom) -> laneB.n6.handle(top) [label="Done"] + n9.handle(bottom) -> laneB.n10.handle(top) +} + +laneB { # Lane B + n2: rectangle label:"Cross Lane Circular step 2" + n6: rectangle label:"Cross Lane Circular step 6" + n10: rectangle label:"Cross Lane Circular step 10" + n2.handle(bottom) -> laneC.n3.handle(top) [label="Next"] + n6.handle(bottom) -> laneC.n7.handle(top) + n10.handle(bottom) -> laneC.n11.handle(top) +} + +laneC { # Lane C + n3: rectangle label:"Cross Lane Circular step 3" + n7: rectangle label:"Cross Lane Circular step 7" + n11: rectangle label:"Cross Lane Circular step 11" + n3.handle(bottom) -> laneD.n4.handle(top) + n7.handle(bottom) -> laneD.n8.handle(top) + n11.handle(bottom) -> laneD.n12.handle(top) [label="Success"] +} + +laneD { # Lane D + n4: diamond label:"Cross Lane Circular step 4" + n8: rectangle label:"Cross Lane Circular step 8" + n12: diamond label:"Cross Lane Circular step 12" + n12.handle(left) -> laneC.n11.handle(left) [label="Retry/Rejected"] + n12.handle(right) -> laneA.n13.handle(bottom) + n8.handle(right) -> laneA.n9.handle(left) [label="Processed"] + n4.handle(right) -> laneA.n5.handle(left) + n4.handle(left) -> laneC.n3.handle(left) [label="Retry/Rejected"] +} diff --git a/edge-cases/edge-cases/deep-nesting-workflow/README.md b/edge-cases/edge-cases/deep-nesting-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8dd334ba9a5955c6c592fb82366b52cff26c6780 --- /dev/null +++ b/edge-cases/edge-cases/deep-nesting-workflow/README.md @@ -0,0 +1,19 @@ +# Deep Nesting Workflow + +This workflow models lanes that are conceptually nested within each other. + +**Template ID:** `deep-nesting-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 4/5 +**Nodes:** 13 +**Lanes:** 4 +**Tags:** [deep, nesting, parallel] +**Source path:** `edge-cases/deep-nesting` +**Repo path:** `edge-cases/edge-cases/deep-nesting-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/deep-nesting-workflow/metadata.json b/edge-cases/edge-cases/deep-nesting-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..95de7a6a2b3cfc73b06beb9edab20b8dc1719988 --- /dev/null +++ b/edge-cases/edge-cases/deep-nesting-workflow/metadata.json @@ -0,0 +1,23 @@ +{ + "template_id": "deep-nesting-workflow", + "workflow_id": "deep-nesting", + "title": "Deep Nesting Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 4, + "num_nodes": 13, + "num_lanes": 4, + "tags": [ + "deep", + "nesting", + "parallel" + ], + "description": "This workflow models lanes that are conceptually nested within each other.", + "source_path": "edge-cases/deep-nesting", + "repo_path": "edge-cases/edge-cases/deep-nesting-workflow" +} diff --git a/edge-cases/edge-cases/deep-nesting-workflow/workflow.fz b/edge-cases/edge-cases/deep-nesting-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..1ed203c450372be03cb8ef8482806c963985c33b --- /dev/null +++ b/edge-cases/edge-cases/deep-nesting-workflow/workflow.fz @@ -0,0 +1,46 @@ +laneA { # Lane A + n1: circle label:"Start Deep Nesting" + n5: rectangle label:"Deep Nesting step 5" + n9: rectangle label:"Deep Nesting step 9" + n13: circle label:"End Deep Nesting" + n1.handle(bottom) -> laneB.n2.handle(top) + n1.handle(bottom) -> laneC.n3.handle(top) + n1.handle(bottom) -> laneD.n4.handle(top) + n1.handle(right) -> n5.handle(left) + n1.handle(bottom) -> laneB.n6.handle(top) + n1.handle(bottom) -> laneC.n7.handle(top) + n1.handle(bottom) -> laneD.n8.handle(top) + n1.handle(right) -> n9.handle(left) + n1.handle(bottom) -> laneB.n10.handle(top) + n1.handle(bottom) -> laneC.n11.handle(top) + n1.handle(bottom) -> laneD.n12.handle(top) + n5.handle(right) -> n13.handle(left) + n9.handle(right) -> n13.handle(left) +} + +laneB { # Lane B + n2: rectangle label:"Deep Nesting step 2" + n6: diamond label:"Deep Nesting step 6" + n10: rectangle label:"Deep Nesting step 10" + n10.handle(right) -> laneA.n13.handle(bottom) + n6.handle(right) -> laneA.n13.handle(bottom) + n2.handle(right) -> laneA.n13.handle(bottom) +} + +laneC { # Lane C + n3: rectangle label:"Deep Nesting step 3" + n7: rectangle label:"Deep Nesting step 7" + n11: rectangle label:"Deep Nesting step 11" + n11.handle(right) -> laneA.n13.handle(bottom) + n7.handle(right) -> laneA.n13.handle(bottom) + n3.handle(right) -> laneA.n13.handle(bottom) +} + +laneD { # Lane D + n4: rectangle label:"Deep Nesting step 4" + n8: rectangle label:"Deep Nesting step 8" + n12: rectangle label:"Deep Nesting step 12" + n12.handle(right) -> laneA.n13.handle(bottom) + n8.handle(right) -> laneA.n13.handle(bottom) + n4.handle(right) -> laneA.n13.handle(bottom) +} diff --git a/edge-cases/edge-cases/disconnected-lanes-workflow/README.md b/edge-cases/edge-cases/disconnected-lanes-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..454613e5717f7db405e51d2eab381910e5ee2d72 --- /dev/null +++ b/edge-cases/edge-cases/disconnected-lanes-workflow/README.md @@ -0,0 +1,19 @@ +# Disconnected Lanes Workflow + +This workflow models lanes that never connect to each other. + +**Template ID:** `disconnected-lanes-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 2/5 +**Nodes:** 7 +**Lanes:** 2 +**Tags:** [disconnected, lanes, decision, loop] +**Source path:** `edge-cases/disconnected-lanes` +**Repo path:** `edge-cases/edge-cases/disconnected-lanes-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/disconnected-lanes-workflow/metadata.json b/edge-cases/edge-cases/disconnected-lanes-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..275cfe9502df336d2afbcb1ddb6ae9ef331ca152 --- /dev/null +++ b/edge-cases/edge-cases/disconnected-lanes-workflow/metadata.json @@ -0,0 +1,24 @@ +{ + "template_id": "disconnected-lanes-workflow", + "workflow_id": "disconnected-lanes", + "title": "Disconnected Lanes Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 2, + "num_nodes": 7, + "num_lanes": 2, + "tags": [ + "disconnected", + "lanes", + "decision", + "loop" + ], + "description": "This workflow models lanes that never connect to each other.", + "source_path": "edge-cases/disconnected-lanes", + "repo_path": "edge-cases/edge-cases/disconnected-lanes-workflow" +} diff --git a/edge-cases/edge-cases/disconnected-lanes-workflow/workflow.fz b/edge-cases/edge-cases/disconnected-lanes-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..c539d36199fc23152aa80ca452da0eb36cd237aa --- /dev/null +++ b/edge-cases/edge-cases/disconnected-lanes-workflow/workflow.fz @@ -0,0 +1,22 @@ + +laneA { # Lane A + n1: circle label:"Start Disconnected Lanes" + n2: diamond label:"Disconnected Lanes step 2" + n3: rectangle label:"Disconnected Lanes step 3" + n5: rectangle label:"Disconnected Lanes step 5" + n7: circle label:"End Disconnected Lanes" + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n3.handle(left) [label="Yes/Approved"] + n2.handle(bottom) -> laneB.n4.handle(top) [label="No/Rejected"] + n3.handle(right) -> n5.handle(left) + n5.handle(bottom) -> laneB.n6.handle(top) + + loop [retry until success] n2 n3 n4 n5 n6 +} + +laneB { # Lane B + n4: rectangle label:"Disconnected Lanes step 4" + n6: rectangle label:"Disconnected Lanes step 6" + n6.handle(right) -> laneA.n7.handle(bottom) + n4.handle(right) -> laneA.n5.handle(left) +} diff --git a/edge-cases/edge-cases/duplicate-node-ids-workflow/README.md b/edge-cases/edge-cases/duplicate-node-ids-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3c0b8d38de85a878abfb93ef0d360364ac4d4d63 --- /dev/null +++ b/edge-cases/edge-cases/duplicate-node-ids-workflow/README.md @@ -0,0 +1,19 @@ +# Duplicate Node Ids Workflow + +This workflow models the same node IDs reused in different lanes. + +**Template ID:** `duplicate-node-ids-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 3/5 +**Nodes:** 10 +**Lanes:** 3 +**Tags:** [duplicate, node, ids] +**Source path:** `edge-cases/duplicate-node-ids` +**Repo path:** `edge-cases/edge-cases/duplicate-node-ids-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/duplicate-node-ids-workflow/metadata.json b/edge-cases/edge-cases/duplicate-node-ids-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..382d9e47f63694ce6185738c04546642e054c9fc --- /dev/null +++ b/edge-cases/edge-cases/duplicate-node-ids-workflow/metadata.json @@ -0,0 +1,23 @@ +{ + "template_id": "duplicate-node-ids-workflow", + "workflow_id": "duplicate-node-ids", + "title": "Duplicate Node Ids Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 3, + "num_nodes": 10, + "num_lanes": 3, + "tags": [ + "duplicate", + "node", + "ids" + ], + "description": "This workflow models the same node IDs reused in different lanes.", + "source_path": "edge-cases/duplicate-node-ids", + "repo_path": "edge-cases/edge-cases/duplicate-node-ids-workflow" +} diff --git a/edge-cases/edge-cases/duplicate-node-ids-workflow/workflow.fz b/edge-cases/edge-cases/duplicate-node-ids-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..30cef649244bdd93f3f2a20c448727ad7f6d9be6 --- /dev/null +++ b/edge-cases/edge-cases/duplicate-node-ids-workflow/workflow.fz @@ -0,0 +1,29 @@ +laneA { # Lanea + n1: circle label:"Start Duplicate Node Ids" + n2: rectangle label:"Duplicate Node Ids step 2" + n3: rectangle label:"Duplicate Node Ids step 3" + n4: circle label:"End Duplicate Node Ids" + + n1.handle(bottom) -> laneB.n5.handle(top) [label="Success"] + n2.handle(bottom) -> laneB.n6.handle(top) [label="Valid"] + n3.handle(bottom) -> laneB.n5.handle(top) [label="Next"] +} +laneB { # Laneb + n5: rectangle label:"Duplicate Node Ids step 5" + n6: rectangle label:"Duplicate Node Ids step 6" + n7: diamond label:"Duplicate Node Ids step 7" + + n5.handle(bottom) -> laneC.n8.handle(top) + n6.handle(bottom) -> laneC.n9.handle(top) + n7.handle(bottom) -> laneC.n8.handle(top) + n7.handle(right) -> laneA.n1.handle(right) [label="Retry/Rejected"] +} +laneC { # Lanec + n8: rectangle label:"Duplicate Node Ids step 8" + n9: rectangle label:"Duplicate Node Ids step 9" + n10: rectangle label:"Duplicate Node Ids step 10" + + n8.handle(bottom) -> laneA.n2.handle(top) + n9.handle(bottom) -> laneA.n3.handle(top) + n10.handle(right) -> laneA.n4.handle(bottom) +} \ No newline at end of file diff --git a/edge-cases/edge-cases/empty-lane-workflow/README.md b/edge-cases/edge-cases/empty-lane-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2efaf5f2b0be24a52bfebb6e34e4677dc89135dc --- /dev/null +++ b/edge-cases/edge-cases/empty-lane-workflow/README.md @@ -0,0 +1,19 @@ +# Empty Lane Workflow + +This workflow models a lane with no nodes. + +**Template ID:** `empty-lane-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 3/5 +**Nodes:** 10 +**Lanes:** 3 +**Tags:** [empty, lane] +**Source path:** `edge-cases/empty-lane` +**Repo path:** `edge-cases/edge-cases/empty-lane-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/empty-lane-workflow/metadata.json b/edge-cases/edge-cases/empty-lane-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..df1a111b7cda2786c0378b197f8a17a92c956c96 --- /dev/null +++ b/edge-cases/edge-cases/empty-lane-workflow/metadata.json @@ -0,0 +1,22 @@ +{ + "template_id": "empty-lane-workflow", + "workflow_id": "empty-lane", + "title": "Empty Lane Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 3, + "num_nodes": 10, + "num_lanes": 3, + "tags": [ + "empty", + "lane" + ], + "description": "This workflow models a lane with no nodes.", + "source_path": "edge-cases/empty-lane", + "repo_path": "edge-cases/edge-cases/empty-lane-workflow" +} diff --git a/edge-cases/edge-cases/empty-lane-workflow/workflow.fz b/edge-cases/edge-cases/empty-lane-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..81e115fc2b1d3f7050f6c05738ec1c7580cf3649 --- /dev/null +++ b/edge-cases/edge-cases/empty-lane-workflow/workflow.fz @@ -0,0 +1,29 @@ +laneA { # Lanea + n1: circle label:"Start Empty Lane" + n4: rectangle label:"Empty Lane step 4" + n7: rectangle label:"Empty Lane step 7" + n10: circle label:"End Empty Lane" + + n1.handle(bottom) -> laneB.n2.handle(top) [label="Success"] + n4.handle(bottom) -> laneB.n5.handle(top) [label="Valid"] + n7.handle(bottom) -> laneB.n8.handle(top) [label="Next"] +} +laneB { # Laneb + n2: rectangle label:"Empty Lane step 2" + n5: rectangle label:"Empty Lane step 5" + n8: rectangle label:"Empty Lane step 8" + + n2.handle(bottom) -> laneC.n3.handle(top) + n5.handle(bottom) -> laneC.n6.handle(top) + n8.handle(bottom) -> laneC.n9.handle(top) +} +laneC { # Lanec + n3: diamond label:"Empty Lane step 3" + n6: rectangle label:"Empty Lane step 6" + n9: rectangle label:"Empty Lane step 9" + + n3.handle(bottom) -> laneA.n4.handle(top) + n3.handle(right) -> laneB.n2.handle(right) [label="Retry/Rejected"] + n6.handle(bottom) -> laneA.n7.handle(top) + n9.handle(bottom) -> laneA.n10.handle(top) +} \ No newline at end of file diff --git a/edge-cases/edge-cases/extra-whitespace-workflow/README.md b/edge-cases/edge-cases/extra-whitespace-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d7ad221d48fad344a5fa0d2b4d0695e1aa24d110 --- /dev/null +++ b/edge-cases/edge-cases/extra-whitespace-workflow/README.md @@ -0,0 +1,19 @@ +# Extra Whitespace Workflow + +This workflow models labels that include leading and trailing spaces. + +**Template ID:** `extra-whitespace-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 5/5 +**Nodes:** 16 +**Lanes:** 4 +**Tags:** [extra, whitespace] +**Source path:** `edge-cases/extra-whitespace` +**Repo path:** `edge-cases/edge-cases/extra-whitespace-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/extra-whitespace-workflow/metadata.json b/edge-cases/edge-cases/extra-whitespace-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..c56ca40a0c8e9e8bb479739e2b923fc7810f2cee --- /dev/null +++ b/edge-cases/edge-cases/extra-whitespace-workflow/metadata.json @@ -0,0 +1,22 @@ +{ + "template_id": "extra-whitespace-workflow", + "workflow_id": "extra-whitespace", + "title": "Extra Whitespace Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 5, + "num_nodes": 16, + "num_lanes": 4, + "tags": [ + "extra", + "whitespace" + ], + "description": "This workflow models labels that include leading and trailing spaces.", + "source_path": "edge-cases/extra-whitespace", + "repo_path": "edge-cases/edge-cases/extra-whitespace-workflow" +} diff --git a/edge-cases/edge-cases/extra-whitespace-workflow/workflow.fz b/edge-cases/edge-cases/extra-whitespace-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..782eb3e697dbdc95810e732c1c9b610a5babee69 --- /dev/null +++ b/edge-cases/edge-cases/extra-whitespace-workflow/workflow.fz @@ -0,0 +1,45 @@ +laneA { # Lanea + n1: circle label:"Start Extra Whitespace" + n5: rectangle label:"Extra Whitespace step 5" + n9: rectangle label:"Extra Whitespace step 9" + n13: rectangle label:"Extra Whitespace step 13" + + n1.handle(bottom) -> laneB.n2.handle(top) + n5.handle(bottom) -> laneB.n6.handle(top) + n9.handle(bottom) -> laneB.n10.handle(top) [label="Valid"] + n13.handle(bottom) -> laneB.n14.handle(top) +} +laneB { # Laneb + n2: rectangle label:" Label with spaces " + n6: rectangle label:"Extra Whitespace step 6" + n10: rectangle label:"Extra Whitespace step 10" + n14: rectangle label:"Extra Whitespace step 14" + + n2.handle(bottom) -> laneC.n3.handle(top) + n6.handle(bottom) -> laneC.n7.handle(top) [label="Success"] + n10.handle(bottom) -> laneC.n11.handle(top) + n14.handle(bottom) -> laneC.n15.handle(top) +} +laneC { # Lanec + n3: rectangle label:"Extra Whitespace step 3" + n7: diamond label:"Extra Whitespace step 7" + n11: rectangle label:"Extra Whitespace step 11" + n15: diamond label:"Extra Whitespace step 15" + + n3.handle(bottom) -> laneD.n4.handle(top) [label="Processed"] + n7.handle(bottom) -> laneD.n8.handle(top) + n7.handle(right) -> laneB.n6.handle(right) [label="Retry/Rejected"] + n11.handle(bottom) -> laneD.n12.handle(top) + n15.handle(bottom) -> laneD.n16.handle(top) [label="Done"] + n15.handle(right) -> laneB.n14.handle(right) [label="Retry/Rejected"] +} +laneD { # Laned + n4: rectangle label:"Extra Whitespace step 4" + n8: rectangle label:"Extra Whitespace step 8" + n12: rectangle label:"Extra Whitespace step 12" + n16: circle label:"End Extra Whitespace" + + n4.handle(bottom) -> laneA.n5.handle(top) + n8.handle(bottom) -> laneA.n9.handle(top) + n12.handle(bottom) -> laneA.n13.handle(top) [label="Next"] +} \ No newline at end of file diff --git a/edge-cases/edge-cases/json-in-label-workflow/README.md b/edge-cases/edge-cases/json-in-label-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5365220b10fcf380e436bd7343f666e8424422ca --- /dev/null +++ b/edge-cases/edge-cases/json-in-label-workflow/README.md @@ -0,0 +1,19 @@ +# Json In Label Workflow + +This workflow models a label that contains JSON text. + +**Template ID:** `json-in-label-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 4/5 +**Nodes:** 13 +**Lanes:** 4 +**Tags:** [json, in, label] +**Source path:** `edge-cases/json-in-label` +**Repo path:** `edge-cases/edge-cases/json-in-label-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/json-in-label-workflow/metadata.json b/edge-cases/edge-cases/json-in-label-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..1476a2003289376570b20115560ab74fd477c875 --- /dev/null +++ b/edge-cases/edge-cases/json-in-label-workflow/metadata.json @@ -0,0 +1,23 @@ +{ + "template_id": "json-in-label-workflow", + "workflow_id": "json-in-label", + "title": "Json In Label Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 4, + "num_nodes": 13, + "num_lanes": 4, + "tags": [ + "json", + "in", + "label" + ], + "description": "This workflow models a label that contains JSON text.", + "source_path": "edge-cases/json-in-label", + "repo_path": "edge-cases/edge-cases/json-in-label-workflow" +} diff --git a/edge-cases/edge-cases/json-in-label-workflow/workflow.fz b/edge-cases/edge-cases/json-in-label-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..97a6f73a2b5383ac112ac1ee1ffe4f1bf45b8e75 --- /dev/null +++ b/edge-cases/edge-cases/json-in-label-workflow/workflow.fz @@ -0,0 +1,39 @@ +laneA { # Lanea + n1: circle label:"Start Json In Label" + n5: rectangle label:"Json In Label step 5" + n9: rectangle label:"Json In Label step 9" + n13: circle label:"End Json In Label" + + n1.handle(bottom) -> laneB.n2.handle(top) + n5.handle(bottom) -> laneB.n6.handle(top) + n9.handle(bottom) -> laneB.n10.handle(top) [label="Valid"] +} +laneB { # Laneb + n2: rectangle label:"{\"key\":\"value\",\"count\":3}" + n6: rectangle label:"Json In Label step 6" + n10: rectangle label:"Json In Label step 10" + + n2.handle(bottom) -> laneC.n3.handle(top) + n6.handle(bottom) -> laneC.n7.handle(top) [label="Success"] + n10.handle(bottom) -> laneC.n11.handle(top) +} +laneC { # Lanec + n3: rectangle label:"Json In Label step 3" + n7: rectangle label:"Json In Label step 7" + n11: rectangle label:"Json In Label step 11" + + n3.handle(bottom) -> laneD.n4.handle(top) [label="Processed"] + n7.handle(bottom) -> laneD.n8.handle(top) + n11.handle(bottom) -> laneD.n12.handle(top) +} +laneD { # Laned + n4: diamond label:"Json In Label step 4" + n8: rectangle label:"Json In Label step 8" + n12: diamond label:"Json In Label step 12" + + n4.handle(bottom) -> laneA.n5.handle(top) + n4.handle(right) -> laneC.n3.handle(right) [label="Retry/Rejected"] + n8.handle(bottom) -> laneA.n9.handle(top) + n12.handle(bottom) -> laneA.n13.handle(top) [label="Next"] + n12.handle(right) -> laneC.n11.handle(right) [label="Retry/Rejected"] +} \ No newline at end of file diff --git a/edge-cases/edge-cases/label-escaping-workflow/README.md b/edge-cases/edge-cases/label-escaping-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b35bf2ba0d43a93457fbeb3dd5a12db50c696e3 --- /dev/null +++ b/edge-cases/edge-cases/label-escaping-workflow/README.md @@ -0,0 +1,19 @@ +# Label Escaping Workflow + +This workflow models labels containing quotes and special characters. + +**Template ID:** `label-escaping-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 5/5 +**Nodes:** 16 +**Lanes:** 4 +**Tags:** [label, escaping] +**Source path:** `edge-cases/label-escaping` +**Repo path:** `edge-cases/edge-cases/label-escaping-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/label-escaping-workflow/metadata.json b/edge-cases/edge-cases/label-escaping-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..be90e98ed2bdbeeacac51588aed67649c215337f --- /dev/null +++ b/edge-cases/edge-cases/label-escaping-workflow/metadata.json @@ -0,0 +1,22 @@ +{ + "template_id": "label-escaping-workflow", + "workflow_id": "label-escaping", + "title": "Label Escaping Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 5, + "num_nodes": 16, + "num_lanes": 4, + "tags": [ + "label", + "escaping" + ], + "description": "This workflow models labels containing quotes and special characters.", + "source_path": "edge-cases/label-escaping", + "repo_path": "edge-cases/edge-cases/label-escaping-workflow" +} diff --git a/edge-cases/edge-cases/label-escaping-workflow/workflow.fz b/edge-cases/edge-cases/label-escaping-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..6386eed9c7f47fe2057348214c2ee1609073dc10 --- /dev/null +++ b/edge-cases/edge-cases/label-escaping-workflow/workflow.fz @@ -0,0 +1,45 @@ +laneA { # Lanea + n1: circle label:"Start Label Escaping" + n5: rectangle label:"Label Escaping step 5" + n9: rectangle label:"Label Escaping step 9" + n13: rectangle label:"Label Escaping step 13" + + n1.handle(bottom) -> laneB.n2.handle(top) + n5.handle(bottom) -> laneB.n6.handle(top) [label="Done"] + n9.handle(bottom) -> laneB.n10.handle(top) + n13.handle(bottom) -> laneB.n14.handle(top) +} +laneB { # Laneb + n2: rectangle label:"Label Escaping step 2" + n6: rectangle label:"Label Escaping step 6" + n10: rectangle label:"Label Escaping step 10" + n14: rectangle label:"Label Escaping step 14" + + n2.handle(bottom) -> laneC.n3.handle(top) [label="Next"] + n6.handle(bottom) -> laneC.n7.handle(top) + n10.handle(bottom) -> laneC.n11.handle(top) + n14.handle(bottom) -> laneC.n15.handle(top) [label="Valid"] +} +laneC { # Lanec + n3: rectangle label:"Label Escaping step 3" + n7: rectangle label:"Label Escaping step 7" + n11: rectangle label:"Label Escaping step 11" + n15: rectangle label:"Label Escaping step 15" + + n3.handle(bottom) -> laneD.n4.handle(top) + n7.handle(bottom) -> laneD.n8.handle(top) + n11.handle(bottom) -> laneD.n12.handle(top) [label="Success"] + n15.handle(bottom) -> laneD.n16.handle(top) +} +laneD { # Laned + n4: diamond label:"Label Escaping step 4" + n8: rectangle label:"Label Escaping step 8" + n12: diamond label:"Label Escaping step 12" + n16: circle label:"End Label Escaping" + + n4.handle(bottom) -> laneA.n5.handle(top) + n4.handle(right) -> laneC.n3.handle(right) [label="Retry/Rejected"] + n8.handle(bottom) -> laneA.n9.handle(top) [label="Processed"] + n12.handle(bottom) -> laneA.n13.handle(top) + n12.handle(right) -> laneC.n11.handle(right) [label="Retry/Rejected"] +} \ No newline at end of file diff --git a/edge-cases/edge-cases/markdown-in-label-workflow/README.md b/edge-cases/edge-cases/markdown-in-label-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..64a588c405d57049c2cc9ed650bdf98ab3f229b1 --- /dev/null +++ b/edge-cases/edge-cases/markdown-in-label-workflow/README.md @@ -0,0 +1,19 @@ +# Markdown In Label Workflow + +This workflow models a label that contains markdown formatting. + +**Template ID:** `markdown-in-label-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 1/5 +**Nodes:** 5 +**Lanes:** 1 +**Tags:** [markdown, in, label] +**Source path:** `edge-cases/markdown-in-label` +**Repo path:** `edge-cases/edge-cases/markdown-in-label-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/markdown-in-label-workflow/metadata.json b/edge-cases/edge-cases/markdown-in-label-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..0c49b2c81272dd3f0e4aff357d17bb8381f1dd02 --- /dev/null +++ b/edge-cases/edge-cases/markdown-in-label-workflow/metadata.json @@ -0,0 +1,23 @@ +{ + "template_id": "markdown-in-label-workflow", + "workflow_id": "markdown-in-label", + "title": "Markdown In Label Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 1, + "num_nodes": 5, + "num_lanes": 1, + "tags": [ + "markdown", + "in", + "label" + ], + "description": "This workflow models a label that contains markdown formatting.", + "source_path": "edge-cases/markdown-in-label", + "repo_path": "edge-cases/edge-cases/markdown-in-label-workflow" +} diff --git a/edge-cases/edge-cases/markdown-in-label-workflow/workflow.fz b/edge-cases/edge-cases/markdown-in-label-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..0752173b2a75f28add35cacedd2cb22cbdcf83b6 --- /dev/null +++ b/edge-cases/edge-cases/markdown-in-label-workflow/workflow.fz @@ -0,0 +1,13 @@ +laneA { # Lanea + n1: circle label:"Start Markdown In Label" + n2: rectangle label:"**Bold** _italic_ [link](https://example.com)" + n3: diamond label:"Markdown In Label step 3" + n4: rectangle label:"Markdown In Label step 4" + n5: circle label:"End Markdown In Label" + + n1.handle(right) -> n2.handle(left) + n2.handle(right) -> n3.handle(left) [label="Next"] + n3.handle(right) -> n4.handle(left) + n3.handle(bottom) -> n2.handle(bottom) [label="Retry/Rejected"] + n4.handle(right) -> n5.handle(left) +} \ No newline at end of file diff --git a/edge-cases/edge-cases/max-lanes-workflow/README.md b/edge-cases/edge-cases/max-lanes-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..94ce8f54b155ea93e778f687142372ba39fc9cb5 --- /dev/null +++ b/edge-cases/edge-cases/max-lanes-workflow/README.md @@ -0,0 +1,19 @@ +# Max Lanes Workflow + +This workflow models 10 lanes with simple cross-lane arrows. + +**Template ID:** `max-lanes-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 3/5 +**Nodes:** 10 +**Lanes:** 10 +**Tags:** [max, lanes] +**Source path:** `edge-cases/max-lanes` +**Repo path:** `edge-cases/edge-cases/max-lanes-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/max-lanes-workflow/metadata.json b/edge-cases/edge-cases/max-lanes-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..7b985ebbf85e151d372ac8bea1b8ad6fc6ecb697 --- /dev/null +++ b/edge-cases/edge-cases/max-lanes-workflow/metadata.json @@ -0,0 +1,22 @@ +{ + "template_id": "max-lanes-workflow", + "workflow_id": "max-lanes", + "title": "Max Lanes Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 3, + "num_nodes": 10, + "num_lanes": 10, + "tags": [ + "max", + "lanes" + ], + "description": "This workflow models 10 lanes with simple cross-lane arrows.", + "source_path": "edge-cases/max-lanes", + "repo_path": "edge-cases/edge-cases/max-lanes-workflow" +} diff --git a/edge-cases/edge-cases/max-lanes-workflow/workflow.fz b/edge-cases/edge-cases/max-lanes-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..5b81f35abdd82068c837f7cb77c421a111f913c3 --- /dev/null +++ b/edge-cases/edge-cases/max-lanes-workflow/workflow.fz @@ -0,0 +1,50 @@ +laneA { # Lanea + n1: circle label:"Start Max Lanes" + + n1.handle(bottom) -> laneB.n2.handle(top) [label="Success"] +} +laneB { # Laneb + n2: rectangle label:"Max Lanes step 2" + + n2.handle(bottom) -> laneC.n3.handle(top) +} +laneC { # Lanec + n3: diamond label:"Max Lanes step 3" + + n3.handle(bottom) -> laneD.n4.handle(top) + n3.handle(right) -> laneB.n2.handle(right) [label="Retry/Rejected"] +} +laneD { # Laned + n4: rectangle label:"Max Lanes step 4" + + n4.handle(bottom) -> laneE.n5.handle(top) [label="Valid"] +} +laneE { # Lanee + n5: rectangle label:"Max Lanes step 5" + + n5.handle(bottom) -> laneF.n6.handle(top) +} +laneF { # Lanef + n6: rectangle label:"Max Lanes step 6" + + n6.handle(bottom) -> laneG.n7.handle(top) +} +laneG { # Laneg + n7: rectangle label:"Max Lanes step 7" + + n7.handle(bottom) -> laneH.n8.handle(top) [label="Next"] +} +laneH { # Laneh + n8: rectangle label:"Max Lanes step 8" + + n8.handle(bottom) -> laneI.n9.handle(top) +} +laneI { # Lanei + n9: rectangle label:"Max Lanes step 9" + + n9.handle(bottom) -> laneJ.n10.handle(top) +} +laneJ { # Lanej + n10: circle label:"End Max Lanes" + +} \ No newline at end of file diff --git a/edge-cases/edge-cases/max-nodes-workflow/README.md b/edge-cases/edge-cases/max-nodes-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7fdeef4609dac1fd33d34a11b358f3dc4c656b97 --- /dev/null +++ b/edge-cases/edge-cases/max-nodes-workflow/README.md @@ -0,0 +1,19 @@ +# Max Nodes Workflow + +This workflow models 50 nodes in a single lane as a parser stress test. + +**Template ID:** `max-nodes-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 2/5 +**Nodes:** 50 +**Lanes:** 2 +**Tags:** [max, nodes] +**Source path:** `edge-cases/max-nodes` +**Repo path:** `edge-cases/edge-cases/max-nodes-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/max-nodes-workflow/metadata.json b/edge-cases/edge-cases/max-nodes-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..9d7c2a3318ea1fc4a9a54294453c7b6260647f6c --- /dev/null +++ b/edge-cases/edge-cases/max-nodes-workflow/metadata.json @@ -0,0 +1,22 @@ +{ + "template_id": "max-nodes-workflow", + "workflow_id": "max-nodes", + "title": "Max Nodes Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 2, + "num_nodes": 50, + "num_lanes": 2, + "tags": [ + "max", + "nodes" + ], + "description": "This workflow models 50 nodes in a single lane as a parser stress test.", + "source_path": "edge-cases/max-nodes", + "repo_path": "edge-cases/edge-cases/max-nodes-workflow" +} diff --git a/edge-cases/edge-cases/max-nodes-workflow/workflow.fz b/edge-cases/edge-cases/max-nodes-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..5643c894f0ea91a1d65a09f7b0751dfdd9ce6091 --- /dev/null +++ b/edge-cases/edge-cases/max-nodes-workflow/workflow.fz @@ -0,0 +1,111 @@ +laneA { # Lanea + n1: circle label:"Start Max Nodes" + n3: rectangle label:"Max Nodes step 3" + n5: rectangle label:"Max Nodes step 5" + n7: diamond label:"Max Nodes step 7" + n9: rectangle label:"Max Nodes step 9" + n11: rectangle label:"Max Nodes step 11" + n13: rectangle label:"Max Nodes step 13" + n15: diamond label:"Max Nodes step 15" + n17: rectangle label:"Max Nodes step 17" + n19: rectangle label:"Max Nodes step 19" + n21: rectangle label:"Max Nodes step 21" + n23: diamond label:"Max Nodes step 23" + n25: rectangle label:"Max Nodes step 25" + n27: rectangle label:"Max Nodes step 27" + n29: rectangle label:"Max Nodes step 29" + n31: diamond label:"Max Nodes step 31" + n33: rectangle label:"Max Nodes step 33" + n35: rectangle label:"Max Nodes step 35" + n37: rectangle label:"Max Nodes step 37" + n39: diamond label:"Max Nodes step 39" + n41: rectangle label:"Max Nodes step 41" + n43: rectangle label:"Max Nodes step 43" + n45: rectangle label:"Max Nodes step 45" + n47: diamond label:"Max Nodes step 47" + n49: rectangle label:"Max Nodes step 49" + + n1.handle(bottom) -> laneB.n2.handle(top) [label="Success"] + n3.handle(bottom) -> laneB.n4.handle(top) + n5.handle(bottom) -> laneB.n6.handle(top) + n7.handle(bottom) -> laneB.n8.handle(top) [label="Next"] + n7.handle(right) -> laneB.n6.handle(right) [label="Retry/Rejected"] + n9.handle(bottom) -> laneB.n10.handle(top) + n11.handle(bottom) -> laneB.n12.handle(top) + n13.handle(bottom) -> laneB.n14.handle(top) [label="Processed"] + n15.handle(bottom) -> laneB.n16.handle(top) + n15.handle(right) -> laneB.n14.handle(right) [label="Retry/Rejected"] + n17.handle(bottom) -> laneB.n18.handle(top) + n19.handle(bottom) -> laneB.n20.handle(top) [label="Valid"] + n21.handle(bottom) -> laneB.n22.handle(top) + n23.handle(bottom) -> laneB.n24.handle(top) + n23.handle(right) -> laneB.n22.handle(right) [label="Retry/Rejected"] + n25.handle(bottom) -> laneB.n26.handle(top) [label="Done"] + n27.handle(bottom) -> laneB.n28.handle(top) + n29.handle(bottom) -> laneB.n30.handle(top) + n31.handle(bottom) -> laneB.n32.handle(top) [label="Success"] + n31.handle(right) -> laneB.n30.handle(right) [label="Retry/Rejected"] + n33.handle(bottom) -> laneB.n34.handle(top) + n35.handle(bottom) -> laneB.n36.handle(top) + n37.handle(bottom) -> laneB.n38.handle(top) [label="Next"] + n39.handle(bottom) -> laneB.n40.handle(top) + n39.handle(right) -> laneB.n38.handle(right) [label="Retry/Rejected"] + n41.handle(bottom) -> laneB.n42.handle(top) + n43.handle(bottom) -> laneB.n44.handle(top) [label="Processed"] + n45.handle(bottom) -> laneB.n46.handle(top) + n47.handle(bottom) -> laneB.n48.handle(top) + n47.handle(right) -> laneB.n46.handle(right) [label="Retry/Rejected"] + n49.handle(bottom) -> laneB.n50.handle(top) [label="Valid"] +} +laneB { # Laneb + n2: rectangle label:"Max Nodes step 2" + n4: rectangle label:"Max Nodes step 4" + n6: rectangle label:"Max Nodes step 6" + n8: rectangle label:"Max Nodes step 8" + n10: rectangle label:"Max Nodes step 10" + n12: rectangle label:"Max Nodes step 12" + n14: rectangle label:"Max Nodes step 14" + n16: rectangle label:"Max Nodes step 16" + n18: rectangle label:"Max Nodes step 18" + n20: rectangle label:"Max Nodes step 20" + n22: rectangle label:"Max Nodes step 22" + n24: rectangle label:"Max Nodes step 24" + n26: rectangle label:"Max Nodes step 26" + n28: rectangle label:"Max Nodes step 28" + n30: rectangle label:"Max Nodes step 30" + n32: rectangle label:"Max Nodes step 32" + n34: rectangle label:"Max Nodes step 34" + n36: rectangle label:"Max Nodes step 36" + n38: rectangle label:"Max Nodes step 38" + n40: rectangle label:"Max Nodes step 40" + n42: rectangle label:"Max Nodes step 42" + n44: rectangle label:"Max Nodes step 44" + n46: rectangle label:"Max Nodes step 46" + n48: rectangle label:"Max Nodes step 48" + n50: circle label:"End Max Nodes" + + n2.handle(bottom) -> laneA.n3.handle(top) + n4.handle(bottom) -> laneA.n5.handle(top) [label="Valid"] + n6.handle(bottom) -> laneA.n7.handle(top) + n8.handle(bottom) -> laneA.n9.handle(top) + n10.handle(bottom) -> laneA.n11.handle(top) [label="Done"] + n12.handle(bottom) -> laneA.n13.handle(top) + n14.handle(bottom) -> laneA.n15.handle(top) + n16.handle(bottom) -> laneA.n17.handle(top) [label="Success"] + n18.handle(bottom) -> laneA.n19.handle(top) + n20.handle(bottom) -> laneA.n21.handle(top) + n22.handle(bottom) -> laneA.n23.handle(top) [label="Next"] + n24.handle(bottom) -> laneA.n25.handle(top) + n26.handle(bottom) -> laneA.n27.handle(top) + n28.handle(bottom) -> laneA.n29.handle(top) [label="Processed"] + n30.handle(bottom) -> laneA.n31.handle(top) + n32.handle(bottom) -> laneA.n33.handle(top) + n34.handle(bottom) -> laneA.n35.handle(top) [label="Valid"] + n36.handle(bottom) -> laneA.n37.handle(top) + n38.handle(bottom) -> laneA.n39.handle(top) + n40.handle(bottom) -> laneA.n41.handle(top) [label="Done"] + n42.handle(bottom) -> laneA.n43.handle(top) + n44.handle(bottom) -> laneA.n45.handle(top) + n46.handle(bottom) -> laneA.n47.handle(top) [label="Success"] + n48.handle(bottom) -> laneA.n49.handle(top) +} \ No newline at end of file diff --git a/edge-cases/edge-cases/minimal-workflow/README.md b/edge-cases/edge-cases/minimal-workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a6235b105df7228791b1c0bddec632e6eddb75cb --- /dev/null +++ b/edge-cases/edge-cases/minimal-workflow/README.md @@ -0,0 +1,19 @@ +# Minimal Workflow + +This workflow models a workflow with a single node only. + +**Template ID:** `minimal-workflow` +**Kind:** workflow +**Source domain:** edge-cases +**Primary use case:** edge-cases +**Secondary use cases:** None +**Complexity:** 2/5 +**Nodes:** 1 +**Lanes:** 2 +**Tags:** [minimal, workflow] +**Source path:** `edge-cases/minimal-workflow` +**Repo path:** `edge-cases/edge-cases/minimal-workflow` + +## Files +- `workflow.fz` — FlowZap Code source +- `metadata.json` — Structured metadata diff --git a/edge-cases/edge-cases/minimal-workflow/metadata.json b/edge-cases/edge-cases/minimal-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..f39b4123384a940fee1fc104a784b8c5a07fba93 --- /dev/null +++ b/edge-cases/edge-cases/minimal-workflow/metadata.json @@ -0,0 +1,22 @@ +{ + "template_id": "minimal-workflow", + "workflow_id": "minimal", + "title": "Minimal Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 2, + "num_nodes": 1, + "num_lanes": 2, + "tags": [ + "minimal", + "workflow" + ], + "description": "This workflow models a workflow with a single node only.", + "source_path": "edge-cases/minimal-workflow", + "repo_path": "edge-cases/edge-cases/minimal-workflow" +} diff --git a/edge-cases/edge-cases/minimal-workflow/workflow.fz b/edge-cases/edge-cases/minimal-workflow/workflow.fz new file mode 100644 index 0000000000000000000000000000000000000000..27d7ee3eec87e4d59b80a759329ae4f9a49ebb20 --- /dev/null +++ b/edge-cases/edge-cases/minimal-workflow/workflow.fz @@ -0,0 +1,7 @@ +laneA { # Lanea + n1: circle label:"Start Minimal Workflow" + +} +laneB { # Laneb + +} \ No newline at end of file diff --git a/edge-cases/edge-cases/missing-labels-workflow/metadata.json b/edge-cases/edge-cases/missing-labels-workflow/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..f50b6bb1e3d2750889f4bb0d8e6070b0ce7e972c --- /dev/null +++ b/edge-cases/edge-cases/missing-labels-workflow/metadata.json @@ -0,0 +1,23 @@ +{ + "template_id": "missing-labels-workflow", + "workflow_id": "missing-labels", + "title": "Missing Labels Workflow", + "kind": "workflow", + "source_domain": "edge-cases", + "primary_use_case": "edge-cases", + "secondary_use_cases": [], + "use_cases": [ + "edge-cases" + ], + "complexity": 4, + "num_nodes": 13, + "num_lanes": 4, + "tags": [ + "missing", + "labels", + "decision" + ], + "description": "This workflow models nodes without label parameters.", + "source_path": "edge-cases/missing-labels", + "repo_path": "edge-cases/edge-cases/missing-labels-workflow" +}