|
|
|
@ -113,7 +113,7 @@ public class TbSendRPCRequestNode implements TbNode { |
|
|
|
ctx.getRpcService().sendRpcRequestToDevice(request, ruleEngineDeviceRpcResponse -> { |
|
|
|
if (!ruleEngineDeviceRpcResponse.getError().isPresent()) { |
|
|
|
TbMsg next = ctx.newMsg(msg.getQueueName(), msg.getType(), msg.getOriginator(), msg.getMetaData(), ruleEngineDeviceRpcResponse.getResponse().orElse("{}")); |
|
|
|
ctx.enqueueForTellNext(next, TbRelationTypes.SUCCESS); |
|
|
|
ctx.enqueueForTellNext(next, next.getQueueName(), TbRelationTypes.SUCCESS, null, null); |
|
|
|
} else { |
|
|
|
TbMsg next = ctx.newMsg(msg.getQueueName(), msg.getType(), msg.getOriginator(), msg.getMetaData(), wrap("error", ruleEngineDeviceRpcResponse.getError().get().name())); |
|
|
|
ctx.tellFailure(next, new RuntimeException(ruleEngineDeviceRpcResponse.getError().get().name())); |
|
|
|
|