Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt Include
Testing Forms
Testing Forms
nopaneltrue

Step Assignments for Testing

Usually as the designer you want to test the workflow's behavior, including Task Notification emails and business rules that execute on each step. However, you may be hesitant to test your workflow with real User and Role assignments, which will notify these users with each test. One idea is to set up dynamic user and role assignments that will assign each step to test user(s)/role(s) when the workflow is started under a testing condition, such as initiated by the designer user, and otherwise will use the as-designed step assignments. This pattern will allow you test workflows fully in development or production without notifying and cluttering the task list of real users. 

First, add a test role and one or more test users, whose emails are are set to your own email(s) so you will be able to view Task Notification and Doc Action emails. 

Let's say you have a workflow with three steps. Step 1 is performed by any user, Step 2 is assigned to the user's manager, and Step 3 is assigned to the role "HR". Instead of hard coding these assignments, use controls in your form to set the Manager user and HR role values. Set the step assignments to the template for those controls, i.e. Step 2: {Manager} and Step 3: {Role}

Image Added

Image Added

Then add a business rule that checks the initial user's id - if it happens to be "designer", then set the control Manager to your test manager user (mgrTest) and set the control Role to your test role (HRtest). The else action sets these controls to the initial user's manager and the real role "HR". 

Image Added

Image Added


Test the workflow from your designer user account. You will receive the Task Notifications via your test user's email, and you can log in as the test user(s) to perform the tasks. 

Image Added

When you're ready, start the workflow from some real account. Now it should route through the real-world assignments as expected.

Image Added