Share via


Adding Workflow Processes to Databases

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.

After you have registered your database in the Workflow Designer, you add a workflow process by choosing a main table that is governed by the workflow.

To add a workflow process to a database

  1. Open your database in Microsoft Office XP Developer.
  2. Select the project node in the Solution Explorer.
  3. Open the Project menu, and click Add New Item. The Add New Item dialog box is displayed.
  4. Double-click the Add a Workflow Process icon.
  5. Select the table that you want to add workflow to from the list, and then click OK. The table and any other tables that share primary key or foreign key relationships with that table are added to the Tables folder in the Solution Explorer, and the new workflow is added to the Workflow Processes folder.
  6. Build your workflow by adding states and transitions from the toolbox to the design surface.

Item Created and Item Deleted shapes are added to the design surface automatically when you add a workflow process to a table. The Item Created shape appears in the workflow process diagram as the starting block, and the Item Deleted shape appears as the ending block. Between these points, you add states, events, and transitions to design your workflow process.

If you save the workflow at this point, it starts being enforced as it is. However, because it has no valid states or events that make it possible for additions, changes, or deletions to be performed, nothing can be done with the table. To make it possible for work to be done on the table while the workflow is still incomplete, select the workflow process in the Solution Explorer, and set the EnableWorkflow property to False.

See Also

Understanding the Workflow Process for SQL Server | Designing Workflow Processes for SQL Server | Controlling Permissions for Events | Initiating Workflow for a Record | Testing Workflow Processes for SQL Server