{ "format": "alga-psa.workflow-bundle", "formatVersion": 1, "exportedAt": "2026-01-27T19:57:59.659Z", "workflows": [ { "key": "fixture.invoice-status-update-ticket", "metadata": { "name": "Fixture: Invoice Status Multi Branch", "description": "Exercise multi-branch control flow by selecting Branch A/B via payload (INVOICE_STATUS_CHANGED).", "payloadSchemaRef": "payload.InvoiceStatusChanged.v1", "payloadSchemaMode": "pinned", "pinnedPayloadSchemaRef": "payload.InvoiceStatusChanged.v1", "trigger": { "type": "event", "eventName": "INVOICE_STATUS_CHANGED" }, "isSystem": false, "isVisible": true, "isPaused": false, "concurrencyLimit": null, "autoPauseOnFailure": false, "failureRateThreshold": null, "failureRateMinRuns": null, "retentionPolicyOverride": null }, "dependencies": { "actions": [ { "actionId": "projects.create_task", "version": 1 } ], "nodeTypes": [ "action.call", "control.return", "state.set", "transform.assign", "control.if" ], "schemaRefs": [ "payload.InvoiceStatusChanged.v1" ] }, "draft": { "draftVersion": 1, "definition": { "id": "b8cc9f8f-f275-5ce6-2623-926eb6c8b04d", "version": 1, "name": "Fixture: Invoice Status Multi Branch", "description": "Exercise multi-branch control flow by selecting Branch A/B via payload (INVOICE_STATUS_CHANGED).", "payloadSchemaRef": "payload.InvoiceStatusChanged.v1", "trigger": { "type": "event", "eventName": "INVOICE_STATUS_CHANGED" }, "steps": [ { "id": "state-fixture", "type": "state.set", "config": { "state": "FIXTURE" } }, { "id": "assign-text", "type": "transform.assign", "config": { "assign": { "vars.marker": { "$expr": "'[fixture invoice-status-update-ticket]'" }, "vars.body": { "$expr": "'[fixture invoice-status-update-ticket] dedupe=' & payload.fixtureDedupeKey" } } } }, { "id": "if-branch-a", "type": "control.if", "condition": { "$expr": "payload.fixtureVariant = 'A'" }, "then": [ { "id": "notify", "type": "action.call", "config": { "actionId": "projects.create_task", "version": 1, "inputMapping": { "project_id": { "$expr": "payload.invoiceId" }, "title": { "$expr": "(vars.marker ? vars.marker : '[fixture invoice-status-update-ticket]') & ' ' & (vars.body ? vars.body : (vars.title ? vars.title : ''))" } } } }, { "id": "return-a", "type": "control.return" } ], "else": [ { "id": "if-branch-b", "type": "control.if", "condition": { "$expr": "payload.fixtureVariant = 'B'" }, "then": [ { "id": "notify", "type": "action.call", "config": { "actionId": "projects.create_task", "version": 1, "inputMapping": { "project_id": { "$expr": "payload.invoiceId" }, "title": { "$expr": "(vars.marker ? vars.marker : '[fixture invoice-status-update-ticket]') & ' ' & (vars.body ? vars.body : (vars.title ? vars.title : ''))" } } } }, { "id": "return-b", "type": "control.return" } ], "else": [ { "id": "return-default", "type": "control.return" } ] } ] } ] } }, "publishedVersions": [ { "version": 1, "definition": { "id": "b8cc9f8f-f275-5ce6-2623-926eb6c8b04d", "version": 1, "name": "Fixture: Invoice Status Multi Branch", "description": "Exercise multi-branch control flow by selecting Branch A/B via payload (INVOICE_STATUS_CHANGED).", "payloadSchemaRef": "payload.InvoiceStatusChanged.v1", "trigger": { "type": "event", "eventName": "INVOICE_STATUS_CHANGED" }, "steps": [ { "id": "state-fixture", "type": "state.set", "config": { "state": "FIXTURE" } }, { "id": "assign-text", "type": "transform.assign", "config": { "assign": { "vars.marker": { "$expr": "'[fixture invoice-status-update-ticket]'" }, "vars.body": { "$expr": "'[fixture invoice-status-update-ticket] dedupe=' & payload.fixtureDedupeKey" } } } }, { "id": "if-branch-a", "type": "control.if", "condition": { "$expr": "payload.fixtureVariant = 'A'" }, "then": [ { "id": "notify", "type": "action.call", "config": { "actionId": "projects.create_task", "version": 1, "inputMapping": { "project_id": { "$expr": "payload.invoiceId" }, "title": { "$expr": "(vars.marker ? vars.marker : '[fixture invoice-status-update-ticket]') & ' ' & (vars.body ? vars.body : (vars.title ? vars.title : ''))" } } } }, { "id": "return-a", "type": "control.return" } ], "else": [ { "id": "if-branch-b", "type": "control.if", "condition": { "$expr": "payload.fixtureVariant = 'B'" }, "then": [ { "id": "notify", "type": "action.call", "config": { "actionId": "projects.create_task", "version": 1, "inputMapping": { "project_id": { "$expr": "payload.invoiceId" }, "title": { "$expr": "(vars.marker ? vars.marker : '[fixture invoice-status-update-ticket]') & ' ' & (vars.body ? vars.body : (vars.title ? vars.title : ''))" } } } }, { "id": "return-b", "type": "control.return" } ], "else": [ { "id": "return-default", "type": "control.return" } ] } ] } ] }, "payloadSchemaJson": null } ] } ] }