WorkflowChanges.TransientWorkflow Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Değişikliklerin yapılıp çalışan iş akışı örneğine uygulanabileceği kopyalanmış bir etkinlik ağacı döndürür.
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
Özellik Değeri
CompositeActivity İş akışı için kopyalanan kök etkinliğini içeren bir.
Örnekler
Aşağıdaki örnek, TransientWorkflow özelliğine etkinlik eklemeyi gösterir. Bu örnek, Durum Makinesi SDK'sını Sıralama örneğindendir. Daha fazla bilgi için bkz . Durum Makinesi Örneğini Sıralama.
// 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)