private void Handle(OnPartEvtConsumedEvent evt) { var source = GetChild(evt.SourceElementId); var target = GetCasePlanItem(evt.ElementId); Consume(source.EltId, target.EntryCriterions, evt); Consume(source.EltId, target.ExitCriterions, evt); }
private void Consume(string sourceEltId, ICollection <Criteria> criterias, OnPartEvtConsumedEvent evt) { var parts = GetOnParts(sourceEltId, criterias, evt.Transitions); foreach (var part in parts) { var transition = evt.Transitions.FirstOrDefault(tr => tr.Transition == part.StandardEvent); part.Consume(transition.IncomingTokens); } }
public void ConsumeTransitionEvts(BaseCaseEltInstance node, string sourceElementId, ICollection <IncomingTransition> transitions) { var source = GetChild(sourceElementId); var target = GetCasePlanItem(node.Id); var onParts = new List <IOnPart>(); onParts.AddRange(GetOnParts(source.EltId, target.EntryCriterions, transitions)); onParts.AddRange(GetOnParts(source.EltId, target.ExitCriterions, transitions)); if (!onParts.Any()) { return; } var evt = new OnPartEvtConsumedEvent(Guid.NewGuid().ToString(), AggregateId, Version + 1, node.Id, sourceElementId, transitions); Handle(evt); DomainEvents.Add(evt); }