Share via


WorkflowInstance.ApplyWorkflowChanges(WorkflowChanges) Metodo

Definizione

Applica modifiche all'istanza del flusso di lavoro specificata dall'oggetto WorkflowChanges.

public:
 void ApplyWorkflowChanges(System::Workflow::ComponentModel::WorkflowChanges ^ workflowChanges);
public void ApplyWorkflowChanges (System.Workflow.ComponentModel.WorkflowChanges workflowChanges);
member this.ApplyWorkflowChanges : System.Workflow.ComponentModel.WorkflowChanges -> unit
Public Sub ApplyWorkflowChanges (workflowChanges As WorkflowChanges)

Parametri

workflowChanges
WorkflowChanges

Un oggetto WorkflowChanges che specifica aggiornamenti dinamici per l'istanza del flusso di lavoro.

Eccezioni

Il motore di runtime del flusso di lavoro non è in esecuzione.

Esempio

Nell'esempio di codice seguente viene illustrata la chiamata a ApplyWorkflowChanges per un oggetto WorkflowInstance. Questo esempio di codice fa parte dell'esempio SDK Ordering State Machine nel file Mainform.cs. Per altre informazioni, vedere l'esempio di Macchina a stati di ordinamento.

// Apply the changes to the workflow instance
try
{
    instance.ApplyWorkflowChanges(changes);
}
catch (WorkflowValidationFailedException)
{
    // New state has already been added
    MessageBox.Show("On Hold state has already been added to this workflow.");
}
' Apply the changes to the workflow instance
Try
    instance.ApplyWorkflowChanges(changes)
Catch e As WorkflowValidationFailedException
    ' New state has already been added
    MessageBox.Show("On Hold state has already been added to this workflow.")
End Try

Commenti

Se l'istanza del flusso di lavoro non è già stata sospesa, il motore di runtime del flusso di lavoro sospende temporaneamente l'istanza prima di applicare le modifiche.

Si applica a