示例#1
0
        public void UpdatePayload(string payload)
        {
            var evt = new ProcessFilePayloadUpdatedEvent(Guid.NewGuid().ToString(), AggregateId, Version, payload, DateTime.UtcNow);

            Handle(evt);
            DomainEvents.Add(evt);
        }
示例#2
0
        private void Handle(ProcessFilePayloadUpdatedEvent evt)
        {
            try
            {
                BPMNParser.Parse(evt.Payload);
            }
            catch
            {
                throw new AggregateValidationException(new List <KeyValuePair <string, string> >
                {
                    new KeyValuePair <string, string>("validation", Global.BPMNFileNotValid)
                });
            }

            Payload        = evt.Payload;
            UpdateDateTime = evt.UpdateDateTime;
        }