예제 #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;
        }