Designer:Debugger/Watch window

From FlexRule Wiki
Jump to: navigation, search

Introduction

The Watch window is a place where you can:

  • View the result of a specific expression against the current execution context
  • Change a value in execution context
  • Watch Data Composer results as runtime objects.

Watch-window.png

The Watch window has built-in intellisense like behaviour that allows you to simply write your expression.

Setup

You can use the Watch window to View and test the appropriate expression while:

  • Running (debugging) your business logic
  • Building data using Data Composer

When you debug your rules or build data in Data Composer, then you have access to all variables and parameters in the Watch window. The intellisense like popup also helps you to figure out accessible properties and methods on the object.

  1. Make sure your type information is set. Although this is not required for execution, FlexRule Designer uses this information to provide you with suggestions when you are typing expressions (the popup window that suggests members of an object).
  2. Put your business logic in debug mode
  3. Go to the Watch window at the button pane of the FlexRule Designer

Watch-window-pane.png

View Expression Results

To view expressions results in the Watch window:

  1. You need to know the available parameters and variables in the current execution context using the Parameters window
  2. Then in the Expression text box in the Watch window, start typing an expression and press the Enter key to add it to the list. Or you can press Text code add.png.

Change Values

There are situations in which you may need to change the values of a property of an object, and also a parameter value. In these scenarios you can simply use assignment operator in the Watch window expression box and change the value.

Data Composer Result

Watch window can be used to view the runtime values when you are composing your data using Data Composer. Learn more at Watch window in Data Composer