<< Click to Display Table of Contents >> Diagnosing errors in integrated systems |
Overview
During the development process (automation-of-processes stage), and in the Production environment, there are situations when you need to trace or debug execution.
Bizagi lets you trace errors in the Processes Workflows (for control and diagnosis of issues) so administrators can check whether the business rules, validations, interfaces invocations, or even the Process needs to be tuned up.
Tracing configuration
For a project's error control and diagnostic options, Bizagi presents its Tracing Configuration.
This is a powerful option to help you detect and understand behaviors that require adjustment, and to make sure the process you are testing works as expected.
Do not leave traces enabled, and only be turn them on to gather details when processes are not working as expected.
In addition to Bizagi traces, can also review your server's log when using Automation Server. In Windows OS, Bizagi writes event logs to the server (. You can review the log using 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, you can trace the entire Process and the objects and components that make up the Work Portal.
To enable and configure tracing, you can enable each object/component separately and set a filter so that the generated logs include the level of details that you want (warnings and errors, or errors only).
The steps to accomplish this are:
1. Decide which traces to enable (for the different objects and components).
2. Define their trace detail.
In addition to the trace detail, we recommend that you to view the events logs of your server if you are using WebSphere, Weblogic, JBoss or IIS. The logs will help you find error details whenever you are debugging your processes. |
1. Decide which traces to enable
Use the Management Console to enable traces in a Test or Production environment.
The trace feature for debugging purposes (e.g traces for expressions) is mainly oriented to the Development environment. We strongly recommend that you exploit this feature while testing the Processes so that you only need to use it in the Production environment when strictly necessary. For example, when an external web service has changed and no preparations were made for this scenario, it can be useful to enable traces in the Production environment to help detect unplanned behaviors. |
Select the Tracing configuration window to see the available objects and components:
It is important to plan which traces you wish to enable.
The following table describes the possibilities regarding the logs for these objects and components:
ELEMENT |
DESCRIPTION |
---|---|
Authentication |
Logs when a user is being authenticated in the System (User Request) and when the System is validating a Request Session (Validation of Request Session). Details such as date, level, trace name, trace type and sub-type, type and sub-type of authentication and message, are added to the log file. |
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 input, output, data transformation and connector logic of the Connector. |
EntityManager |
Logs the execution of EntityManager activity (database access). |
LDAP |
Logs the execution 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 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:
2. Define the trace details
To decide what alerts to trace (the detail level), in the selected Tracing option in the Standard Menu, click the trace type and select its detail level (Error, Warning, All).
By default, None is selected (an empty box is shown) for all trace objects/components.
When Error is selected, the trace file only logs errors.
When Warning is selected, the trace file logs both warnings and errors.
When All is selected, the trace file logs: warnings, errors and step-by-step information about the executed commands.
You can select a trace detail configuration for each trace type and its subtypes.
After saving changes on these items, you may need to restart your Work portal service (e.g. IISreset command in IIS).
Trace locations
Once enabled, traces are saved as plain text files on the Bizagi Server.
They are located, according to the specific web and application server used as the Bizagi Server.
ELEMENTS |
LOCATION |
---|---|
Authentication |
C:\Bizagi\Projects\[project_name]\Trace\ |
EntityManager |
|
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 are located in:
C:\Bizagi\Projects\[project_name]\Temporary\Scheduler\SOA\ |
Connectors / SAP |
C:\Bizagi\Projects\[project_name]\Temporary\SAP\ |
Connectors - External Connectors |
Logs for inputs and outputs: C:\Bizagi\Projects\[project_name]\Temporary\Connectors\
Log for the connectors' framework: [Bizagi_installation_path]\ConnectorsService\framework\Logs\Connectors\[project_name]\ Bizagi's default installation path, which is usually at C:\Program Files\Bizagi\Bizagi Studio |
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 details of executions for the Web application.
These logs are found in the .\Trace folder as split logs named BATrace_Web_[date].log.
The following example illustrates the logged information in these files:
Scheduler trace
The Scheduler trace logs the details of executions carried out by this thread.
These logs are found in the .\Trace folder as split logs named BATrace_Scheduler_[date].log.
The following example illustrates the logged information in these files:
Expression traces (Business rules)
For this option, in addition to activating the corresponding trace option and levels, you need to include a trace command line in the code of each Expression (business rule) you want 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.
Authentication traces
When you integrate a SAML-compliant Identity provider for Bizagi to delegate authentication to it, logged detail you may review, includes:
•USERREQUEST: Provides a message for the information sent from Bizagi to the Identity provider (regarding the user's request to log in).
•VALIDATESESSIONREQUEST: Provides a message for the response from the identity provider received by Bizagi.
The following image illustrates an example of an authentication tracing file:
Connector traces
•For more information about tracing Web service invocations, refer to Diagnosing Web services errors.
•For more information about tracing Connectors invocations, refer to Connectors Web services errors.
•For more information about tracing SAP BAPI invocations, refer to SAP Web services errors.