Debugging Workflow

From FlexRule Wiki
Jump to: navigation, search

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 Tool

FlexRule Designer provides an Account Manager for its Workflow Simulator:

Tools-UserAccountManager.png

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.

Workflow Simulator Accounts.png

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:

External-Signal-simulator.png

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.

User-Portal-Simulator.png

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:

Set-param-External-Signal-simulator.png

Task Manager

Work List

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

Workflow-Worklist.png

Info2.png At the bottom of FlexRule Designer, select Workflow and then the Work History tab.

Set Up Values for Tasks

To set up values to be supplied along with action selection while debugging Workflow:

Task-sample-data.png

  1. Create your data using Data Composer
  2. Put your Workflow in Debug mode and use the created data from the previous step
  3. Click Save Template
  4. Select the Workflow Signal Data checkbox
  5. Associate the Task with this provided data

For more details read Debugging using Templates

Next sections

  1. Introduction to debugging
  2. Debugging using Designer
  3. Debugging using code
  4. Debugging in Visual Studio
  5. Inspection Windows
    1. Parameters window
    2. Watch window
  6. Debugging Workflow

Tutorial