WorkflowInstance.GetWorkflowDefinition Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the root activity for this workflow instance.
public:
System::Workflow::ComponentModel::Activity ^ GetWorkflowDefinition();
public System.Workflow.ComponentModel.Activity GetWorkflowDefinition ();
member this.GetWorkflowDefinition : unit -> System.Workflow.ComponentModel.Activity
Public Function GetWorkflowDefinition () As Activity
Returns
An Activity object.
Examples
The following example demonstrates retrieving the workflow definition from a workflow instance. This example is from the Ordering State Machine SDK sample, from the Mainform.cs file. For more information, see the Ordering State Machine Sample.
// Get a reference to the root activity for the workflow
Activity root = instance.GetWorkflowDefinition();
' Get a reference to the root activity for the workflow
Dim root As Activity = instance.GetWorkflowDefinition()
Remarks
You can use the root activity to navigate the activity hierarchy of the workflow.
This method is not thread safe, so the host should synchronize its calls to this method.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기