Table of Contents

Class BusinessProcessflow

Namespace
CMS.Plugin.FlowManagement.Abstractions.FlowBusiness
Assembly
CMS.Plugin.FlowManagement.Abstractions.dll

业务流程的对象

public class BusinessProcessflow : Processflow, IProcessflow
Inheritance
Processflow
BusinessProcessflow
Implements
IProcessflow
Inherited Members
Processflow.name
Processflow.description
Processflow.root
Processflow.transitions
Processflow.activities
Processflow.dataitems
Processflow.m_LevelCode
Processflow.GetAdjacentActivities(IActivityRow, Processflow.AdjacentDirector)
Processflow.CheckTransitions(ITransition, TransitionJoinType, ProcessflowEventArgs)
Processflow.PrepareArgs()
Processflow.Name
Processflow.Description
Processflow.Root
Processflow.Activities
Processflow.Transitions
Processflow.DataItems
Processflow.this[IActivityRow, IActivityRow]

Constructors

BusinessProcessflow(IProcessflowBuilder)

通过ProcessflowBuilder构建流程

public BusinessProcessflow(IProcessflowBuilder wb)

Parameters

wb IProcessflowBuilder

Properties

CancellationTokenSource

流程取消令牌源

public CancellationTokenSource CancellationTokenSource { get; }

Property Value

CancellationTokenSource

CaseId

流程实例标识

[DataMember]
public string CaseId { get; set; }

Property Value

string

CategoryName

记录器生成的消息的类别名称。

public string CategoryName { get; set; }

Property Value

string

CurrentTask

当前任务数据

public FlowItem CurrentTask { get; }

Property Value

FlowItem

CurrentTaskId

当前任务号

[DataMember]
public int CurrentTaskId { get; set; }

Property Value

int

CurrentTaskName

当前任务名称

[DataMember]
public string CurrentTaskName { get; set; }

Property Value

string

Instance

流程实例数据

public FlowInstance Instance { get; }

Property Value

FlowInstance

Logger

public IFlowLogger Logger { get; set; }

Property Value

IFlowLogger

Metrics

public ILmesMetrics Metrics { get; }

Property Value

ILmesMetrics

ProcessflowBuilder

public IProcessflowBuilder ProcessflowBuilder { get; }

Property Value

IProcessflowBuilder

ServiceProvider

public IServiceProvider ServiceProvider { get; }

Property Value

IServiceProvider

TraceLogger

public IFlowLogger TraceLogger { get; set; }

Property Value

IFlowLogger

Methods

AddTask(FlowItem[], Activity)

向事务处理池中添加一条记录:有分支流程的处理情况

public void AddTask(FlowItem[] rows, Activity sender)

Parameters

rows FlowItem[]
sender Activity

FinishFlowAsync()

完成流程

public Task FinishFlowAsync()

Returns

Task

GetCategoryName()

Gets the name of the category.

public string GetCategoryName()

Returns

string

LastActivitie(IActivityRow)

获得迁入步骤的信息 AdjacentDirector.AdjacentTo:迁入当前环节

public Hashtable LastActivitie(IActivityRow row)

Parameters

row IActivityRow

Returns

Hashtable

Key:ActivityName,Value:Transaction

NextActivity(Activity)

获得后续步骤的信息 AdjacentDirector.AdjacentFrom:从当前环节签出

public Hashtable NextActivity(Activity row)

Parameters

row Activity

Returns

Hashtable

Key:ActivityName,Value:Transaction

OnTaskAdded(object, EventArgs)

当环节进入产生工作项时,出发TaskAdded事件

public void OnTaskAdded(object sender, EventArgs e)

Parameters

sender object
e EventArgs

OnTaskDeleted(object, EventArgs)

当删除工作项时,触发TaskDeleted事件

public void OnTaskDeleted(object sender, EventArgs e)

Parameters

sender object
e EventArgs

OnTaskUpdated(object, EventArgs)

当更新工作项时,触发TaskUpdated事件

public void OnTaskUpdated(object sender, EventArgs e)

Parameters

sender object
e EventArgs

RemoveExtAttributes()

public void RemoveExtAttributes()

ResetEventAsync(bool, string)

Resets the event.

public Task<bool> ResetEventAsync(bool needTagChange = false, string currentActivity = null)

Parameters

needTagChange bool

if set to true [need tag change].

currentActivity string

Returns

Task<bool>

RunAsync(string)

启动流程运算

public Task<string> RunAsync(string currentActivity)

Parameters

currentActivity string

Returns

Task<string>

RunAsync(string, ProcessflowEventArgs)

启动流程运算

public Task<string> RunAsync(string currentActivity, ProcessflowEventArgs args)

Parameters

currentActivity string
args ProcessflowEventArgs

Returns

Task<string>

SaveEventAsync()

public Task SaveEventAsync()

Returns

Task

UpdateCurrentTask()

更新当前的工作项,设置当前的工作项为已完成

protected void UpdateCurrentTask()

Events

OnEnterAsync

步骤进入时触发的事件

public event FlowEventHandler OnEnterAsync

Event Type

FlowEventHandler

OnExecuteAsync

步骤运算时触发的事件

public event FlowEventHandler OnExecuteAsync

Event Type

FlowEventHandler

OnExitAsync

步骤退出时触发的事件

public event FlowEventHandler OnExitAsync

Event Type

FlowEventHandler

OnResetEventAsync

重置时触发的事件

public event Func<bool, Task<bool>> OnResetEventAsync

Event Type

Func<bool, Task<bool>>

OnSaveEventAsync

保存时触发的事件

public event Func<Task> OnSaveEventAsync

Event Type

Func<Task>

TaskAdded

添加了新的工作项

public event EventHandler TaskAdded

Event Type

EventHandler

TaskDeleted

删除了旧的工作项

public event EventHandler TaskDeleted

Event Type

EventHandler

TaskUpdated

更新了旧的工作项

public event EventHandler TaskUpdated

Event Type

EventHandler