private void Handle(ExecutionPathCreatedEvent evt) { var path = new ExecutionPath { Id = evt.ExecutionPathId, CreateDateTime = evt.CreateDateTime }; ExecutionPathLst.Add(path); Version = evt.Version; UpdateDateTime = evt.CreateDateTime; }
private void ConsumeMessage(ExecutionPath executionPath, MessageToken messageToken) { foreach (var pointer in executionPath.ActivePointers) { var nodeDef = GetDefinition(pointer.FlowNodeId) as BaseCatchEvent; if (nodeDef == null) { continue; } if (nodeDef.EventDefinitions.Any(_ => _.IsSatisfied(this, messageToken))) { var tokens = new List <MessageToken> { messageToken }; var evt = new IncomingTokenAddedEvent(Guid.NewGuid().ToString(), AggregateId, Version + 1, executionPath.Id, pointer.Id, JsonConvert.SerializeObject(tokens), DateTime.UtcNow); Handle(evt); DomainEvents.Add(evt); } } }