cancel
Showing results for 
Search instead for 
Did you mean: 

Timer Intermediate Catching Event - Java Service Task: couldn't instantiate class

rangoo
Champ in-the-making
Champ in-the-making
I call a Java Service task in middle of my process to check a status and it is working fine as I have all the dependent custom classes in classpath.

Now I had to  check(every 5 mins) for a particular status. Once the desired status is found process moves on. so I introduce a Timer Intermediate Catching Event(for a delay of 5 mins)  right before Java Service Task. It is throwing - couldn't instantiate class exceptions( Attached is the exception and a sample BPMN).
6 REPLIES 6

rangoo
Champ in-the-making
Champ in-the-making
I only have activiti-explorer deployed on my server(weblogic). I tried

a)  jobExecutorActivate to false in explorer as mentioned here - http://forums.activiti.org/content/classnotfoundexception-when-using-timer-start-event , and my unit tests activiti config has jobExecutorActivate to true. This seems to disable the jobs as they are not getting fired
b) jobExecutorActivate to true in explorer and  my unit tests activiti config has jobExecutorActivate to true/false and I am getting the above mentioned exception.

Attached are my unit test and its test activiti config

trademak
Star Contributor
Star Contributor
Are you getting this error on your Weblogic server or in your unit test?
If it's the latter then could you create a unit test project (like described here http://www.jorambarrez.be/blog/2012/09/24/how-to-write-a-unit-test/) ?

Best regards,

rangoo
Champ in-the-making
Champ in-the-making
I get the error on WebLogic. My Test is not an Unit , but an Integration test as It calls the deployed process(via explorer)

rangoo
Champ in-the-making
Champ in-the-making
Ok.  Error went away once I started using Time Duration(PT5M) instead of Time Cycle(which was incorrect to use for my desired behavior). But I think there is a bug when you use a Time Cycle of Timer Inter Catching event with Service Task.

Thanks for sharing the Unit Test, Should the unit test pause when it encounters Timer Intermediate event? It is not pausing.

trademak
Star Contributor
Star Contributor
Ok, by default the job executor is disabled in that unit test template.
So it should definitely pause when it encounters an intermediate timer catching event.
Can you share your process definition?

Best regards,

rangoo
Champ in-the-making
Champ in-the-making
<code>by default the job executor is disabled in that unit test template.</code>  Thanks for the info.  I figured I have to manually execute the jobs.