Testing Undo of custom objects from change history

This topic guides you through the testing of your customization to make sure that undo changes you make in workspace work properly, and that locks are released after undo.

About this task

Note: To undo the changes made in a certain task group, only the task group approver for that task group has undo privileges.

Procedure

  1. To verify that undo can be performed only by a task group approver:
    1. Log in to Management Center as ProMgrA.
    2. Select a history record, such as Delicious Grilled Ham and Cheese Sandwich. The Undo button Undo button is not enabled.
    3. Right-click the history record. The Undo option is not available. The reason for this is because ProMgrA is not assigned the workspace task group approver role, nor is ProMgrA assigned as approver for this task group. In order to test undo, you must login as the ProMgrApp.

    Undo option is not available
  2. To verify that undo can be performed by a task group approver:
    1. Log in to Management Center as ProMgrApp.
    2. Open Workspace Management tool.
    3. Set the filter to Current so that you can view all workspaces.
    4. Expand the Maintenance workspace and then click the Recipe Management task group.
    5. Click the History tab. The change history records are listed.
    6. Select a history record. The Undo button is enabled.
    7. Right-click the record. The Undo option is enabled in the context menu.

    Undo option is available.
  3. To test that the undo action releases all locks on objects, verify that the object is locked prior to performing the undo:
    1. Log in to Management Center as ProMgrB.
    2. Open the Workspace Management tool.
    3. From To Do folder, work on the Create Recipe task.
    4. Notice that the Create Recipe task belongs to the Recipe introductions task group.
    5. Open the Recipe tool and select the store.
    6. Click the Delicious Foods collection, and then open the Blueberry Muffins recipe
    7. Modify the Short Description.
    8. Click Save. The following error message is displayed: The business object is locked and cannot be modified. This is expected because the object has been modified by ProMgrA in the Recipe Management task group, and is locked in that task group. When you try to modify the object within the Recipe introductions task group, it does not allow you to do so. Once the changes to Blueberry Muffins under Recipe Management task group are undone, the lock will be released, and you can then modify it within the Recipe introductions task group.
      Blueberry Muffins recipe is locked.
  4. Undo the changes made to the Blueberry Muffins recipe:
    1. Log in to Management Center as ProMgrApp.
    2. Open Workspace Management tool.
    3. Browse to the Maintenance workspace.
    4. Open the Recipe Management task group and click the History tab.
    5. Select the Blueberry Muffins record and click Undo. In the confirmation window click Yes. The following message is displayed: All changes to Blueberry Muffins were undone and the Blueberry Muffins history record no longer appears in the History pane. All changes made to the Blueberry Muffins recipe in the Recipe Management task group are undone, all locks on the object are removed, and the recipe reverts back to the approve content version.
      Recipe Management task group change history showing no blueberry muffin object.
  5. To verify that the changes to the Blueberry Muffins recipe were undone, open the recipe in the Recipe Management task group:
    1. Log in to Management Center as ProMgrA.
    2. Open Workspace Management tool.
    3. From the To Do folder, work on the Create Recipe task.
    4. Open the Recipes tool and then open the Blueberry Muffins recipe from the Delicious Foods collection. The Short Description does not V2. The undo action performed properly.
      Blueberry muffin recipe object displaying undone edit.
  6. To verify that the object is no longer locked:
    1. Log in to Management Center as ProMgrB.
    2. Open the Workspace Management tool.
    3. From To Do folder, work on the Create Recipe task.
    4. Open the Recipe tool and select the store.
    5. Click the Delicious Foods collection, and then open the Blueberry Muffins recipe
    6. Modify the Short Description. Blueberry Muffins can be modified successfully. It means the lock was released after undo.
      Screen capture showing that the lock was released after undo

What to do next

Now that you have verified the undo for the modified recipe object, you will need to do the same test for the remaining records.
Note: When you undo a create record, the object – along with all changes made to it – will be deleted; it will no longer exist. When you undo a delete record, the object is restored to the approved content version. Take some time to undo each record and verify that the undo performed as expected.