Share via


modProcessTable

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.

Enables workflow on a user table. If the table is not specified, it applies to all registered user tables in the workflow-enabled database. Exists in the workflow-enabled database.

 [@TableID =] 'tabgeid', 
[@KeepPermissions =] 'keep_perms',
[@BaseTablePermissions =] 'base_perms'

Parameters

  • [@TableID =] 'tabgeid'
    The ID of the table for which to enable workflow.
  • [@KeepPermissions =] 'keep_perms'
    If a base view for this table already exists, applies the existing permissions to the new base view.
  • [@BaseTablePermissions =] 'base_perms'
    When True, modifies base table permissions to make updates possible from data access pages. When False, does not change existing permissions on the base table.

Remarks

This is the core procedure used to apply workflow to a user table or a database. It can be called for a new table or for a table that has been processed already. For a table hierarchy, modProcessTable must be called for each table in the hierarchy.

The procedure first creates a base view on top of the user table, so the table can be available to the client application. If a base view already exists and 'KeepPermissions' is True, the procedure preserves view permissions.

If the Permissions flag has been set (in the Permissions column in the modObjects table), it generates the view definition to enforce row-level permissions for the user table.

If the user table has an associated workflow table, the procedure enforces the following features:

  • It creates the triggers that enforce workflow events on changes to the user tables or on Expiry events.
  • If the DeletedValue workflow flag has been set (in the WFOriginalValues column in the modObjects table), it adds the code that makes the original values of the Issue columns (the values in the Deleted table inside the trigger) available at run time. The values are returned by the Session.OriginalItem recordset.
  • If the OutOfProcess workflow flag has been set (in the WFOutOfProcess column in modObjects), it calls the workflow engine out-of-process. Otherwise, the call is made in-process.
  • If the WorkflowEnable workflow flag has been set (in the WFWorkflowEnable column in modObjects), it enables workflow enforcement. Otherwise, it disables workflow enforcement.

Example

The following example enables workflow on the Issues table. The Issues table has been registered previously as a workflow-enabled user table and an associated workflow process has been defined:

EXEC modProcessTable 'Issues'

See Also

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