-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroot_rule_chain.json
172 lines (172 loc) · 4.71 KB
/
root_rule_chain.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{
"ruleChain": {
"additionalInfo": {
"description": ""
},
"name": "Root Rule Chain",
"type": "CORE",
"firstRuleNodeId": null,
"root": false,
"debugMode": true,
"configuration": null,
"externalId": null
},
"metadata": {
"firstNodeIndex": 5,
"nodes": [
{
"additionalInfo": {
"layoutX": 824,
"layoutY": 156
},
"type": "org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode",
"name": "Save Timeseries",
"debugMode": false,
"configuration": {
"defaultTTL": 0
},
"externalId": null
},
{
"additionalInfo": {
"layoutX": 825,
"layoutY": 52
},
"type": "org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode",
"name": "Save Client Attributes",
"debugMode": false,
"configuration": {
"scope": "CLIENT_SCOPE",
"notifyDevice": "false"
},
"externalId": null
},
{
"additionalInfo": {
"layoutX": 347,
"layoutY": 149
},
"type": "org.thingsboard.rule.engine.filter.TbMsgTypeSwitchNode",
"name": "Message Type Switch",
"debugMode": false,
"configuration": {
"version": 0
},
"externalId": null
},
{
"additionalInfo": {
"layoutX": 825,
"layoutY": 379
},
"type": "org.thingsboard.rule.engine.action.TbLogNode",
"name": "Log Other",
"debugMode": false,
"configuration": {
"scriptLang": "TBEL",
"jsScript": "return '\\nIncoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);",
"tbelScript": "return '\\nIncoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);"
},
"externalId": null
},
{
"additionalInfo": {
"layoutX": 825,
"layoutY": 468
},
"type": "org.thingsboard.rule.engine.rpc.TbSendRPCRequestNode",
"name": "RPC Call Request",
"debugMode": false,
"configuration": {
"timeoutInSeconds": 60
},
"externalId": null
},
{
"additionalInfo": {
"description": "Process incoming messages from devices with the alarm rules defined in the device profile. Dispatch all incoming messages with \"Success\" relation type.",
"layoutX": 204,
"layoutY": 240
},
"type": "org.thingsboard.rule.engine.profile.TbDeviceProfileNode",
"name": "Device Profile Node",
"debugMode": false,
"configuration": {
"persistAlarmRulesState": false,
"fetchAlarmRulesStateOnStart": false
},
"externalId": null
},
{
"additionalInfo": {
"description": "",
"layoutX": 770,
"layoutY": 240
},
"type": "org.thingsboard.rule.engine.transform.TbTransformMsgNode",
"name": "rpc",
"debugMode": false,
"configuration": {
"scriptLang": "TBEL",
"jsScript": "return {msg: msg, metadata: metadata, msgType: msgType};",
"tbelScript": "var rpcResponse;\nif (msg.method === \"getCurrentTime\"){\n rpcResponse = new Date().getTime();\n} else {\n rpcResponse = \"Unknown RPC request method: \" + msg.method; \n}\nreturn {msg: rpcResponse, metadata: metadata, msgType: msgType};"
},
"externalId": null
},
{
"additionalInfo": {
"description": "",
"layoutX": 1053,
"layoutY": 305
},
"type": "org.thingsboard.rule.engine.rpc.TbSendRPCReplyNode",
"name": "reply",
"debugMode": false,
"configuration": {
"serviceIdMetaDataAttribute": "serviceId",
"sessionIdMetaDataAttribute": "sessionId",
"requestIdMetaDataAttribute": "requestId"
},
"externalId": null
}
],
"connections": [
{
"fromIndex": 2,
"toIndex": 0,
"type": "Post telemetry"
},
{
"fromIndex": 2,
"toIndex": 1,
"type": "Post attributes"
},
{
"fromIndex": 2,
"toIndex": 3,
"type": "Other"
},
{
"fromIndex": 2,
"toIndex": 4,
"type": "RPC Request to Device"
},
{
"fromIndex": 2,
"toIndex": 6,
"type": "RPC Request from Device"
},
{
"fromIndex": 5,
"toIndex": 2,
"type": "Success"
},
{
"fromIndex": 6,
"toIndex": 7,
"type": "Success"
}
],
"ruleChainConnections": null
}
}