<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with simple process in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118328#M83461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want it to create a new timer, that's perfect. I want to run this process every day at a certain time for 1000 times.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's why I used time cycle. But the problem is that the new timer being created is not being set the correct time which would be +1 day, as stated on my timer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2012 14:26:09 GMT</pubDate>
    <dc:creator>fwachs</dc:creator>
    <dc:date>2012-12-21T14:26:09Z</dc:date>
    <item>
      <title>Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118324#M83457</link>
      <description>Hi all,I'm having a hard time with a really simple process.It's got a timer start event, then the process runs perfectly. The problem is that once it's done .. it runs it again! and again and again.[img]https://s3.amazonaws.com/zukbox-test/resources/problem2.png[/img]What could be causing this probl</description>
      <pubDate>Fri, 21 Dec 2012 12:27:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118324#M83457</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-21T12:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118325#M83458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How did you specify your timer-event definition? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;Example: process will start 4 times, in 5 minute intervals, starting on 11th march 2011, 12:13&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="theStart"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timerEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timeCycle&amp;gt;R4/2011-03-11T12:13/PT5M&amp;lt;/timeCycle&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/timerEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/startEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Example: process will start once, on selected date&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="theStart"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timerEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timeDate&amp;gt;2011-03-11T12:13:14&amp;lt;/timeDate&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/timerEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/startEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 13:43:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118325#M83458</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-12-21T13:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118326#M83459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have just realized that this is happening to all of my process with timer start events.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;startEvent id="InicioViajeros" name="Inicio de proceso de viajeros - 15 PM"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timerEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timeCycle&amp;gt;R1000/2012-12-11T15:00:00-03/P1D&amp;lt;/timeCycle&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/timerEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/startEvent&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems the timer runs, then a new one gets created with the same time the previous one should have ran. For example, a timer should trigger at 1pm on 12/21/2012 , it gets executed and a new timer gets created with a trigger date of 1pm 12/21/2012 instead of 12/22/2012 at 1pm…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm on activiti 5.11. I'm forced to shut down activiti in prod environment because of this and to eliminate the jobs by hand in the database. Worst case scenario here &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://connect.hyland.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used to have the explorer and the rest deployed on the same server and that caused trouble before, i removed the rest webapp and everything started working like it should, everything but this timer thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had to remove by hand a few jobs from the jobs table, maybe i screwed the db?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm TOTALLY LOST&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 13:52:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118326#M83459</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-21T13:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118327#M83460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&amp;lt;timeCycle&amp;gt;R1000/2012-12-11T15:00:00-03/P1D&amp;lt;/timeCycle&amp;gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you use a timeCYCLE it is indeed expected that a new timer is created every time the timer fires.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Use timeDate or timeDuration otherwise.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 14:24:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118327#M83460</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-12-21T14:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118328#M83461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want it to create a new timer, that's perfect. I want to run this process every day at a certain time for 1000 times.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's why I used time cycle. But the problem is that the new timer being created is not being set the correct time which would be +1 day, as stated on my timer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 14:26:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118328#M83461</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-21T14:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118329#M83462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Any ideas? This continues to be a problem on prod and it's been turned off ever since …&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am out of ideas on why this doesn't work, seems to work best when the number of subprocesses created are not many ( 1 or 2) and it starts working bad with +200.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once i kill activiti since the it's not working like it should, the timer on the db is left like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;select * from ACT_RU_JOB where HANDLER_CFG_&amp;lt;&amp;gt;'VerificarExistenciaSuscripcionTrial';&lt;/CODE&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;ID_ REV_ TYPE_ LOCK_EXP_TIME_ LOCK_OWNER_ EXCLUSIVE_ EXECUTION_ID_ PROCESS_INSTANCE_ID_ PROC_DEF_ID_ RETRIES_ EXCEPTION_STACK_ID_ EXCEPTION_MSG_ DUEDATE_ REPEAT_ HANDLER_TYPE_ HANDLER_CFG_&lt;BR /&gt;349640 8 timer 2012-12-22 14:05:00 64e9e6c3-d0fd-4994-b126-42dfd44f26ee 1 NULL NULL NULL 1 NULL NULL 2012-12-22 13:30:00 0 30 13 * * ? timer-start-event EnvioMensajesSinR&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;It is also throwing &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;SEVERE: Error while closing command context&lt;BR /&gt;org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[349640] was updated by another transaction concurrently&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.db.DbSqlSession$DeletePersistentObjectOperation.execute(DbSqlSession.java:238)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:667)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:461)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:167)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:114)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:69)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:46)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.Thread.run(Thread.java:679)&lt;BR /&gt;Exception in thread "pool-1-thread-5" org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[349640] was updated by another transaction concurrently&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.db.DbSqlSession$DeletePersistentObjectOperation.execute(DbSqlSession.java:238)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems there's a problem with the revisions of that timer…it ran 8 times when it only had to run once and then be erased, to leave room for a new timer to be created afterward with a new execution date ( +1 day , if you check the cron expression), but activiti keeps adding revisions and firing the same timer ad eternum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;// It only makes sense to check for optimistic locking exceptions for objects that actually have a revision&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (persistentObject instanceof HasRevision) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int nrOfRowsDeleted = sqlSession.delete(deleteStatement, persistentObject);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (nrOfRowsDeleted == 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new ActivitiOptimisticLockingException(DbSqlSession.this.toString(persistentObject) + " was updated by another transaction concurrently");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sqlSession.delete(deleteStatement, persistentObject);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure how , but it seems the revision are the problem here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;!– JOB DELETE STATEMENTS–&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;delete id="deleteJob" parameterType="org.activiti.engine.impl.persistence.entity.JobEntity"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ${prefix}ACT_RU_JOB where ID_ = #{id} and REV_ = #{revision}&lt;BR /&gt;&amp;nbsp; &amp;lt;/delete&amp;gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &amp;lt;delete id="deleteTimer" parameterType="org.activiti.engine.impl.persistence.entity.JobEntity"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ${prefix}ACT_RU_JOB where ID_ = #{id} and REV_ = #{revision}&lt;BR /&gt;&amp;nbsp; &amp;lt;/delete&amp;gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &amp;lt;delete id="deleteMessage" parameterType="org.activiti.engine.impl.persistence.entity.JobEntity"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from ${prefix}ACT_RU_JOB where ID_ = #{id} and REV_ = #{revision}&lt;BR /&gt;&amp;nbsp; &amp;lt;/delete&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok, i've modified those scritps and it didn't work, it still keeps running for eternity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this is not working correctly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;@Override&lt;BR /&gt;&amp;nbsp; public void execute(CommandContext commandContext) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.execute(commandContext);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (repeat == null) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (log.isLoggable(Level.FINE)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log.fine("Timer " + getId() + " fired. Deleting timer.");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date newTimer = calculateRepeat();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (newTimer != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimerEntity te = new TimerEntity(this);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; te.setDuedate(newTimer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Context&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getCommandContext()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getJobManager()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .schedule(te);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; private Date calculateRepeat() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BusinessCalendar businessCalendar = Context&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getProcessEngineConfiguration()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getBusinessCalendarManager()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getBusinessCalendar(CycleBusinessCalendar.NAME);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return businessCalendar.resolveDuedate(repeat);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll debug as well as I can though. But some help would be greatly appreciated, what i'm doing is pretty simple, I don't understand how it can be so difficult.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 17:10:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118329#M83462</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-23T17:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118330#M83463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've continued doing testing with no luck, when restarting or re-deploying the processes start working like they should. This is only getting stranger.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What concerns me is, what could it possibly make that a job revision field gets incremented and the timer won't be erased to be replaced by another one using the code on TimerEntity.execute() ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to follow the code but it's huge. Any hints are appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 23:11:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118330#M83463</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-23T23:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118331#M83464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've created a unit test with your start event timer definition, and it's working like it's supposed to for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So when a job is executed, a new job is created for the next day. Could you create a unit test that shows your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, please update your post about the classloading exception (&lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/en/viewtopic.php?t=5754" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/en/viewtopic.php?t=5754&lt;/A&gt;&lt;SPAN&gt;). Other forum users might be interested in what caused this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 08:26:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118331#M83464</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2012-12-24T08:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118332#M83465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is not a problem that is easily reproduced, so far I can only reproduce it by leaving the jobs to their own good, with +24h of running without interrumptions and that's when it begins to ocurr. The new timer does not get created and instead the revisions field gets incremented everytime the timer gets executed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you think of a way that something like that could happen?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll update the other thread, sure.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 11:00:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118332#M83465</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-24T11:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118333#M83466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, does the job succeed or does it run into an error (OptimisticLockingException for example)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How long does the job need to execute? Is it only starting a process instance and executing a few automatic service tasks that run very quickly? Or does starting the process instance take very long (&amp;gt; 30 seconds) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 12:05:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118333#M83466</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2012-12-24T12:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118334#M83467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Okay, does the job succeed or does it run into an error (OptimisticLockingException for example)?&lt;BR /&gt;How long does the job need to execute? Is it only starting a process instance and executing a few automatic service tasks that run very quickly? Or does starting the process instance take very long (&amp;gt; 30 seconds) ?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;The job sometimes succeds sometimes it throws OptimisticLockingException, The job could take from 1 to 15 minutes the most, depending on how many emails it needs to send. I've modified MailActivityBehavior to not fail under any circumstance, the process is the same you are seeing up here in this thread, just a few service tasks whi ch only hit the database for a query that takes no time and never fails, then starts sending emails and emails …&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 12:09:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118334#M83467</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-24T12:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118335#M83468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay then I understand. While the process is sending the e-mails, the transaction is not committed yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Because we have a default job lock interval of 5 minutes, if a job takes longer than 5 minutes, the job executor will try the same job again because it expects that something went wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you can't refactor the process to keep the execution under 5 minutes, the best way to go forward is to increase the lockTimeInMillis to some value in which the job is definitely executed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Although my advice would be to reduce the synchronous job execution time if possible using for example async handling.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 12:31:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118335#M83468</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2012-12-24T12:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118336#M83469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Okay then I understand. While the process is sending the e-mails, the transaction is not committed yet.&lt;BR /&gt;Because we have a default job lock interval of 5 minutes, if a job takes longer than 5 minutes, the job executor will try the same job again because it expects that something went wrong.&lt;BR /&gt;If you can't refactor the process to keep the execution under 5 minutes, the best way to go forward is to increase the lockTimeInMillis to some value in which the job is definitely executed.&lt;BR /&gt;Although my advice would be to reduce the synchronous job execution time if possible using for example async handling.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;So what you are saying is I should modify either this on the code protected int lockTimeInMillis = 5 * 60 * 1000; in JobExecutor.java&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or change my process to support asynchronous execution. I believe that, for me, it's best to change both actually, right? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting my subproces as asynchronous and exlusive to false would be an improvement as well?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 12:40:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118336#M83469</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-24T12:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118337#M83470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;o what you are saying is I should modify either this on the code protected int lockTimeInMillis = 5 * 60 * 1000; in JobExecutor.java&lt;BR /&gt;or change my process to support asynchronous execution. I believe that, for me, it's best to change both actually, right?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a setter for the lockTimeMillis on the JobExecutor. Retrieve the job executor by casting the process engine to ProcessEngineImpl and set the timing accordingly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternatively (and maybe cleaner) you can inject your own JobExecutor impl (extending the default one) on the ProcessEngineCOnfiguration (ie in your activiti.cfg.xml).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 09:01:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118337#M83470</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-12-26T09:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118338#M83471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;o what you are saying is I should modify either this on the code protected int lockTimeInMillis = 5 * 60 * 1000; in JobExecutor.java&lt;BR /&gt;or change my process to support asynchronous execution. I believe that, for me, it's best to change both actually, right?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;There is a setter for the lockTimeMillis on the JobExecutor. Retrieve the job executor by casting the process engine to ProcessEngineImpl and set the timing accordingly.&lt;BR /&gt;&lt;BR /&gt;Alternatively (and maybe cleaner) you can inject your own JobExecutor impl (extending the default one) on the ProcessEngineCOnfiguration (ie in your activiti.cfg.xml).&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Sounds good, I'll do that then! What do you think about changing asynchronous (to true) and exclusive ( to false) to the subprocess ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 11:18:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118338#M83471</guid>
      <dc:creator>fwachs</dc:creator>
      <dc:date>2012-12-26T11:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with simple process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118339#M83472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What do you think about changing asynchronous (to true) and exclusive ( to false) to the subprocess ?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;That is an option, but you would also increase the risk for an optimistic locking exception.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2013 09:21:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-simple-process/m-p/118339#M83472</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-01-03T09:21:48Z</dc:date>
    </item>
  </channel>
</rss>

