public Task Update(Domains.CasePlanInstanceAggregate workflowInstance, CancellationToken token)
        {
            var instance = _instances.First(i => i.AggregateId == workflowInstance.AggregateId);

            _instances.Remove(instance);
            _instances.Add((Domains.CasePlanInstanceAggregate)workflowInstance.Clone());
            return(Task.CompletedTask);
        }
 public Task Add(Domains.CasePlanInstanceAggregate workflowInstance, CancellationToken token)
 {
     _instances.Add((Domains.CasePlanInstanceAggregate)workflowInstance.Clone());
     return(Task.CompletedTask);
 }