Search

Search:

Namespace:

Search Result
.

http://msdn.microsoft.com/en-us/library/system.workflow.runtime.workflowinstance.applyworkflowchanges.aspx

.

Use the WorkflowChanges to create the changes and the ApplyWorkflowChanges to actually apply the change to the workflow.

.
        ApplyWorkflowChanges(changes);
.

The most important thing to notice is that the ApplyWorkflowChanges is the one that actually changes the running WorkflowInstance. And if the update fails for some reason an WorkflowValidationFailedException is thrown with a property Errors that is a collection of ValidationError objects.

.

Before using the ApplyWorkflowChanges function we can validate the changes. This will catch some, but not all possible, errors so just validating and removing the try/catch is not recommended.