Error control and diagnostics

<< Click to Display Table of Contents >>

Navigation:  Bizagi Engine > Bizagi system administration > Maintenance and administration > Environment administration >

Error control and diagnostics

Overview

During the development process (automation-of-processes stage), and in the production environment, there are situations where execution needs to be traced, or debugged.

 

Bizagi offers the possibility to trace errors in the Processes Workflows (for their control and diagnose) so that administrators can validate if the business rules, validations, interfaces invocations, or even the Process needs to be tuned up.

 

For a project's error control and diagnostic options, Bizagi presents its Tracing Configuration.

 

MC_Configuration

 

This is a powerful option to aid in the understanding and detection of those behaviors that require adjustment, or to ensure that the Process works as expected (while testing).

Note that traces should not be left enabled and should only be turned on to gather detail when processes are not working as expected.

 

note_pin

In addition to Bizagi traces, you may also take a look at your Server's log when using Bizagi Engine.

 

In Windows OS, Bizagi will write event logs at the Server (which can be looked up at the event viewer).

 

How does tracing work?

Traces monitor the Process at various levels, such as: the Process and its Activities, the business rules, validations and business policies, interfaces invocations, and forms controls.

In other words, it is possible to track the entire Process and the objects and components that make up the Work Portal.

 

To enable and configure tracing, you may enable each object/component separately and set a filter so that the generated logs include levels of detail (e.g. warnings and errors, or errors only).

 

The steps to accomplish this are:

 

1. Acknowledging which traces to enable (from the different objects and components).

2. Defining their trace detail.

 

note_pin

In addition to the trace detail, it is also recommended to view the events and log of your server either if you are using WebSphere, Weblogic, JBoss or IIS. This logs will help you to find error detail whenever you are debugging your processes.

 

1. Acknowledging which traces to enable

Enabling the traces in a test or production environment, is done either from the Management Console.

 

 

tracing01_mc

 

note_pin

The trace feature for debugging purposes (e.g traces for expressions) is mainly oriented to the Development environment.

It is strongly recommended to exploit this feature while testing the Processes so that in the Production environment this is only required if strictly necessary.

For example, when an external web service has changed and no considerations were taken for this scenario, it can be useful to enable the traces in the Production environment to help detect unplanned behaviors.

 

Once you click on the Tracing configuration window, you will see these objects and components available:

 

WSTrace_all

 

 

It is important to acknowledge and plan which traces you wish to enable.

The following table describes the possibilities regarding these objects and components:

 

ELEMENT

DESCRIPTION

Connectors / WS Connector

Logs when an external interface is invoked. This option traces requests and responses.

For more information about tracing Web service invocations, refer to Web services error control and diagnostics.

Connectors / SAP

Logs when an SAP BAPI is invoked. This option traces Import and Export parameters.

For more information about tracing SAP BAPI invocations, refer to SAP error control and diagnostics.

Connectors / External Connectors

Logs when a Connector Action is executed. This option traces Inputs, Outputs, data transformation and connector logic of the Connector.

EntityManager

Logs the execution of EntityManager activity (database access).

LDAP

Logs the execution of the scheduled synchronization of LDAP users into Bizagi.

Render (Control)

Logs the construction of a form in the Work Portal (rendering forms and their controls).

Rules

Logs the execution and evaluation of business rules and policies.

 

When the Custom sub-item is selected, it logs the user-defined traces which are manually included in Business Rules (by using the CHelper.trace function).

Scheduler

Logs the execution of the Scheduler's jobs.

Workflow

Logs when a transaction begins, when the information is saved in the database, when a case is created and the execution of each shape.

 

When the Assignment sub-item is selected, it logs the assignment rules execution as well.

The following image illustrates all types of traces in Bizagi:

 

WSTrace_all_a

 

2. Defining the trace detail

In order to decide what alerts exactly to trace (the detail level), in the selected Tracing option in the Standard Menu, click on the trace type and define its detail level (Error, Warning, All).

 

 

tracing02_step2

 

 

By default, None is selected (an empty box is shown) for all trace objects/components.

 

When Error is selected, the trace file will only log errors.

When Warning is selected, the trace file will log both warnings and errors.

When All is selected, the trace file will log: warnings, errors and step-by-step information about the executed commands.

 

Notice that you may select each trace type (and its subtypes) and select a trace detail configuration for each.

 

After saving changes on these items, it may be required to restart your Work portal service (e.g. IISreset command in IIS).

 

 

Traces location

Once enabled, traces will be saved as plain text files on the Bizagi Server.

 

They will be located under a different path, according to the specific web and application server used as the Bizagi Server.

 

ELEMENTS

 

EntityManager

C:\Bizagi\Projects\[project_name]\Trace\

LDAP

Render (Control)

Rules

Scheduler

Workflow

Connectors / WS Connector

C:\Bizagi\Projects\[project_name]\Temporary\SOA\

 

For Asynchronous SOA Interfaces configured to retry on fail, the traces of each retry will be located in:

 

C:\Bizagi\Projects\[project_name]\Temporary\Scheduler\SOA\

Connectors / SAP

C:\Bizagi\Projects\[project_name]\Temporary\SAP\

 

 

Examples and more information

Refer to the following for examples and detailed information for the most common traces.

 

Work Portal (web application) trace

The Work portal trace logs the detail executions at the Web application.

These logs are found at the .\Trace folder as split logs named BATrace_Web_[date].log.

 

The following example illustrates the logged information in these files:

 

BATrace_Web

 

Scheduler trace

The Scheduler trace logs the detail executions carried out by this thread.

These logs are found at the .\Trace folder as split logs named BATrace_Scheduler_[date].log.

 

The following example illustrates the logged information in these files:

BATrace_Scheduler

 

Expression traces (Business rules)

For this option, in addition to activating the corresponding trace option and levels, it is also necessary to include a trace command line at each of the Expression's code (business rule) to trace.

This approach will record in a separate log, any customized information that the user wants to trace within the rule.

For more information refer to Validating my business rules.

 

 

Connector traces

For more information about tracing Web service invocations, refer to Web services error control and diagnostics.

For more information about tracing SAP BAPI invocations, refer to SAP error control and diagnostics.