Dynamic Rules Tracer

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Bizagi Studio user interface explained > Advanced settings >

Dynamic Rules Tracer

Overview

When developing processes, testing rules, and assessing whether they capture the intended business logic is critical for the correct implementation of a process. When running unit tests in expressions it is useful to keep track of variables and Xpath values the expression uses.

 

Bizagi features an application, the Dynamic Rules Tracer, that evaluates an expression executed on an Activity Action at run time. This feature lets you use breakpoints within the rule, so you can execute the rule line by line, and review in a watch window the values of variables and Xpaths used as in the rule executes.

 

How does the Dynamic Rules Tracer work?

The Dynamic Rule Tracer (DRT) is an application embedded in Bizagi Studio that retrieves in run time the code scripted in a rule on an Activity action, so you can to assess the rule line by line, watching the values of variables and Xpaths.

 

The following diagram describes the steps to run the DRT:

 

DRT_26

 

1.The developer opens Bizagi Studio and the project.

2.The BPM server validates the developer’s credentials to access the project in the Development environment.

3.The developer opens the Dynamic Rule Tracer from Bizagi Studio.

4.The DRT uses a WebSocket connection with the Bizagi BPM server. This allows access to the project development environment’s database through the Application Server and provides the code of a rule to be traced.

5.Bizagi displays the DRT as an external application. Here the developer can pick the process, case number, and rule to be traced.

6.The developer has to run the rule development environment’s Work Portal, executing the task where the rule to be traced is triggered. Consider the moment where the rule is executed, that is, OnEnter, OnSave or OnExit.

7.The DRT injects the code into the tracer and the user can execute the expression line by line watching values of variables and Xpaths.

 

note_pin

The Dynamic Rule Tracer is available in the Development Environment. You cannot use the DRT in Test or Production environments. Moreover only scripting expressions executed in Activity actions can be traced.

 

Prerequisites

IIS

The Dynamic Rules Tracer uses the WebSocket protocol. You first need to install the IIS, as described at IIS Configuration. The following versions of the IIS are supported for the DRT:

 

IIS Version

Operating System

10

Windows 10

8.5

Windows Server 2012 R2, Windows 8.1

8.0

Windows 8

 

note_pin

You cannot use IIS Express. Make sure that your project in Bizagi Studio runs in the IIS and uses port 80. To review that go to the Configuration tab in Bizagi Studio, then click Web Server.

 

DRT_27

 

.Net framework

You need to install the .NET framework, version 4.5 or greater.

 

Configuration

The Dynamic Rule Tracer uses the WebSocket protocol over a TCP connection with the BPM Server. This establishes a full-duplex communication to trace the rule after is triggered in the development environment’s Work Portal.

 

note_pin

This configuration applies to on-premises projects.

 

1.Enable the WebSocket Protocol in the Application Server

 

 To establish the connection between the DRT and the BPM application server, you have to enable WebSockets. Open the wizard to turn on or off features in Windows, and select the WebSocket Protocol option in the following        path:   Internet Information Services > World Wide        Web Services > Application Development Feature.

 

DRT_1

 

2.Target the framework of the web application

 The Dynamic Rule Tracer uses the .NET framework, version 4.5 or greater. To maintain compatibility with this framework you have to target the framework in the Work        Portal’s web applications configuration.  Open the Web.config file located in: C:\Bizagi\Projects\[You_project]\WebApplication

 

DRT_2

 

 Add the targetFramework=”4.5” and requestValidationMode="2.0" attributes in the httpRuntime tag:

 

DRT_3

 

Refer to the chapter in this section to learn How to you use the Dynamic Rules Tracer.