using System.Collections.Generic; using System.Linq; using Flowsharp.Activities; using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Flowsharp.Models { public class Workflow { public Workflow(IEnumerable activities, IEnumerable connections) : this() { Activities = activities.ToList(); Connections = connections.ToList(); } public Workflow() { CurrentScope = new WorkflowExecutionScope(); Scopes = new Stack(new[]{ CurrentScope }); Arguments = new Variables(); BlockingActivities = new List(); } public WorkflowStatus Status { get; set; } public IList Activities { get; set; } = new List(); public IList Connections { get; set; } = new List(); public Stack Scopes { get; set; } public WorkflowExecutionScope CurrentScope { get; set; } public Variables Arguments { get; set; } public IList BlockingActivities { get; set; } } }