◷ Reading Time: 4 minutes
Introduction
Debugging Workflow is no different than debugging any other logic. Workflow has a very rich behavior that enables interaction between systems and humans. Because of this rich behavior, the Workflow engine also interacts with the environment in which the model is running. When FlexRule Designer is running a Workflow, the running environment is the FlexRule Designer and it supplies required managers to the engine. Below is the list of required managers that FlexRule Designer supplies to enable you to debug Workflow and simulate the execution:
- User Account Management Simulator (IDirectoryService)
- Task Manager and User Portal Simulator (ITaskService)
User Account Tool
FlexRule Designer provides an Account Manager for its Workflow Simulator:

The tool can be found under Tools --> Workflow
Simulator Accounts menu.
Accounts Management
FlexRule Designer’s Workflow Simulator passes the account information when required. For instance:
- Selecting user’s role
- Selecting user
- Choosing roles/user dynamically based on criteria
- etc.

Simulators
FlexRule Designer provides multiple simulators to enable you to debug a Workflow. When you are debugging a Workflow and execution reaches a Task (Human, Receive) or Pause node, it shows you a Simulator form based on the type of node.
Receive Task
Below is a screenshot of the simulator for the Receive Task:

User Task
Below is a screenshot of the User Portal Simulator. This allows you to take action on behalf of different users and check the workflow behavior.

Supplying Values
When selecting an action from the list, you can (or may need to) supply some values to the logic Parameters. Setting the values to these parameters can be achieved by the Watch Window manually, or the set of data can be prepared beforehand and supplied using the Set Parameters Value With option:

Task Manager
Work List
When using the simulator, FlexRule Designer also provides the history of actions that were taken by different actors:

Set Up Values for Tasks
To set up values to be supplied along with action selection while debugging Workflow:

- Create your data using Data Composer
- Put your Workflow in Debug mode and use the created data from the previous step
- Click Save Template
- Select the Workflow Signal Data checkbox
- Associate the Task with this provided data
For more details read Debugging using Templates