A Demo on how to use the node-red-contrib-iris Nodes.
-
-
Save cophilot/4e10b91c31aa8ac8a4d66a7a838dd7af to your computer and use it in GitHub Desktop.
Short demo for node-red-contrib-iris
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "769fc82c20b96ef6", | |
"type": "tab", | |
"label": "Demo", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ | |
"id": "7b2154f74aded744", | |
"type": "inject", | |
"z": "769fc82c20b96ef6", | |
"name": "start", | |
"props": [], | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"x": 230, | |
"y": 320, | |
"wires": [ | |
[ | |
"0da6a7d4cbfe03cc" | |
] | |
] | |
}, | |
{ | |
"id": "060ed4556a4c1d64", | |
"type": "debug", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "result", | |
"targetType": "msg", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 870, | |
"y": 320, | |
"wires": [] | |
}, | |
{ | |
"id": "0da6a7d4cbfe03cc", | |
"type": "function", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"func": "msg.data = {\n \"package\": \"Demo\",\n \"className\": \"Person\",\n \"superclasses\": \"%Persistent,%Populate\",\n \"properties\":[\n {\n \"name\": \"Age\",\n \"type\": \"int\",\n \"parameters\":[\n {\n \"name\":\"POPSPEC\",\n \"value\": \".Age()\"\n }\n ]\n },\n {\n \"name\":\"Name\",\n \"type\": \"string\"\n },\n {\n \"name\":\"Title\",\n \"type\": \"string\"\n },\n {\n \"name\":\"State\",\n \"type\": \"string\"\n }\n ],\n \"methods\":[\n {\n \"name\":\"Age\",\n \"classMethod\":true,\n \"returnType\":\"%Integer\",\n \"body\":\"return 21 + $RANDOM(45)\"\n }\n ]\n}\n\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"libs": [], | |
"x": 400, | |
"y": 320, | |
"wires": [ | |
[ | |
"8aa773f47a4520d3" | |
] | |
] | |
}, | |
{ | |
"id": "84683c27c677521d", | |
"type": "inject", | |
"z": "769fc82c20b96ef6", | |
"name": "start", | |
"props": [], | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"x": 230, | |
"y": 440, | |
"wires": [ | |
[ | |
"f3460403115307f1" | |
] | |
] | |
}, | |
{ | |
"id": "f3460403115307f1", | |
"type": "function", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"func": "msg.data = {\n \"className\": \"Demo.Person\",\n \"method\":\"Populate\",\n \"parameters\":[100]\n};\n\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"libs": [], | |
"x": 400, | |
"y": 440, | |
"wires": [ | |
[ | |
"762780e0d8282096" | |
] | |
] | |
}, | |
{ | |
"id": "d318cb55a82f12ba", | |
"type": "debug", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "result", | |
"targetType": "msg", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 870, | |
"y": 440, | |
"wires": [] | |
}, | |
{ | |
"id": "7c273b23d5f053a4", | |
"type": "comment", | |
"z": "769fc82c20b96ef6", | |
"name": "create Demo.Person", | |
"info": "", | |
"x": 270, | |
"y": 280, | |
"wires": [] | |
}, | |
{ | |
"id": "a6ffba1fcedd9cbd", | |
"type": "comment", | |
"z": "769fc82c20b96ef6", | |
"name": "Populate Demo.Person", | |
"info": "", | |
"x": 280, | |
"y": 400, | |
"wires": [] | |
}, | |
{ | |
"id": "7c847fa7e3b05fef", | |
"type": "inject", | |
"z": "769fc82c20b96ef6", | |
"name": "start", | |
"props": [], | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"x": 230, | |
"y": 560, | |
"wires": [ | |
[ | |
"674149aa2f2c4b59" | |
] | |
] | |
}, | |
{ | |
"id": "674149aa2f2c4b59", | |
"type": "function", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"func": "msg.data = {\n \"sql\":\"INSERT INTO Demo.Person (Name,Age,Title,State) VALUES (?,?,?,?)\",\n \"values\":[\"Smith, John J.\", 42, \"Sales Engineer\", \"UT\"]\n};\n\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"libs": [], | |
"x": 400, | |
"y": 560, | |
"wires": [ | |
[ | |
"052fcccac38467a5" | |
] | |
] | |
}, | |
{ | |
"id": "a55c5b9f49e18841", | |
"type": "debug", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "result", | |
"targetType": "msg", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 870, | |
"y": 560, | |
"wires": [] | |
}, | |
{ | |
"id": "970e73f4182e5001", | |
"type": "inject", | |
"z": "769fc82c20b96ef6", | |
"name": "start", | |
"props": [], | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"x": 230, | |
"y": 680, | |
"wires": [ | |
[ | |
"e9099d51223a24c4" | |
] | |
] | |
}, | |
{ | |
"id": "e9099d51223a24c4", | |
"type": "function", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"func": "msg.data = {\n \"className\":\"Demo.Person\",\n \"Name\": \"Mustermann, Max M.\",\n \"Age\": 21,\n \"Title\": \"Intern Sales Engineer\",\n \"State\": \"UT\"\n}\n\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"libs": [], | |
"x": 400, | |
"y": 680, | |
"wires": [ | |
[ | |
"1b5bb4b6163c4b79" | |
] | |
] | |
}, | |
{ | |
"id": "6a45ec8e631e9205", | |
"type": "debug", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "result", | |
"targetType": "msg", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 870, | |
"y": 680, | |
"wires": [] | |
}, | |
{ | |
"id": "b43b18b4db461f7a", | |
"type": "comment", | |
"z": "769fc82c20b96ef6", | |
"name": "Insert via Insert-Statement", | |
"info": "", | |
"x": 290, | |
"y": 520, | |
"wires": [] | |
}, | |
{ | |
"id": "35e5850f97c74376", | |
"type": "comment", | |
"z": "769fc82c20b96ef6", | |
"name": "Insert via JSON object", | |
"info": "", | |
"x": 280, | |
"y": 640, | |
"wires": [] | |
}, | |
{ | |
"id": "8aa773f47a4520d3", | |
"type": "sf:node-red-iris-IRIS-CREATE", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"IP": "localhost", | |
"Port": 1972, | |
"Namespace": "User", | |
"Username": "Demo", | |
"Password": "iris", | |
"Check Connection": true, | |
"x": 640, | |
"y": 320, | |
"wires": [ | |
[ | |
"060ed4556a4c1d64" | |
] | |
] | |
}, | |
{ | |
"id": "762780e0d8282096", | |
"type": "IRIS_CALL", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"IP": "localhost", | |
"Port": 1972, | |
"Namespace": "User", | |
"Username": "Demo", | |
"Password": "iris", | |
"Check Connection": true, | |
"x": 630, | |
"y": 440, | |
"wires": [ | |
[ | |
"d318cb55a82f12ba" | |
] | |
] | |
}, | |
{ | |
"id": "052fcccac38467a5", | |
"type": "sf:node-red-iris-IRIS", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"IP": "localhost", | |
"Port": 1972, | |
"Namespace": "User", | |
"Username": "Demo", | |
"Password": "iris", | |
"holdConnection": 10, | |
"Check Connection": true, | |
"x": 610, | |
"y": 560, | |
"wires": [ | |
[ | |
"a55c5b9f49e18841" | |
] | |
] | |
}, | |
{ | |
"id": "1b5bb4b6163c4b79", | |
"type": "sf:node-red-iris-IRIS-OO", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"IP": "localhost", | |
"Port": 1972, | |
"Namespace": "User", | |
"Username": "Demo", | |
"Password": "iris", | |
"holdConnection": 10, | |
"Check Connection": true, | |
"x": 620, | |
"y": 680, | |
"wires": [ | |
[ | |
"6a45ec8e631e9205" | |
] | |
] | |
}, | |
{ | |
"id": "3abf8ea7077e5f8b", | |
"type": "inject", | |
"z": "769fc82c20b96ef6", | |
"name": "start", | |
"props": [], | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"x": 230, | |
"y": 780, | |
"wires": [ | |
[ | |
"101f090a1a4aef60" | |
] | |
] | |
}, | |
{ | |
"id": "101f090a1a4aef60", | |
"type": "function", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"func": "msg.data = \n\"SELECT * FROM Demo.Person WHERE State = 'UT' AND Age > 30\"\n\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"libs": [], | |
"x": 400, | |
"y": 780, | |
"wires": [ | |
[ | |
"fdef0eddc63b7d5a" | |
] | |
] | |
}, | |
{ | |
"id": "a5d1ace2489b51a6", | |
"type": "debug", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "result", | |
"targetType": "msg", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 870, | |
"y": 760, | |
"wires": [] | |
}, | |
{ | |
"id": "1910e7efa2db55c2", | |
"type": "debug", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "data", | |
"targetType": "msg", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 860, | |
"y": 800, | |
"wires": [] | |
}, | |
{ | |
"id": "fdef0eddc63b7d5a", | |
"type": "sf:node-red-iris-IRIS", | |
"z": "769fc82c20b96ef6", | |
"name": "", | |
"IP": "localhost", | |
"Port": 1972, | |
"Namespace": "User", | |
"Username": "Demo", | |
"Password": "iris", | |
"holdConnection": 10, | |
"Check Connection": true, | |
"x": 610, | |
"y": 780, | |
"wires": [ | |
[ | |
"a5d1ace2489b51a6", | |
"1910e7efa2db55c2" | |
] | |
] | |
}, | |
{ | |
"id": "0b9121f4def96bfb", | |
"type": "comment", | |
"z": "769fc82c20b96ef6", | |
"name": "Select all Persons from Utah above 30", | |
"info": "", | |
"x": 320, | |
"y": 740, | |
"wires": [] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment