AnsweredAssumed Answered

Timer Start Event - Unable to get it to work as described

Question asked by ct1 on Dec 14, 2011
Latest reply on Dec 15, 2011 by ct1
I am having difficulty using the timer start event.  Could you please look at this documentation and tell me what I have missed?

The User's Guide says:
timeCycle. Specifies repeating interval, which can be useful for starting process periodically, or for sending multiple reminders for overdue user task. Time cycle element can be in two formats. First is the format of recurring time duration, as specified by ISO 8601 standard. Example (3 repeating intervals, each lasting 10 hours):

<timerEventDefinition>
    <timeCycle>R3/PT10H</timeCycle>
</timerEventDefinition>

The User's Guide also says:
Example: process will start 4 times, in 5 minute intervals, starting on 11th march 2011, 12:13

        <startEvent id="theStart">
            <timerEventDefinition>
                <timeCycle>R4/2011-03-11T12:13/PT5M</timeCycle>
            </timerEventDefinition>
        </startEvent>

"Starting process periodically" is what I am trying to do with the following (from my BPMN20.xml file):

    <startEvent id="applicationScreeningStarter" name="Application Screening Starter">
      <timerEventDefinition>
        <timeCycle>R4/PT5M</timeCycle>
      </timerEventDefinition>
    </startEvent>

The timer start event starts five minutes after I deploy the process in Explorer.

The process runs up to the first User Task and waits for the user to perform the task, which could reasonably take place three or four hours later.

Here is my log file for the first timer execution:

INFO: Processing resource Application Screening Process.png
CheckForFile4.execute() was called at Wed Dec 14 10:35:35 CST 2011
CheckForFile$.lookForResumeFile() is running theCommand = "cmd /C dir C:\DataFiles\Incoming\*.Resume
.txt".
In CheckForFile4.lookForResumeFile() set theFileName = "GeorgeGoings.Resume.txt
In CheckForFile4.execute() set fileExists = true.
Resume GeorgeGoings.Resume.txt was found in Incoming folder by CheckForAFile4 Process.
SetProcessFolderName found oldFilePath is C:\DataFiles\Incoming\, oldFileName is GeorgeGoings.Resume
.txt, newFilePath is C:\DataFiles\ToProcess\, newFileName is GeorgeGoings.Resume.txt.
RenameAFile process was started.
FileRename.execute() was called atWed Dec 14 10:35:35 CST 2011
In FileRename.execute() started with oldFilePath = C:\DataFiles\Incoming\, oldFileName = GeorgeGoing
s.Resume.txt, newFilePath = C:\DataFiles\ToProcess\, and newFileName = GeorgeGoings.Resume.txt
In FileRename.buildFullFileName() built file name = "C:\DataFiles\Incoming\GeorgeGoings.Resume.txt".

In FileRename.buildFullFileName() built file name = "C:\DataFiles\ToProcess\GeorgeGoings.Resume.txt"
.
FileRename.lookForFile() was called with theFullFileName = "C:\DataFiles\Incoming\GeorgeGoings.Resum
e.txt".
In FileRename.lookForFile() set fileFound = true
FileRename.lookForFile() was called with theFullFileName = "C:\DataFiles\ToProcess\GeorgeGoings.Resu
me.txt".
In FileRename.lookForFile() set fileFound = false
FileRename.changeTheName()was called with old file name = C:\DataFiles\Incoming\GeorgeGoings.Resume.
txt and new file name = C:\DataFiles\ToProcess\GeorgeGoings.Resume.txt
FileRename.changeTheName() set couldChange = true
RenameAFile process reached its last step.  renameSuccessful = true.  The renamedFileName is C:\Data
Files\ToProcess\GeorgeGoings.Resume.txt.

When it is time for the timer start event to start again (five minutes later), I get the following exception:


Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[15748] was updated by another tr
ansaction concurrently
        at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:435)
        at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:348)
        at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:147
)
        at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:103)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInte
