public void AddFlowNodeDef(BaseFlowNode node)
        {
            var evt = new FlowNodeDefCreatedEvent(Guid.NewGuid().ToString(), AggregateId, Version + 1, JsonConvert.SerializeObject(node), DateTime.UtcNow);

            Handle(evt);
            DomainEvents.Add(evt);
        }
        private void Handle(FlowNodeDefCreatedEvent evt)
        {
            var elt = SerializedFlowNodeDefinition.Create(evt.SerializedContent);

            SerializedElementDefs.Add(elt);
            Version        = evt.Version;
            UpdateDateTime = evt.UpdateDateTime;
        }
        private void Handle(FlowNodeDefCreatedEvent evt)
        {
            var elt = BaseFlowNode.Deserialize(evt.SerializedContent);

            ElementDefs.Add(elt);
            Version        = evt.Version;
            UpdateDateTime = evt.UpdateDateTime;
        }