引擎的OnWorkflowIdled事件 SharedSub OnWorkflowIdled()Sub OnWorkflowIdled(ByVal sender AsObject, ByVal e As WorkflowEventArgs) Dim 实例 As WorkflowInstance = e.WorkflowInstance Dim 根 As Activity = 实例.GetWorkflowDefinition() Dim 修改对象 As WorkflowChanges =New WorkflowChanges(根) Dim obj As Activity = 修改对象.TransientWorkflow.Activities("挂起") Dim temp As CompositeActivity =CType(修改对象.TransientWorkflow, CompositeActivity) temp.Activities.Remove(obj) 实例.ApplyWorkflowChanges(修改对象) End Sub