transaction data init fix

This commit is contained in:
Dima Landiak 2018-12-04 12:34:20 +02:00
parent 9e3a0584e6
commit ae42bb4fee
2 changed files with 3 additions and 3 deletions

View File

@ -54,9 +54,9 @@ public class TbTransactionBeginNode implements TbNode {
@Override @Override
public void onMsg(TbContext ctx, TbMsg msg) throws ExecutionException, InterruptedException, TbNodeException { public void onMsg(TbContext ctx, TbMsg msg) throws ExecutionException, InterruptedException, TbNodeException {
log.trace("Msg in - [{}] [{}]", msg.getId(), msg.getType()); log.trace("Msg enters transaction - [{}] [{}]", msg.getId(), msg.getType());
TbMsgTransactionData transactionData = new TbMsgTransactionData(UUID.randomUUID(), msg.getOriginator()); TbMsgTransactionData transactionData = new TbMsgTransactionData(msg.getId(), msg.getOriginator());
TbMsg tbMsg = new TbMsg(msg.getId(), msg.getType(), msg.getOriginator(), msg.getMetaData(), TbMsgDataType.JSON, TbMsg tbMsg = new TbMsg(msg.getId(), msg.getType(), msg.getOriginator(), msg.getMetaData(), TbMsgDataType.JSON,
msg.getData(), transactionData, msg.getRuleChainId(), msg.getRuleNodeId(), msg.getClusterPartition()); msg.getData(), transactionData, msg.getRuleChainId(), msg.getRuleNodeId(), msg.getClusterPartition());

View File

@ -56,7 +56,7 @@ public class TbTransactionEndNode implements TbNode {
if (!isFailed) { if (!isFailed) {
ctx.tellNext(msg, SUCCESS); ctx.tellNext(msg, SUCCESS);
} }
log.trace("Msg out - [{}] [{}]", msg.getId(), msg.getType()); log.trace("Msg left transaction - [{}] [{}]", msg.getId(), msg.getType());
} }
@Override @Override