<< Click to Display Table of Contents >> Dynamic Rules Tracer |
Overview
When developing processes, testing rules, and assessing whether they capture the intended business logic, it is critical 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:
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 select the process, case number, and rule to be traced.
6.The developer runs the development environment’s Work Portal and executes 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.
•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 |
You cannot use IIS Express. Make sure that your project in Bizagi Studio runs in the IIS and uses a port associated with HTTPS (for example, 444). To review this, you must go to the Configuration tab in Bizagi Studio and then click Web Server.
|
.NET framework
You need to install the .NET framework, version 4.5 or greater.
Configuration for Studio on-premises
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.
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.
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
Add the targetFramework=”4.5” and requestValidationMode="2.0" attributes in the httpRuntime tag:
Refer to the chapter in this section to learn How to you use the Dynamic Rules Tracer.
Configuration for Studio Collaboration Services SCS
The cloud environment is ready for the Dynamic rules tracer, so no additional configuration is needed. However, make sure that a Run on Cloud has been made successfully. After, the authentication token can be generated (explained in the next section).