Example #1
0
        public static V1WorkflowActivityCollectionState OnAddV1WorkflowInstance(V1WorkflowActivityCollectionState state, AddV1WorkflowInstance action)
        {
            var activities  = (action.WorkflowInstance.Activities ?? new Collection <V1WorkflowActivity>()).AsEnumerable();
            var activityIds = activities.Select(activity => activity.Id).ToList();

            activities = activities.Concat(state.Where(activity => !activityIds.Contains(activity.Id)));
            return(new(activities));
        }
Example #2
0
 public static V1WorkflowInstanceCollectionState OnAddV1WorkflowInstance(V1WorkflowInstanceCollectionState state, AddV1WorkflowInstance action)
 {
     state.Add(action.WorkflowInstance);
     return(state);
 }