|
|
@@ -11,19 +11,26 @@
|
|
|
{"id": "n5", "name": "Bad", "type": "json", "position": {"x": 100, "y": 200},
|
|
|
"config": {"operation": "parse", "inputField": "data.result.name", "outputField": "value", "onError": "null"}},
|
|
|
{"id": "n6", "name": "Render", "type": "template", "position": {"x": 0, "y": 400},
|
|
|
- "config": {"template": "Hello {{data.result.name}}", "outputField": "text"}}
|
|
|
+ "config": {"template": "Hello {{data.result.name}}", "outputField": "text"}},
|
|
|
+ {"id": "n7", "name": "TemplateText", "type": "code", "position": {"x": 200, "y": 100},
|
|
|
+ "config": {"code": "var o = String.fromCharCode(123, 123); var c = String.fromCharCode(125, 125); return { message: 'Hi ' + o + 'result.who' + c + ', you have ' + o + 'result.n' + c + ' new items', who: 'Zora', n: 5 };"}},
|
|
|
+ {"id": "n8", "name": "RenderFromInput", "type": "template", "position": {"x": 200, "y": 200},
|
|
|
+ "config": {"templateSource": "input", "templateField": "data.result.message", "outputField": "text"}}
|
|
|
],
|
|
|
"connections": [
|
|
|
{"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n2", "targetInput": "data"},
|
|
|
{"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n3", "targetInput": "data"},
|
|
|
{"sourceNodeId": "n3", "sourceOutput": "main", "targetNodeId": "n4", "targetInput": "data"},
|
|
|
{"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n5", "targetInput": "data"},
|
|
|
- {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n6", "targetInput": "data"}
|
|
|
+ {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n6", "targetInput": "data"},
|
|
|
+ {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n7", "targetInput": "data"},
|
|
|
+ {"sourceNodeId": "n7", "sourceOutput": "main", "targetNodeId": "n8", "targetInput": "data"}
|
|
|
],
|
|
|
"expect": {
|
|
|
"n3": {"status": "completed", "output": {"value": {"nested": {"count": 7}}}},
|
|
|
"n4": {"status": "completed", "output": {"count": 7}},
|
|
|
"n5": {"status": "completed", "output": {"value": null}},
|
|
|
- "n6": {"status": "completed", "output": {"text": "Hello Ada"}}
|
|
|
+ "n6": {"status": "completed", "output": {"text": "Hello Ada"}},
|
|
|
+ "n8": {"status": "completed", "output": {"text": "Hi Zora, you have 5 new items"}}
|
|
|
}
|
|
|
}
|