Share via


Testing Workflow Processes for SQL Server

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 adding a workflow process to a table, you can test the workflow directly in the SQL Server Enterprise Manager. Even without any script, the workflow states, transitions, and events are enforced when you enter data into your table.

To test a workflow process

  1. Find the modStateID for each state by opening the <*tablename>*StateLookup table in Enterprise Manager and noting the ID number beside each state name. You must know the modStateID to be able to move to a particular state in the workflow process when you are working directly in the tables.

  2. Open the view for the workflow-enabled table in the SQL Server Enterprise Manager, and enter a new record.

    Change from one state to another by changing the ModStateID value. Try to change the status of your record from the first state to the last state. Unless you have added a transition event that makes this transition possible, you are notified that this is not a valid event. In addition, you are not able to delete the record while it is in a state that has no transition to the Item Deleted shape.

  3. If workflow is not performing as expected, return to your workflow diagram and make sure you have saved your workflow and refreshed the database. In addition, make sure you have added the required transitions to your diagram and that the EnableWorkflow property for that workflow process is set to True. To check the workflow properties, open the Properties window in the Workflow Designer, and then select the workflow process in the Solution Explorer.

See Also

Understanding the Workflow Process for SQL Server | Adding Workflow Processes to Databases | Designing Workflow Processes for SQL Server | Controlling Permissions for Events | Initiating Workflow for a Record | Testing and Debugging in the Workflow Designer for SQL Server | Troubleshooting Workflow for SQL Server