MOD2000: Improper modStateID Value Displayed When NULL Workflow State Does Not Exist (247304)



The information in this article applies to:

  • Microsoft Office 2000 Developer

This article was previously published under Q247304

SYMPTOMS

You find that the first non-null, defined workflow state is improperly displayed as the first record's modStateID column value in a workflow-enabled solution.

CAUSE

The Workflow Toolbar control automatically and temporarily displays the first non-null workflow state when you notice the conditions of the Symptoms section. When the record is saved, the currently displayed workflow state is also saved to the record.

This issue can occur when the solution has a defined offline subscription, uses a data access page that has a Workflow Toolbar control, and one of the following conditions occurs:
  • You take the solution offline and refresh the page to stay offline.
  • You use the solution online, and you click the New button on the Workflow Toolbar control to add a new record.

For example, you have created a workflow-enabled solution. Within this solution, you have defined non-null workflow states stored in the main tableStateLookup table. Assume the defined workflow states are named One, Two, Three, and Four. In the main workflow table (named main table) you add one or more rows with a modStateID of NULL. You create an offline publication with the main table as the publication's main table. When you take the created data access page that has the Workflow Toolbar control offline on a computer with the Access Workflow Designer client components installed and refresh the page to continue to work offline, the first record's modStateID column value is improperly displayed as "One," instead of the currently stored NULL.

RESOLUTION

Either change the modStateID column values to the appropriate workflow state values (before or after enabling workflow on your solution) or do not allow the modStateID column values in the main table to be NULL. If you choose to modify the modStateID values after adding workflow to your solution, you must temporarily disable workflow processing (click to clear the Enable workflow processing check box on the General tab of the solution's defined workflow), save the changes, make your modStateID modifications, enable workflow processing again, and then save the changes again.

MORE INFORMATION

Steps to Reproduce Behavior

  1. On the computer with the Access Workflow Designer developer components, create a table named Items in Microsoft Access 2000 with the following columns and data types:

    Column nameData type and lengthAllow nulls and identity
    itemIDint, length of 4Clear Allow Nulls; Select Identity. Set Identity Seed and Identity Increment values as wanted.
    descripchar, length of 10Select Allow Nulls; clear Identity.
  2. Select itemID as the primary key for the table. Save the table and close it.
  3. Start Access Workflow Designer. Add the Items table (the table that you created in step 1) as the main table.
  4. Add workflow. Define the workflow states as One, Two, Three, and Four.
  5. On the General tab of the workflow process, click to clear the Enable workflow processing check box. On the File menu, click Save Changes to save the changes.
  6. Switch back to Microsoft Access. Press F5 to refresh the database objects.
  7. Enter one or more records into the Items table. Be sure to leave the modStateID field NULL.
  8. Switch back to Access Workflow Designer. On the General tab for the workflow process, click to select the Enable workflow processing check box. On the File menu, click Save Changes to save the changes.
  9. Create an offline publication for the solution. Designate the Items table as the main table. Allow public full permissions to the offline publication.
  10. In Microsoft Access, create a data access page based on the itemsView view. Add all fields from the view, except for the rowguid field.
  11. Set the page header's UniqueTable property (on the page header's Data tab) to the Items table.
  12. Add the Workflow Toolbar control to the page.
  13. Save the page to the appropriate Web folder on the Access Workflow Designer server.
  14. From a client computer where you have installed the Access Workflow Designer client components, browse to the data access page that you saved in the previous step.
  15. Click the Offline button on the Workflow Toolbar control.
  16. Select the Make Available Offline option, and click the named offline publication.
  17. After the publication is created on the client computer, create a favorite for this page. Click to select the Make Available Offline option in the Add Favorite dialog box. (Synchronization takes place at this point, and the offline publication is created on the client computer. This process may take some time.) After synchronization is finished, click OK.
  18. After the favorite has been created, click Work Offline on the File menu in Microsoft Internet Explorer.
  19. In Microsoft Internet Explorer, click Refresh.
  20. Click the Stay Offline button to work offline with this page.

    Note that the modStateID for the first record (which should be NULL) is improperly displayed as "One".

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

247316 MOD2000: Clicking New Workflow Toolbar Control Button Doesn't Clear Fields for Data Entry


Modification Type:MajorLast Reviewed:8/6/2002
Keywords:kbbug kbWorkFlowDesigner KB247304