从引擎中得到状态机实例
|
Dim 状态机实例 As StateMachineWorkflowInstance 状态机实例= New StateMachineWorkflowInstance(Me.引擎, Me.当前操作的实例.InstanceId) |
得到工作流的状态列表
|
下拉菜单.Items.Clear() Dim 状态集合 As ReadOnlyCollection(Of StateActivity) = 状态机实例.States For Each temp As StateActivity In 状态集合 下拉菜单.Items.Add(temp.Name) Next |
改变状态
|
Dim 状态名As String = 下拉菜单.SelectedItem.ToString() 状态机实例.SetState(状态名) |
显示当前状态
|
状态机实例.CurrentStateName |