public WorkingMemoryReteAssertAction(MarshallerReaderContext context, Action _action) { Assert _assert = _action.getAssert(); this.factHandle = context.handles.get( _assert.getHandleId() ); this.removeLogical = _assert.getRemoveLogical(); this.updateEqualsMap = _assert.getUpdateEqualsMap(); if ( _assert.hasTuple() ) { String pkgName = _assert.getOriginPkgName(); String ruleName = _assert.getOriginRuleName(); Package pkg = context.ruleBase.getPackage( pkgName ); this.ruleOrigin = pkg.getRule( ruleName ); this.leftTuple = context.filter.getTuplesCache().get( PersisterHelper.createActivationKey( pkgName, ruleName, _assert.getTuple() ) ); } }
private static void readInitialFactHandle(MarshallerReaderContext context, RuleData _session ) { int ifhId = context.wm.getInitialFactHandle().getId(); context.handles.put( ifhId, context.wm.getInitialFactHandle() ); // special case we have to handle for the initial fact boolean initialFactPropagated = true; for ( ProtobufMessages.ActionQueue.Action _action : _session.getActionQueue().getActionList() ) { if( _action.getType() == ProtobufMessages.ActionQueue.ActionType.ASSERT ) { if( _action.getAssert().getHandleId() == ifhId ) { initialFactPropagated = false; break; } } } if( initialFactPropagated ) { assertHandleIntoOTN( context, context.wm, context.wm.getInitialFactHandle() ); } }
public Builder mergeFrom(org.drools.marshalling.impl.ProtobufMessages.ActionQueue.Assert other) { if (other == org.drools.marshalling.impl.ProtobufMessages.ActionQueue.Assert.getDefaultInstance()) return this; if (other.hasHandleId()) { setHandleId(other.getHandleId()); } if (other.hasRemoveLogical()) { setRemoveLogical(other.getRemoveLogical()); } if (other.hasUpdateEqualsMap()) { setUpdateEqualsMap(other.getUpdateEqualsMap()); } if (other.hasOriginPkgName()) { bitField0_ |= 0x00000008; originPkgName_ = other.originPkgName_; onChanged(); } if (other.hasOriginRuleName()) { bitField0_ |= 0x00000010; originRuleName_ = other.originRuleName_; onChanged(); } if (other.hasTuple()) { mergeTuple(other.getTuple()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }