elsa-core/src/Flowsharp.Abstractions/Models/Workflow.cs

33 lines
1.2 KiB
C#
Raw Normal View History

2018-10-14 10:24:36 +00:00
using System.Collections.Generic;
using System.Linq;
2018-10-15 12:15:36 +00:00
using Flowsharp.Activities;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
2018-10-14 10:24:36 +00:00
2018-10-15 12:15:36 +00:00
namespace Flowsharp.Models
2018-10-14 10:24:36 +00:00
{
public class Workflow
{
public Workflow(IEnumerable<IActivity> activities, IEnumerable<Connection> connections) : this()
2018-10-14 10:24:36 +00:00
{
Activities = activities.ToList();
2018-10-14 11:49:29 +00:00
Connections = connections.ToList();
2018-10-14 10:24:36 +00:00
}
public Workflow()
{
CurrentScope = new WorkflowExecutionScope();
Scopes = new Stack<WorkflowExecutionScope>(new[]{ CurrentScope });
Arguments = new Variables();
2018-10-16 13:00:25 +00:00
BlockingActivities = new List<IActivity>();
}
public WorkflowStatus Status { get; set; }
2018-10-14 10:24:36 +00:00
public IList<IActivity> Activities { get; set; } = new List<IActivity>();
public IList<Connection> Connections { get; set; } = new List<Connection>();
2018-10-14 11:49:29 +00:00
public Stack<WorkflowExecutionScope> Scopes { get; set; }
public WorkflowExecutionScope CurrentScope { get; set; }
public Variables Arguments { get; set; }
2018-10-16 13:00:25 +00:00
public IList<IActivity> BlockingActivities { get; set; }
2018-10-14 10:24:36 +00:00
}
}