By default, all process execution information is logged via profiling. If you do not want this logging to be done by default, you can add a profiling file (.profiling) in your project to configure profiling. For example, you can exclude certain processes from profiling.
For more information on creating and configuring a profiling file in the X4 Designer, see Process Monitoring.
There are two methods for storing profiling information:
-
Profiling with in-memory persistence
In this profiling method, the profiling information is maintained with an in-memory persistence. This means that shutting down the X4 Server will cause all information to be lost. If there is no more space available, the oldest entries are automatically deleted.
If you choose this profiling method, all profiling information is stored in log files. The following types of log files are available:
|
Log file |
Description |
|---|---|
|
X4 Server Log |
This log file is located in the server console by default. The substring with Example:
|
|
X4 profiling log file on the file system |
This log file is located in the file system in the WildFly\standalone\log\profiling.log folder and can be used as a fallback if the server log fails. To activate this log file, you must comment out the configuration block in lines 90 to 136 in the standalone.xml file in the wildfly\standalone\configuration\ folder. When the server is restarted, the latest information from the log files is loaded back into memory, so the in-memory profiling of the latest processes is always available and accessible. |
-
Profiling with the SQL Profiling plugin
Note:
In conjunction with the Process Monitor app, profiling via the SQL Profiling plugin is the recommended profiling method for use cases with a large number of processes, i.e. high server utilization.
Note:
You can request the SQL Profiling plug-in in the download area of the SoftProject website (SoftProject | Software X4 BPMS) on the X4 Add-ons tab.
The SQL Profiling plugin is used to store profiling data into a relational SQL database. To do so, you need to connect the SQL Profiling plugin to a relational SQL database. The plugin must be activated in the module.xml file in the <server_directory>\wildfly\modules\de\softproject\plugins\main folder.
The first start of the profiling must be executed by a database user who has the permission to create database tables. After all tables required have been created, a user with fewer permissions can take over.
Note:
When you enable the SQL Profiling, the default profiling in the memory is turned off.
How to install the plugin
-
Unzip the plugin ZIP file.
-
Copy the
deandprivatefolders to the<server_directory>\wildfly\modulesfolder.
Note:
The de and private folders in this directory will be overwritten by the copy operation. This is the desired behavior.
-
Open the
module.xmlfile in the<server_directory>\wildfly\modules\de\softproject\x4\plugins\sql-profiling\mainfolder. -
Copy the plugin name specified in line 2:
Unknown Attachment
-
Open the
module.xmlfile in the<server_directory>\wildfly\modules\de\softproject\plugins\mainfolder. -
In the
module.xmlfile, within the<dependencies>element, add the following line:XML<module name="de.softproject.x4.plugins.sql-profiling" export="true" optional="false"/>The file should look like this:
Unknown Attachment
-
Restart the X4 Server.
After restarting the X4 Server, the plugin will be available.
How to configure SQL Profiling
-
In the
<server_directory>/configurationsfolder, create thesql_profiling_config.xmlfile. -
Insert the following content.
XML<?xml version="1.0"?> <Configuration> <DatabaseConfiguration> <ConnectionString>JDBC-CONNECTION</ConnectionString> <!--OPTIONAL--> <JndiDatasource>java:/X4TEST_DS</JndiDatasource> <UserName>USERNAME</UserName> <Password>PASSWORD</Password> <MaxPoolSize>36</MaxPoolSize> <MinPoolSize>8</MinPoolSize> <InitialPoolSize>24</InitialPoolSize> <!--OPTIONAL--> <AdditionalConnectionPoolConfig> <CheckoutTimeout>20000</CheckoutTimeout> </AdditionalConnectionPoolConfig> </DatabaseConfiguration> <WriteCycleTime> <Duration>10</Duration> <TimeUnit>SECONDS</TimeUnit> </WriteCycleTime> <KeepLogs> <Duration>100</Duration> <TimeUnit>DAYS</TimeUnit> </KeepLogs> <KeepCrashedProcessLogs> <Duration>100</Duration> <TimeUnit>DAYS</TimeUnit> </KeepCrashedProcessLogs> <RunCleanUp> <Duration>240</Duration> <TimeUnit>MINUTES</TimeUnit> </RunCleanUp> <FastDeleteEnabled>true</FastDeleteEnabled> <GlobalStepLogging>ALL</GlobalStepLogging> </Configuration>
-
Enter the required values in the
sql_profiling_config.xmlfile.
Database Configuration
Database Configuration
|
Element |
Description |
Possible values |
|---|---|---|
|
|
Wrapper for the database connection |
|
|
|
JDBC connection string for the connection to the database For more information, see the official JDBC database documentation.
|
|
|
|
Name of the JNDI datasource to be used to establish the database connection. The JNDI datasource is configured directly in the Note:
For more information about setting up a JNDI datasource, see the WildFly documentation. |
|
|
|
User name for the login to the database |
|
|
|
Password for the login to the database |
|
|
|
Maximum pool size of the connection pool. Recommended value: 15 |
|
|
|
Minimum pool size of the connection pool. |
|
|
|
Initial size of the connection pool. Recommended value: 8 |
|
|
|
Additional settings to the underlying connection pool.
For more information, see
|
|
|
|
Specifies the cycles in which data is written to the SQL database. Data is only written to the database for the selected write cycle (WriteCycle). If the server crashes within the cycle, the unwritten data is lost. |
The element contains the following elements:
|
|
|
Specifies how long entries are stored before they are cleared automatically. |
The element contains the following elements:
|
|
|
Sets the period of time for which entries for crashed processes are stored before they will be cleared automatically. Crashed processes are not covered by the
|
The element contains the following elements:
|
|
|
Sets the cycles in which the automatic cleanup is performed. |
The element contains the following elements:
|
|
|
Deletes logs in a faster way. If this is activated, the Possible values:
|
|
|
|
Defines which process steps are logged. Possible values:
With
|
|
WriteCycleTime
|
Element |
Description |
Possible values |
|---|---|---|
|
|
Period in which the cached profiling data is written to the database |
|
|
|
Unit of the period of time |
|
KeepLogs
|
Element |
Description |
Possible values |
|---|---|---|
|
|
Period of time for which the profiling data is to be stored in the database |
|
|
|
Unit of the period of time |
|
KeepCrashedProcessLogs
|
Element |
Description |
Possible values |
|---|---|---|
|
|
Period of time for which the profiling data about crashed processes is to be stored in the database |
|
|
|
Unit of the period of time |
|
RunCleanUp
|
Element |
Description |
Possible values |
|---|---|---|
|
|
Period of time after which the automatic clean-up will delete the process logs |
|
|
|
Unit of the period of time |
|
Note:
The profiling information displayed in the Process Monitor app can also be accessed via an API.
To do this, you can use the Process Profiler adapter for a process to retrieve all runtime information for a process or process instance and integrate it into your own applications.
Alternatively, you can access the X4 API via localhost:8080 and manage the profiling information at run time in the Profiling Management section.
This means: You can enable profiling at run time without accessing the X4 BPMS project itself. This is useful, for example, if there is a process for which profiling is turned off and you need information about that process.