7.4.5 Activity trace
In the development environment, activity traces can be output. You can identify the processing flow of each activity from activity traces.
The following shows the targets of activity traces and the times at which activity traces are output:
- Target business processes:
-
Activity traces are output for all business processes. You cannot specify business processes for which activity traces are to be output.
- Target activities:
-
The traces of all activities except the following are output:
-
Switch End activity
-
Flow End activity
-
- Times at which to output activity traces:
-
Output of an activity trace starts when an activity is invoked.
This section describes the output destination of activity traces and the items to be output, and shows an example of using activity traces. For details about how to collect activity traces, see 7.3.2(5) Collecting activity traces.
- Organization of this subsection
(1) Output destination of activity traces
The following table shows the output destination and file name of activity traces.
Trace output destination path |
Trace file name |
---|---|
<Log output directory of J2EE server>\csc |
cscbp_activity_trc_HCSC-server-name_N.log |
You can change the log output directory of the J2EE server by using the ejb.server.log.directory key in the usrconf.cfg file (option definition file for the J2EE server). For details about the usrconf.cfg file, see 2.2.2 usrconf.cfg (Option definition file for J2EE servers) in the manual Application Server Definition Reference Guide.
You can change the number of trace files, the file size, and the items to be output by using the following properties in the HCSC server runtime definition file:
-
bpacttrace-filenum=number-of-activity-trace-files-for-business-processes
-
bpacttrace-filesize=size-of-an-activity-trace-file-for-business-processes
-
bpacttrace-extend-item=additional-output-items
For details about the activity trace properties, see 6.5.6 HCSC server runtime definition file in the Service Platform Reference Guide.
(2) Output format and output items of an activity trace
(a) Output format
The following figure shows the output format of an activity trace.
(b) Output items
The following table shows the items that are output in an activity trace.
Item |
Contents |
---|---|
Number |
The sequence number of each activity trace is output. |
Date |
The date on which the activity trace was collected is output in YYYY/MM/DD format:
|
Time |
The time at which the activity trace was collected is output in hh:mm:ss.SSS format:
The time is output in local time at the millisecond precision. |
Product ID |
The string CSCBP is output as a product identifier. |
pid |
The identifier of each process is output. |
tid |
The identifier of each thread is output. |
ID |
Blank |
Business process name |
The business process name is output as set in the development environment. |
Service ID |
The service ID of the business process is output as set in the development environment. |
Activity name |
The name of each activity is output. |
Process instance ID |
The identifier of each process instance is output. This item is output only if PROCESSINSTANCEID is specified for the bpacttrace-extend-item property in the HCSC server runtime definition file. For details, see 6.5.6 HCSC server runtime definition file in the Service Platform Reference Guide. |
CRLF |
The record end code is output. |
(3) Example of an activity trace that is output
The following shows an example of an activity trace that is output:
In the preceding example, you can see that the processes enclosed in a red rectangle were performed after the processing flow branched at the StockAllocationResultCheck node.
(4) Example of using an activity trace
An activity trace that has been output consists of the traces of multiple business processes. This example shows how to identify a unique request in an activity trace.
- Case where the activity is not defined after response:
-
The thread identifier (tid) is unique information in each request. In this case, identify the request based on the thread identifier that has been output in the activity trace.
- Case where the activity is defined after response:
-
The process instance ID is unique information in each request. In this case, identify the request based on the process instance ID that has been output in the activity trace.
To output process instance IDs in activity traces, specify PROCESSINSTANCEID for the bpacttrace-extend-item property in the HCSC server runtime definition file. For details, see 6.5.6 HCSC server runtime definition file in the Service Platform Reference Guide.