Hello,
I’m trying to improve process performance by analyzing historical data in ACT_HI_JOB_LOG table. Its data looks very useful, but I cannot explain appearance of seemingly duplicate entries, related to the same process activity.
This is an excerpt from my process definition:

When I look at related data in ACT_HI_JOB_LOG I get 4 records instead of 2 I’d expect:
select *
from ACT_HI_JOB_LOG
where process_instance_id_='f818ff85-3402-11ed-b613-0ec6e699b53f'
and ACT_ID_ = 'Activity_customer_details'
and TIMESTAMP_ > '2022-09-14 14:00:00'
order by timestamp_;
8334afde-341c-11ed-a108-0ec6e699b53f,2022-09-14 14:00:58.335,8334afdd-341c-11ed-a108-0ec6e699b53f,,3,0,,,0,c8cff845-337b-11ed-b613-0ec6e699b53f,async-continuation,async-before,Activity_customer_details,,f818ff85-3402-11ed-b613-0ec6e699b53f,833488ca-341c-11ed-a108-0ec6e699b53f,f818ff85-3402-11ed-b613-0ec6e699b53f,notification:2:c8cff81b-337b-11ed-b613-0ec6e699b53f,notification,c8c94159-337b-11ed-b613-0ec6e699b53f,1,,127.0.1.1$default,
83caad7b-341c-11ed-a108-0ec6e699b53f,2022-09-14 14:00:59.318,83caad7a-341c-11ed-a108-0ec6e699b53f,,3,0,,,0,c8cff845-337b-11ed-b613-0ec6e699b53f,async-continuation,async-before,Activity_customer_details,,f818ff85-3402-11ed-b613-0ec6e699b53f,833488ca-341c-11ed-a108-0ec6e699b53f,f818ff85-3402-11ed-b613-0ec6e699b53f,notification:2:c8cff81b-337b-11ed-b613-0ec6e699b53f,notification,c8c94159-337b-11ed-b613-0ec6e699b53f,1,,127.0.1.1$default,
83caad7c-341c-11ed-a108-0ec6e699b53f,2022-09-14 14:00:59.318,8334afdd-341c-11ed-a108-0ec6e699b53f,,3,0,,,2,c8cff845-337b-11ed-b613-0ec6e699b53f,async-continuation,async-before,Activity_customer_details,,f818ff85-3402-11ed-b613-0ec6e699b53f,833488ca-341c-11ed-a108-0ec6e699b53f,f818ff85-3402-11ed-b613-0ec6e699b53f,notification:2:c8cff81b-337b-11ed-b613-0ec6e699b53f,notification,c8c94159-337b-11ed-b613-0ec6e699b53f,3,,127.0.1.1$default,
83cd6c9f-341c-11ed-a108-0ec6e699b53f,2022-09-14 14:00:59.336,83caad7a-341c-11ed-a108-0ec6e699b53f,,3,0,,,2,c8cff845-337b-11ed-b613-0ec6e699b53f,async-continuation,async-before,Activity_customer_details,,f818ff85-3402-11ed-b613-0ec6e699b53f,833488ca-341c-11ed-a108-0ec6e699b53f,f818ff85-3402-11ed-b613-0ec6e699b53f,notification:2:c8cff81b-337b-11ed-b613-0ec6e699b53f,notification,c8c94159-337b-11ed-b613-0ec6e699b53f,3,,127.0.1.1$default,
Instead of one JobState.CREATED(0) record and one JobState.SUCCESSFUL(2) record, I get two of each kind.
I also log the times of the start and finish of the Java delegate invocation and it shows times corresponding to the first job in the db table:
2022-09-14 14:00:58.351 DEBUG 442425 --- [aTaskExecutor-1] n.a.c.a.d.CustomerDetailsDelegate : Invoked method="CustomerDetailsDelegate.execute", activityName="Retrieve affected customers", processInstanceId="f818ff85-3402-11ed-b613-0ec6e699b53f", notificationId="5691293239580779702", messageId=4269003655847005891, attempt=0
2022-09-14 14:00:59.317 DEBUG 442425 --- [aTaskExecutor-1] n.a.c.a.d.CustomerDetailsDelegate : Finished invocation method="CustomerDetailsDelegate.execute", activityName="Retrieve affected customers", processInstanceId="f818ff85-3402-11ed-b613-0ec6e699b53f", notificationId="5691293239580779702", durationMs=966, messageId=4269003655847005891, attempt=0
Looks like the second job gets created immediately after the first succeeds. Both of them have the same executionId. How do I interpret that? Is that second one fake or redundant in some way (it does not cause java delegate to be invoked)? I’d like to avoid such jobs because they still have to be scheduled and executed, they use threads from the pool.
Do you have any experience in reading data in this table?
What causes those duplicate jobs to be created?
How to avoid them?
Any help is appreciated.