Collecting Process Instance, Activity Instance, and Transition Statistics
In this sample, you will use the tibco.bwce.sample.application.execution.event.subscribe sample to collect statistics for process instances, activity instances, and transitions in the tibco.bwce.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 BusinessWorks Container Edition module. |
Module Version | Version of the TIBCO BusinessWorks Container Edition 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 for a process is the total time taken by the process, including the elapsed time for all the activities executed for the process. |
Eval Time | The Eval Time for a process instance is the total evaluation time (in milliseconds) for all the activities executed for the process instance. |
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 TIBCO BusinessWorks Container Edition module. |
Module Version | Version of the TIBCO BusinessWorks Container Edition 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 , 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 TIBCO BusinessWorks Container Edition module. |
Module Version | Version of the TIBCO BusinessWorks Container Edition 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.bwce.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bwce.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bwce.sample.palette.http.requestresponse.HTTP_Request_Response_Example State:SCHEDULED } ProcessInstance Auditing Event { Application Name:tibco.bwce.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bwce.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bwce.sample.palette.http.requestresponse.HTTP_Request_Response_Example State:STARTED } Activity Auditing Event { Application Name:tibco.bwce.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bwce.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bwce.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Name:Incoming_HTTP_Request State:STARTED } Transition Auditing Event { Application Name:tibco.bwce.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bwce.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bwce.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Auditing Event { Application Name:tibco.bwce.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bwce.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bwce.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Name:Incoming_HTTP_Request State:COMPLETED } Activity Auditing Event { Application Name:tibco.bwce.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bwce.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bwce.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.bwce.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bwce.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bwce.sample.palette.http.requestresponse.HTTP_Request_Response_Example Activity Name:Log1 State:COMPLETED } ProcessInstance Auditing Event { Application Name:tibco.bwce.sample.palette.http.RequestResponse.application Application Version:1.0 Module Name:tibco.bwce.sample.palette.http.RequestResponse Module Version:1.0.0.qualifier ProcessInstanceId:bw0a100 Process Name:tibco.bwce.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.bwce.sample.application.execution.event.subscriber and selecting > Plug-in Development > Deployable plug-ins and fragments.
- In the Export wizard, ensure the tibco.bwce.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 plugin to the location you specified, locate the JAR file in the pulgin folder, and copy paste the JAR to your buildpack. Refer to the section "The TIBCO BusinessWorks™ Container Edition Buildpack" topic of Application Development guide.
Your application statistics collection tool has been added to your run time environment. You can see the application statistics after you run the TIBCO BusinessWorks Container Edition application with this buildpacks.