WorkflowChanges.TransientWorkflow 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
변경한 다음 실행 중인 워크플로 인스턴스에 변경 내용을 적용할 수 있는 복제된 활동 트리를 반환합니다.
public:
property System::Workflow::ComponentModel::CompositeActivity ^ TransientWorkflow { System::Workflow::ComponentModel::CompositeActivity ^ get(); };
public System.Workflow.ComponentModel.CompositeActivity TransientWorkflow { get; }
member this.TransientWorkflow : System.Workflow.ComponentModel.CompositeActivity
Public ReadOnly Property TransientWorkflow As CompositeActivity
속성 값
워크플로에 대한 복제된 루트 활동을 포함하는 CompositeActivity입니다.
예제
다음 예제에서는 TransientWorkflow 속성에 활동을 추가하는 방법을 보여 줍니다. 이 예제는 Ordering State Machine SDK 샘플에 포함되어 있습니다. 자세한 내용은 Ordering State Machine 샘플합니다.
// Create a new instance of the WorkflowChanges class for managing
// the in-memory changes to the workflow
WorkflowChanges changes = new WorkflowChanges(root);
// Create a new State activity to the workflow
StateActivity orderOnHoldState = new StateActivity();
orderOnHoldState.Name = "OrderOnHoldState";
// Add a new EventDriven activity to the State
EventDrivenActivity eventDrivenDelay = new EventDrivenActivity();
eventDrivenDelay.Name = "DelayOrderEvent";
orderOnHoldState.Activities.Add(eventDrivenDelay);
// Add a new Delay, initialized to 5 seconds
DelayActivity delayOrder = new DelayActivity();
delayOrder.Name = "delayOrder";
delayOrder.TimeoutDuration = new TimeSpan(0, 0, 5);
eventDrivenDelay.Activities.Add(delayOrder);
// Add a new SetState to the OrderOpenState
SetStateActivity setStateOrderOpen = new SetStateActivity();
setStateOrderOpen.TargetStateName = "OrderOpenState";
eventDrivenDelay.Activities.Add(setStateOrderOpen);
// Add the OnHoldState to the workflow
changes.TransientWorkflow.Activities.Add(orderOnHoldState);
' Create a new instance of the WorkflowChanges class for managing
' the in-memory changes to the workflow
Dim changes As New WorkflowChanges(root)
' Create a new State activity to the workflow
Dim orderOnHoldState As New StateActivity()
orderOnHoldState.Name = "OrderOnHoldState"
' Add a new EventDriven activity to the State
Dim eventDrivenDelay As New EventDrivenActivity()
eventDrivenDelay.Name = "DelayOrderEvent"
orderOnHoldState.Activities.Add(eventDrivenDelay)
' Add a new Delay, initialized to 5 seconds
Dim delayOrder As New DelayActivity()
delayOrder.Name = "delayOrder"
delayOrder.TimeoutDuration = New TimeSpan(0, 0, 5)
eventDrivenDelay.Activities.Add(delayOrder)
' Add a new SetState to the OrderOpenState
Dim setStateOrderOpen As New SetStateActivity()
setStateOrderOpen.TargetStateName = "OrderOpenState"
eventDrivenDelay.Activities.Add(setStateOrderOpen)
' Add the OnHoldState to the workflow
changes.TransientWorkflow.Activities.Add(orderOnHoldState)