コード例 #1
0
        public void UpdateState(FlowNodeInstance instance, ActivityStates state, string message = null)
        {
            var evt = new ActivityStateUpdatedEvent(Guid.NewGuid().ToString(), AggregateId, Version + 1, instance.EltId, state, message, DateTime.UtcNow);

            Handle(evt);
            DomainEvents.Add(evt);
        }
コード例 #2
0
        private void Handle(ActivityStateUpdatedEvent evt)
        {
            var instance = GetInstance(evt.FlowNodeInstanceId);

            instance.UpdateState(evt.State, evt.UpdateDateTime, evt.Message);
            Version        = evt.Version;
            UpdateDateTime = evt.UpdateDateTime;
        }