{ "kind": "open-flow-workflow", "version": 1, "name": "Default a Close Date to Three Weeks", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_596c7ff1fe7d5f79": { "name": "Enter a close date", "kind": "start", "inputDefs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "value" } ] }, "n_c1fca9eb7afac441": { "inputs": { "value": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_596c7ff1fe7d5f79", "output": "value" } ] } }, "name": "Choose the close date", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "value" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "closeDate" } ], "name": "Choose the close date", "moduleId": "n_86a2db0e2f4736c9", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_9a8fefcd64b86f2d": { "name": "Close date", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "closeDate" } ], "outputMappings": { "closeDate": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_c1fca9eb7afac441", "output": "closeDate" } ] } } } }, "edges": [ { "source": "n_596c7ff1fe7d5f79", "target": "n_c1fca9eb7afac441" }, { "source": "n_c1fca9eb7afac441", "target": "n_9a8fefcd64b86f2d" } ] } }, "modules": { "n_86a2db0e2f4736c9": { "name": "Choose the close date", "imports": [], "source": "export default function closeDate({value}){return{closeDate:/\\d\\d\\d\\d-\\d\\d-\\d\\d/i.test(value)?value:new Date(new Date().setDate(new Date().getDate()+21)).toISOString()}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }