RpcResponseRuleChainMetadata.json
1.4 KB
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
{
"firstNodeIndex": 0,
"nodes": [
{
"additionalInfo": {
"layoutX": 325,
"layoutY": 150
},
"type": "org.thingsboard.rule.engine.filter.TbMsgTypeSwitchNode",
"name": "msgTypeSwitch",
"debugMode": true,
"configuration": {
"version": 0
}
},
{
"additionalInfo": {
"layoutX": 60,
"layoutY": 300
},
"type": "org.thingsboard.rule.engine.transform.TbTransformMsgNode",
"name": "formResponse",
"debugMode": true,
"configuration": {
"jsScript": "if (msg.method == \"getResponse\") {\n return {msg: {\"response\": \"requestReceived\"}, metadata: metadata, msgType: msgType};\n}\n\nreturn {msg: msg, metadata: metadata, msgType: msgType};"
}
},
{
"additionalInfo": {
"layoutX": 450,
"layoutY": 300
},
"type": "org.thingsboard.rule.engine.rpc.TbSendRPCReplyNode",
"name": "rpcReply",
"debugMode": true,
"configuration": {
"requestIdMetaDataAttribute": "requestId"
}
}
],
"connections": [
{
"fromIndex": 0,
"toIndex": 1,
"type": "RPC Request from Device"
},
{
"fromIndex": 1,
"toIndex": 2,
"type": "Success"
},
{
"fromIndex": 1,
"toIndex": 2,
"type": "Failure"
}
],
"ruleChainConnections": null
}