46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace MW.WorkFlow
|
|||
|
|
{
|
|||
|
|
public enum WorkflowState
|
|||
|
|
{
|
|||
|
|
Created, // 工作流刚创建
|
|||
|
|
Running, // 工作流正在运行
|
|||
|
|
Paused, // 工作流已暂停
|
|||
|
|
Stopped, // 工作流已停止
|
|||
|
|
Completed, // 工作流已完成
|
|||
|
|
Canceled, // 工作流已取消
|
|||
|
|
Faulted // 工作流执行时发生异常
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class WorkflowExecutionPointer
|
|||
|
|
{
|
|||
|
|
public string WorkflowName { get; set; }
|
|||
|
|
public string FlowName { get; set; }
|
|||
|
|
public string ActivityName { get; set; }
|
|||
|
|
public string CurrentStepId { get; set; }
|
|||
|
|
public string NextStepId { get; set; }
|
|||
|
|
public DateTime UpdatedAt { get; set; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class WorkflowFaultInfo
|
|||
|
|
{
|
|||
|
|
public string WorkflowName { get; set; }
|
|||
|
|
public string FlowName { get; set; }
|
|||
|
|
public string ActivityName { get; set; }
|
|||
|
|
public string CurrentStepId { get; set; }
|
|||
|
|
public string ErrorMessage { get; set; }
|
|||
|
|
public DateTime OccurredAt { get; set; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public interface IWorkflowRuntimeTracker
|
|||
|
|
{
|
|||
|
|
void UpdateExecutionPointer(WorkflowExecutionPointer executionPointer);
|
|||
|
|
void ReportWorkflowFault(WorkflowFaultInfo faultInfo);
|
|||
|
|
}
|
|||
|
|
}
|