cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a method within a timer event

zlatan316
Champ on-the-rise
Champ on-the-rise
I would like to implement a timer that can call a method which will return the ISO8601 string value the timer will then evaluate. I have coded a Java class which can provide this value, but I want it to be produced as and when the timer event has been reached in the BPMN workflow. This is to eliminate the need to pre-generate the times before the timer is reached.

How can I implement this? I am using Activiti 5.19 with the Eclipse Activiti Modeler plugin

With Regards.
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Zlatan,

I am not sure whether I understood the requirement correctly but what I would do is:
create timer and when it is fired call your java class to set duedate into process variable.
Use this process variable in the timer due date expression to set new timer due date.

Regards
Martin

zlatan316
Champ on-the-rise
Champ on-the-rise
Hi Martin,

Instead of having a call to the class to set a variable, is it not possible to use a java method call that returns the ISO8601 value, as shown in this image?
http://s28.postimg.org/tnzw2vbhp/bpmn.jpg

I understand this will involve a way to refer to the class instance but not sure if this is the best way.

The reason we wou

jbarrez
Star Contributor
Star Contributor
Yes, that is possible. It can be any expression.