Share via


SysWorkflowTable::saveWorkflow Method

Microsoft internal use only.

Syntax

server public static WorkflowInstanceNumber saveWorkflow(
    SysWorkflowInstanceContext _instanceContext, 
   [WorkflowUser _originator, 
    WorkflowUser _submitter])

Run On

Server

Parameters

Return Value

Type: WorkflowInstanceNumber Extended Data Type
The WorkflowInstanceNumber value.

Exceptions

Exception Condition
Deadlock

A deadlock occurred.

UpdateConflict

An update conflict occurred.

UpdateConflictNotRecovered

An update conflict could not be recovered.

Error

The _instanceContext is null Nothing nullptr unit a null reference (Nothing in Visual Basic) .

-or-

The _instanceContext is null Nothing nullptr unit a null reference (Nothing in Visual Basic) .

The workflow cannot be saved because the affinity workflow runtime instance trying to save the workflow does not match the affinity of the workflow runtime that locked the workflow.

-or-

The _instanceContext is null Nothing nullptr unit a null reference (Nothing in Visual Basic) .

The workflow cannot be saved because the affinity workflow runtime instance trying to save the workflow does not match the affinity of the workflow runtime that locked the workflow.

The workflow cannot be saved because it is not locked.

Deadlock

A deadlock occurred.

UpdateConflict

An update conflict occurred.

UpdateConflictNotRecovered

An update conflict could not be recovered.

Error

The _instanceContext is null Nothing nullptr unit a null reference (Nothing in Visual Basic) .

-or-

The workflow cannot be saved because the affinity workflow runtime instance trying to save the workflow does not match the affinity of the workflow runtime that locked the workflow.

-or-

The workflow cannot be saved because it is not locked.

Remarks

This method saves a serialized workflow to the SysWorkflowTable table and the SysWorkflowInstanceTable table.

The serialized workflow is stored as data in container. Therefore, the SysWorkflowTable table has been transformed to improve performance. The SysWorkflowTable table contains the data that is frequently accessed by the system, and the SysWorkflowInstanceTable contains the container data. For create method, update method, and the delete method, the tables are treated as a single table.

See Also

Reference

SysWorkflowTable Table