rceptor.java:49)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInter
ceptor.java:42)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.j
ava:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.jav
a:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.jobexecutor.JobAcquisitionThread.run(JobAcquisitionThread.java:6
3)
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource CheckForAFile4.bpmn20.xml
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.jobexecutor.JobAcquisitionThread run
SEVERE: exception during job acquisition: TimerEntity[15748] was updated by another transaction conc
urrently
org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[15748] was updated by another tr
ansaction concurrently
        at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:435)
        at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:348)
        at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:147
)
        at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:103)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInte
rceptor.java:49)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInter
ceptor.java:42)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.j
ava:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.jav
a:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.jobexecutor.JobAcquisitionThread.run(JobAcquisitionThread.java:6
3)
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XMLSchema currently not supported as typeLanguage
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XPath currently not supported as expressionLanguage
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource RenameAFile.bpmn20.xml
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XMLSchema currently not supported as typeLanguage
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XPath currently not supported as expressionLanguage
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource RenameAFile.png
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource CheckForAFile4.png
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource Application Screening Process.bpmn20.xml
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XMLSchema currently not supported as typeLanguage
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XPath currently not supported as expressionLanguage
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource Application Screening Process.png
Dec 14, 2011 10:40:35 AM org.activiti.engine.impl.jobexecutor.TimerStartEventJobHandler execute
SEVERE: exception during timer execution
org.activiti.engine.ActivitiException: couldn't instantiate class opt.argo.org.CheckForFile4
        at org.activiti.engine.impl.util.ReflectUtil.instantiate(ReflectUtil.java:131)
        at org.activiti.engine.impl.bpmn.helper.ClassDelegate.instantiateDelegate(ClassDelegate.java
:156)
        at org.activiti.engine.impl.bpmn.helper.ClassDelegate.getActivityBehaviorInstance(ClassDeleg
ate.java:129)
        at org.activiti.engine.impl.bpmn.helper.ClassDelegate.execute(ClassDelegate.java:110)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperati
onActivityExecute.java:44)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNo
tificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:56)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:49)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicO
perationTransitionCreateScope.java:49)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(
AtomicOperationTransitionNotifyListenerTake.java:65)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(Atomic
OperationTransitionDestroyScope.java:115)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNoti
ficationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:56)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:332
)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnA
ctivityBehavior.java:102)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavio
r(BpmnActivityBehavior.java:51)
        at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBeh
avior.java:44)
        at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityB
ehavior.java:36)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperati
onActivityExecute.java:44)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotification
sCompleted(AtomicOperationProcessStartInitial.java:44)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:56)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsComple
ted(AtomicOperationProcessStart.java:44)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:56)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.start(ExecutionEntity.java:28
6)
        at org.activiti.engine.impl.bpmn.behavior.CallActivityBehavior.execute(CallActivityBehavior.
java:72)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperati
onActivityExecute.java:44)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNo
tificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:56)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:49)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicO
perationTransitionCreateScope.java:49)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(
AtomicOperationTransitionNotifyListenerTake.java:65)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(Atomic
OperationTransitionDestroyScope.java:115)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNoti
ficationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:56)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:332
)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnA
ctivityBehavior.java:102)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavio
r(BpmnActivityBehavior.java:51)
        at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBeh
avior.java:44)
        at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityB
ehavior.java:36)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperati
onActivityExecute.java:44)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotification
sCompleted(AtomicOperationProcessStartInitial.java:44)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:56)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsComple
ted(AtomicOperationProcessStart.java:44)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAt
omicOperation.java:56)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(Executio
nEntity.java:497)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEnt
ity.java:492)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.start(ExecutionEntity.java:28
6)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java
:72)
        at org.activiti.engine.impl.jobexecutor.TimerStartEventJobHandler.execute(TimerStartEventJob
Handler.java:38)
        at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:78)
        at org.activiti.engine.impl.persistence.entity.TimerEntity.execute(TimerEntity.java:62)
        at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:61)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java
:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInte
rceptor.java:42)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:36)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.activiti.engine.ActivitiClassLoadingException: Class not found: opt.argo.org.CheckFor
File4
        at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:81)
        at org.activiti.engine.impl.util.ReflectUtil.instantiate(ReflectUtil.java:128)
        … 116 more

Outcomes