Share via


Stored Procedures

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Workflow Services for SQL Server contain stored procedures for the workflow applications. The stored procedures implement key application events and provide a consistent set of primitives for developers who want to modify workflow applications using generic database clients.

The action of the stored procedures is limited to managing the schema, permissions, and administration tasks of application databases. It does not provide support for inserting data, such as workflow steps or lookup values, into user tables. Insert operations such as these should be done using Transact SQL.

For more information about stored procedures and triggers, see the SQL Server Books Online.

Schema Administration Procedures

The following procedures perform basic functions in a workflow-enabled database, such as creating and removing database objects and setting properties.

Procedure Database Comments
modAddTable Workflow-Enabled Registers a user table in the application database schema.
modCreateProcedures modSystem Creates the stored procedures in a workflow-enabled database.
modCreateSchema modSystem Creates the core tables and views in a workflow-enabled database.
modDropProcedures modSystem Removes all the application-stored procedures from a workflow-enabled database.
modDropSchema modSystem Removes all the tables and views from a workflow-enabled database.
modGetProperty modSystem Returns a property in a workflow-enabled table.
modInsertObjects Workflow-Enabled Adds an entry in the modObjects table.
modProcessTable Workflow-Enabled Adds core features to a user table.
modRemoveAllObjects Workflow-Enabled Removes all core features from a user table.
modRemoveTable Workflow-Enabled Removes the registration of a user table.
modSetProperty modSystem Sets a property in a workflow-enabled table.
modSyncUserListNow modSystem Synchronizes the User Directory in the modUserList table.

Application Information Procedures

The following procedures return information about the workflow application and its users.

Procedure Database Comments
modGetAppInfo modSystem Returns registration properties for a specified application.
modListApplications modSystem Lists all registered workflow applications.
modListTemplates modSystem Lists all registered templates.
modUserExists modSystem Tests the existence of a specific user.

Workflow Procedures

The following procedures perform actions related to the workflow process.

Procedure Database Comments
modExecuteTimeoutEvents modSystem Executes Expiry events in workflow-enabled databases registered on the server.
modRemoveWorkflow Workflow-Enabled Removes the workflow registration for a user table.
xp_modWFDrop Master Discards the information cached by the workflow engine.
xp_modWFEval Master Retrieves the workflow rules and permissions for the table and evaluates whether a transition should be allowed.
xp_modWFShutdown Master Stops the workflow engine component.

Security Procedures

The following procedures validate and perform actions related to security features for row-level permissions and workflow events.

Procedure Database Comments
modDropRowPermissions Workflow-Enabled Removes row-level permissions for a database role or for all roles.
modEnumRowPermissions Workflow-Enabled Lists row-level permissions for a database role.
modGetExecutePermissions Workflow-Enabled Tests to determine whether a user has execute permissions on a workflow event.
modGetPermissionsJoinColumn Workflow-Enabled Returns the name of the numeric column used to identify uniquely the row in the permissions table.
modGrantRowPermissions Workflow-Enabled Sets row-level permissions for a database role.

See Also

Workflow Application Infrastructure | ModSystem Database Tables | Workflow-Enabled Database Tables | Views