Advanced Testing Concepts

When and How?

The right time to test a workflow is not at the very end. The right time to test it is throughout the creation process. The more processing added to the workflow before testing, the more variables there are to account for if and when something undesired happens. Depending on the complexity of the workflow, this may take a fair amount of time.

By getting into the habit of testing the workflow early and often, time spent troubleshooting a workflow definition is minimized.

The habit to cultivate while designing workflows is one of incremental testing. Incremental testing is accomplished by adding a small amount of manageable activities to the canvas and testing them. Test them by creating a document in the repository specifically designed to meet the criteria of the activities added and configured in the workflow. Using this method from the beginning provides assurance that what is built is working as intended.

Starting Events

The earliest point when a workflow can engage with a document would be the starting events. Because we can begin building a workflow without being prompted to define our starting events, it can be very enticing to define starting events after completing a workflow definition. In this case, the starting events would be defined as part of the publishing process.

Instead, we recommend that starting events be one of the first items tested. That is not to say we recommend publishing a blank canvas just to test out the starting events. But it should be one of the elements that is working as intended during our first incremental test.

Starting events should also be configured to be as efficient as possible, from most specific rule to least specific rule.

Testing Activities

As we begin testing, our goal is to test the starting events and all the activities on the canvas. To achieve this, we systematically create documents to travel down all branches and activities on our canvas.

Troubleshooting and additional techniques

When necessary, the following techniques can be used to isolate areas of a workflow that are suspected of causing unintended behavior. These techniques can help to determine where an issue starts, or whether they are causing other steps to have errors.

Disabling Activities

Disable an activity in your workflow to stop it from being performed. Disabled activities are skipped. You may want to disable activities if you only want to test specific sections of your workflow.

To disable an activity

  1. Click the activity on the canvas.
  2. Uncheck Enable in the Properties pane.
  3. Publish the workflow.

Enabling and Disabling Branches

For activities that contain branches, you can change the operational status for each branch. Disabled branches are not run when the workflow runs and will be grayed-out in the Designer Pane. All branches are enabled by default. You may want to disable branches if you only want to test specific sections of your workflow.

To disable branches

  1. Click an activity's branch on the canvas.
  2. Uncheck Enable in the Properties pane.

Once testing of the disabled items is complete, select and re-check Enable for each item, then republish the workflow.