Microsoft KB Archive/243916

From BetaArchive Wiki

Article ID: 243916

Article Last Modified on 7/31/2001



APPLIES TO

  • Microsoft Office 2000 Developer Edition



This article was previously published under Q243916

SYMPTOMS

In Access Workflow Designer, workflow actions in the Microsoft Office Developer Workflow Toolbar Control appear in the order in which they were created, not in the order shown in the workflow diagram.

CAUSE

In Access Workflow Designer, any workflow state can potentially be reached by any number of paths through the workflow. Because there can be more than one path from one workflow state to another, there really is no way to determine the order in which events occur.

RESOLUTION

You can change the order in which the workflow actions are displayed by manually setting the Position column value in the corresponding workflow actions table. For example, if the table to which you added workflow is named Test, modify the Position column value in the testWorkflowActions table.

NOTE: Before you can change the Position column value in the corresponding workflow actions table, you must create a primary key on the Id column. To create a primary key on the Id column in the workflow actions table, follow these steps:

  1. Open the Microsoft Access project (.adp) exclusively.
  2. Open the workflow actions table in Design view.
  3. Click the Id column.
  4. On the Edit menu, click Primary Key.
  5. Save the table, and then close it. You can now modify the Position column value.


MORE INFORMATION

Steps to Reproduce the Behavior

  1. In a new or existing Microsoft Access project (.adp), create a new table named Test. Create this table with the following fields and data types:
    Column name Data type Other information
    Id int Clear Allow Nulls. Select Identity. Accept the default values for Identity Seed and Identity Increment.
    MyValue char Accept the default of 10 characters.


  2. Set the Id column as the primary key. Click the column header, and on the Edit menu, click Primary Key.
  3. Start Access Workflow Designer.
  4. Add the Test table as a main table. To do this, on the Edit menu, point to Insert, and then click Main Table. Do not enable row-level permissions on the Test table.
  5. After the Test table has been added as a main table, add workflow. To do this, on the Edit menu, point to Insert, and then click Workflow Process.
  6. Select the Test table from the combo box as the main or detail user table.
  7. On the Workflow Column page of the Workflow Process Wizard, click Create a new column.
  8. On the Workflow states page of the Workflow Process Wizard, create these workflow states in this order: One, Two, Three, and Four. Remember to press Create and Add to move each workflow state from the lookup keyword lists to the workflow states list.
  9. Finish the Workflow Process Wizard.
  10. After the workflow diagram appears in the Access Workflow Designer, right-click an empty location in the workflow diagram, and then click Add State.
  11. Type Test as the new workflow state name. Click OK.
  12. Click the One_Two workflow action, right-click this workflow action, and then click Delete. Click Yes to the "Are you sure you want to delete this action?" prompt.
  13. Click the One workflow state, right-click this workflow state, and then click Add Action.
  14. Type One_to_Test as the action name. In the Next state box, click Test. Click OK.
  15. Click the Test workflow state, right-click this workflow state, and then click Add Action.
  16. Type in Test_to_Two as the action name. In the Next state box, click Two. Click OK.
  17. On the File menu, click Save All Changes. Close and re-open the project.
  18. In Microsoft Access, create a new page. Add all fields from the testView view to the page by double-clicking all fields in the field list. Close the field list.
  19. For the header section, set the UniqueTable property on the Data tab, to test (the base table).
  20. Insert the Microsoft Office Developer Workflow Toolbar ActiveX control in the page. Widen the toolbar as needed.
  21. On the File menu, click Save As. Save the page as Test.
  22. When the Save as Data Access Page dialog box appears, click the Web Folders icon. In the File name combo box, type the following line

    http://<server name>/<solution name>

    where <server name> is the name of the computer with the Access Workflow Designer server components and <solution name> is the name of the solution.

    Save the page as Test.htm
  23. Switch to Page view. Note that the displayed workflow actions are in this order: New, Delete, Two_Three, Three_Four, Edit, One_to_Test, Test_to_Two, and Offline.

To move the order of the Two_Three and Three_Four workflow actions so that they both follow the One_to_Test and Test_to_Two workflow actions:

  1. Close Test.htm.
  2. Add a primary key to the Id column of the testWorkflowActions table.
  3. Change the Two_Three workflow action Position value from 4 to 13. Change the Three_Four workflow action Position value from 5 to 14. Save and close the table.
  4. Open the test page in Page view. Note that now the displayed workflow actions are in this order: New, Delete, Edit, One_to_Test, Test_to_Two, Two_Three, Three_Four, and Offline.



Additional query words: prb

Keywords: kbprb kbworkflowdesigner KB243916