cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie. Activiti Clock Configuration

sankalpn
Champ in-the-making
Champ in-the-making
Hi all,

     While using activiti-explorer 5.16.3 with tomcat7 on postgres-9.1 as DB and Ubuntu 12.04 machine, I noticed something weird. The moment I deploy a process definition, the message on activiti-explorer UI says "Deployed one day ago". Logs in catalina.out have correct system time which is current. But, activiti-explorer seems to be running a day behind. This also messes up IntermediateCatchTimerEvents (they do not fire as they were due "one day ago"). Apparently activiti-explorer clock is not configured properly. Also, if I leave activiti running, activiti-explorer keeps falling a day behind each day, never advancing it's day.

I tried looking at forums and activiti user guide, I did not find any configuration for clock at all. Can anyone point me to ways to debug this issue? Is there any way I can configure activiti-explorer to use system time instead of this one day before deployment time? Any pointers would be helpful. Thank you.

Best Regards,
Sankalp
11 REPLIES 11

sankalpn
Champ in-the-making
Champ in-the-making
I switched to using activiti as embedded workflow engine and used spring configuration. Haven't faced the issue since. I use postgres in production and H2 in unit tests. Make sure your task exector is enabled.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

org.activiti.engine.runtime.Clock is my baby. 🙂 So I should be responsible for its failures. I created this interface to be able to control time in which engine lives.
Sankalp problem is caused by

@Override
  public void setCurrentCalendar(Calendar currentTime) {
    CURRENT_TIME = currentTime;
  }
The problem is when CURRENT_TIME is set real (new Date()) time is not used any more. Any set method on the clock is used to control time. It is used for instance during the simulations to control virtual time.

Regarding car82 problem:
Could you describe it more? (jUnit test would be the best.:-) ).
Do you use any set clock method?

Regards
Martin