Fix for copy msg for 2 or more relations
This commit is contained in:
		
							parent
							
								
									5d30243eea
								
							
						
					
					
						commit
						3a38ed8d6a
					
				@ -56,6 +56,7 @@ import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
import java.util.UUID;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -291,7 +292,7 @@ public class RuleChainActorMessageProcessor extends ComponentMsgProcessor<RuleCh
 | 
			
		||||
                putToQueue(tpi, msg.copyWithRuleNodeId(entityId, new RuleNodeId(target.getId())), callbackWrapper);
 | 
			
		||||
                break;
 | 
			
		||||
            case RULE_CHAIN:
 | 
			
		||||
                putToQueue(tpi, msg.copyWithRuleChainId(new RuleChainId(target.getId())), callbackWrapper);
 | 
			
		||||
                putToQueue(tpi, msg.copyWithRuleChainId(new RuleChainId(target.getId()), UUID.randomUUID()), callbackWrapper);
 | 
			
		||||
                break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -195,11 +195,15 @@ public final class TbMsg implements Serializable {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public TbMsg copyWithRuleChainId(RuleChainId ruleChainId) {
 | 
			
		||||
        return new TbMsg(this.queueName, this.id, this.ts, this.type, this.originator, this.metaData, this.dataType, this.data, ruleChainId, null, this.ruleNodeExecCounter.get(), callback);
 | 
			
		||||
        return copyWithRuleChainId(ruleChainId, this.id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public TbMsg copyWithRuleChainId(RuleChainId ruleChainId, UUID msgId) {
 | 
			
		||||
        return new TbMsg(this.queueName, msgId, this.ts, this.type, this.originator, this.metaData, this.dataType, this.data, ruleChainId, null, this.ruleNodeExecCounter.get(), callback);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public TbMsg copyWithRuleNodeId(RuleChainId ruleChainId, RuleNodeId ruleNodeId) {
 | 
			
		||||
        return new TbMsg(this.queueName, this.id, this.ts, this.type, this.originator, this.metaData, this.dataType, this.data, ruleChainId, ruleNodeId, this.ruleNodeExecCounter.get(), callback);
 | 
			
		||||
        return new TbMsg(this.queueName, UUID.randomUUID(), this.ts, this.type, this.originator, this.metaData, this.dataType, this.data, ruleChainId, ruleNodeId, this.ruleNodeExecCounter.get(), callback);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public TbMsgCallback getCallback() {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user