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 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 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.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 Start Time:2019.01.10 11:20:50.947 End Time:2019.01.10 11:20:51.339 Eval Time:0 Elapsed Time:392 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 } 11:20:51.361 INFO [bwEngThread:In-Memory Process Worker-2] com.tibco.bw.palette.generalactivities.Log.tibco.bw.sample.palette.http.RequestResponse.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 Start Time:2019.01.10 11:20:51.350 End Time:2019.01.10 11:20:51.362 Eval Time:11 Elapsed Time:12 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 Start Time:2019.01.10 11:20:50.930 End Time:2019.01.10 11:20:51.375 Elapsed Time:445 Eval Time:11 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 in the plugins folder and copy it to a temporary folder. From the temporary folder use the Docker file given below to copy these JAR into the base Docker image.
FROM tibco/bwce:latest COPY . /resources/addons/jars
Your application statistics collection tool has been added to your run time environment. You can see the application statistics after you create bwce application image from the base docker image.