Collecting Process, Activity, and Transition Statistics
In this sample, use the tibco.bw.sample.application.execution.event.subscribe sample to collect statistics for process instances, activity instances, and transitions in the tibco.bw.sample.palette.http.RequestResponse sample project.
When working this sample, any of the following application statistics can be collected.
Process Instance Statistics
Statistic | Description |
---|---|
Application Name | Name of the application. |
Application Version | Version of the application. |
Module Name | Name of the TIBCO ActiveMatrix BusinessWorks™ module. |
Module Version | Version of the ActiveMatrix BusinessWorks™ module. |
Component Process Name | Name of process configured to a component. If the process is a non in-lined sub process, this could be empty. |
Job ID | Job ID of the process. |
Parent Process Name | If the process is an in-lined sub process, the name of the parent process. |
Parent Process ID | If the process is an in-lined sub process, the instance ID of the parent process. |
Process Name | Name fo the process. |
Process Instance ID | Instance ID of the process. |
Start Time | Process instance start time. |
End Time | Process instance end time. |
Elapsed Time | Elapsed time of an activity is the time difference (in milliseconds) between start time and end time of the activity. Between the start and end time, control may get switched with other activities from the other jobs. This is the time taken to execute an activity plus all the delays in acquiring resources like engine threads, JDBC connections, network, and so on.
The elapsed time includes the execution time plus time taken for evaluating all the forward transitions from that particular activity and getting the next activity ready to execute, which includes executing its input mapping if all dependencies are met. |
Eval Time | The Eval Time for an activity is the actual time (in milliseconds) used by the activity itself to complete while using the engine thread. Asynchronous activities may use other threads not included in this time. |
Status | Status of process instance, for example: Completed or Faulted. |
Activity Instance Statistics
Statistic | Description |
---|---|
Application Name | Name of the application. |
Application Version | Version of the application. |
Module Name | Name of the ActiveMatrix BusinessWorks module. |
Module Version | Version of the ActiveMatrix BusinessWorks module. |
Activity Name | Name of the activity. |
Process Name | Name of the process. |
Process Instance ID | Instance ID of the process. |
Start Time | When the activity instance started. |
End Time | When the activity instance ended. |
Eval Time | The time between the beginning and end of the evaluation period for the activity. If the activity completes in one step, the evalTime and elapsedTime would be the same. However, some activities, such as Request, Reply, or Wait for... activities typically do not complete in one step. |
Elapsed Time | Elapsed time of an activity is the time difference (in milliseconds) between start time and end time of the activity. Between the start and end time, control may get switched with other activities from other jobs.
This is the time taken to execute an activity plus all the delays in acquiring resources like engine threads, JDBC connections, network, and so on. The elapsed time is Eval Time plus the time taken for evaluating all the forward transitions from that particular activity. |
Status | Status of activity, for example: Completed, Faulted or Canceled. |
Transition Statistics
Statistic | Description |
---|---|
Application Name | Name of the application. |
Application Version | Version of the application. |
Module Name | Name of the ActiveMatrix BusinessWorks module. |
Module Version | Version of the ActiveMatrix BusinessWorks module. |
Transition Name | Name of the transition |
Process Name | Name of the process. |
Process Instance ID | Instance ID of the process. |
Component Process Name |
Name of process configured to a component . If the process is a non in-lined subprocess, this could be empty. |
Target Activity Name | Name of the activity the transition targets. |
Procedure
Result
<>@BWEclipseAppNode> ProcessInstance Auditing Event { Application Name:tibco.bw.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bw.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bw.sample.palette.http.requestresponse.HTTP_Request_Response_Example State:SCHEDULED } ProcessInstance Auditing Event { Application Name:tibco.bw.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bw.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bw.sample.palette.http.requestresponse.HTTP_Request_Response_Example State:STARTED } Activity Auditing Event { Application Name:tibco.bw.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bw.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bw.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Name:Incoming_HTTP_Request State:STARTED } Transition Auditing Event { Application Name:tibco.bw.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bw.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bw.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Auditing Event { Application Name:tibco.bw.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bw.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bw.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Name:Incoming_HTTP_Request State:COMPLETED } Activity Auditing Event { Application Name:tibco.bw.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bw.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bw.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Name:Log1 State:STARTED } 22:25:19.463 INFO [bwEngThread:In-Memory Process Worker-1] c.t.b.p.g.L.t.b.s.p.h.R.Log1 - No matching 'NEWS' source found. Activity Auditing Event { Application Name:tibco.bw.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bw.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bw.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Name:Log1 State:COMPLETED } ProcessInstance Auditing Event { Application Name:tibco.bw.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bw.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bw.sample.palette.http.requestresponse.HTTP_Request_Response_Example State:COMPLETED
- From the Project Explorer tab, select .
- Update handleEvent(Event event) method based on your use case.
- Save your changes to the project.
- Export the project as a plug-in by right-clicking on tibco.bw.sample.application.execution.event.subscriber and selecting > Plug-in Development > Deployable plug-ins and fragments.
- In the Export wizard, ensure the tibco.bw.sample.application.execution.event.subscriber project is selected, and specify a location to export the plug-in.
- After the project has been exported as a JAR file to the location you specified , locate the JAR file in the plugins folder, and copy and paste it to the shared folder at BW_HOME/system/hotfix/shared.
- To load this plug-in into runtime, restart any running AppNodes.
Your application statistics collection tool has been added to your runtime environment.