{ "kind": "open-flow-workflow", "version": 1, "name": "Sum Three USD Example Values", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_bd2f8fa932cdd9e8": { "name": "Run the example", "kind": "start", "inputDefs": [] }, "n_8d2316965d8f6cb6": { "inputs": {}, "name": "Sum the amounts", "kind": "task", "task": { "inputs": [], "outputs": [ { "jsonSchema": { "type": "number" }, "nullable": false, "handle": "total_value" } ], "name": "Sum the amounts", "moduleId": "n_b97211fc307c2069", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_70dc976179b28302": { "name": "Total value", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "number" }, "nullable": false, "handle": "total_value" } ], "outputMappings": { "total_value": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8d2316965d8f6cb6", "output": "total_value" } ] } } } }, "edges": [ { "source": "n_bd2f8fa932cdd9e8", "target": "n_8d2316965d8f6cb6" }, { "source": "n_8d2316965d8f6cb6", "target": "n_70dc976179b28302" } ] } }, "modules": { "n_b97211fc307c2069": { "name": "Sum the amounts", "imports": [], "source": "export default function sumExample(){const items=[{amount_USD:50},{amount_USD:20},{amount_USD:60}];let total=0;for(const item of items)total+=item.amount_USD;return{total_value:total}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }