| 12345678910111213141516171819202122 |
- {
- "name": "verify-wait-for-approval",
- "nodes": [
- {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
- {"id": "approve", "name": "Approve", "type": "wait-for-approval", "position": {"x": 0, "y": 100},
- "config": {"reason": "Approve the test", "expiresIn": 1}},
- {"id": "after", "name": "After Approval", "type": "code", "position": {"x": 0, "y": 200},
- "config": {"code": "return { sawApproval: input.data.approved === true, note: input.data.note };"}}
- ],
- "connections": [
- {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "approve", "targetInput": "data"},
- {"sourceNodeId": "approve", "sourceOutput": "main", "targetNodeId": "after", "targetInput": "data"}
- ],
- "resume": {
- "waitForStatus": "waiting",
- "tokenFrom": "approve",
- "payload": {"approved": true, "data": {"note": "looks fine"}}
- },
- "expect": {
- "after": {"status": "completed", "output": {"result": {"sawApproval": true, "note": "looks fine"}}}
- }
- }
|