01-28-2013 01:40 PM
@Test
@Deployment
public void myTimerTestExample() {
//Start a new process instance
String processDefinitionKey = "mykey";
ProcessInstance instance = runtimeService.startProcessInstanceByKey(processDefinitionKey);
String processInstanceId = instance.getProcessInstanceId();
//Find the timer job. For this process, there is exactly one timer job which is always started
Job timerJob = managementService.createJobQuery().processInstanceId(processInstanceId).singleResult();
Assert.assertNotNull(timerJob );
//Force the timer to fire
managementService.executeJob(timerJob .getId());
//TODO: Validate the results of the timer executing
}
2013-01-28 18:18:39 ERROR org.activiti.engine.impl.jobexecutor.TimerCatchIntermediateEventJobHandler exception during timer execution
org.activiti.engine.impl.pvm.PvmException: already taking a transition
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:363) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.ServiceTaskDelegateExpressionActivityBehavior.execute(ServiceTaskDelegateExpressionActivityBehavior.java:77) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:65) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:115) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:370) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:68) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:65) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:115) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:370) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:65) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:115) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:370) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.bpmn.behavior.IntermediateCatchEventActivitiBehaviour.signal(IntermediateCatchEventActivitiBehaviour.java:27) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:353) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.jobexecutor.TimerCatchIntermediateEventJobHandler.execute(TimerCatchIntermediateEventJobHandler.java:46) ~[activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:80) [activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.persistence.entity.TimerEntity.execute(TimerEntity.java:62) [activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:68) [activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) [activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:60) [activiti-engine-5.11.jar:5.11]
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42) [activiti-spring-5.11-WSM-01.jar:na]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [spring-tx-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40) [activiti-spring-5.11-WSM-01.jar:na]
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32) [activiti-engine-5.11.jar:5.11]
at org.activiti.engine.impl.ManagementServiceImpl.executeJob(ManagementServiceImpl.java:57) [activiti-engine-5.11.jar:5.11]
at com.whaleshark.ActivitiTestError.myTimerTestExample(ActivitiTestError.java:48) [test-classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_25]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_25]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:na]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:na]
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit-4.11.jar:na]
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) [spring-test-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.11.jar:na]
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) [spring-test-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:53) [junit-4.11.jar:na]
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) [spring-test-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) [spring-test-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) [spring-test-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit-4.11.jar:na]
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) [spring-test-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:na]
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) [spring-test-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:na]
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76) [junit-rt.jar:na]
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) [junit-rt.jar:na]
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) [junit-rt.jar:na]
01-29-2013 03:28 AM
01-31-2013 02:04 PM
boolean active = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration().getJobExecutor().isActive();
Assert.assertTrue(active);
@Test
@Deployment
public void myTimerTestExample() {
//Unfortunately, the ProcessEngine interface doesn't expose the JobExecutor
//So we are forced to cast to the implementation
boolean active = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration().getJobExecutor().isActive();
Assert.assertTrue(active);
//Start a new process instance
String processDefinitionKey = "mykey";
ProcessInstance instance = runtimeService.startProcessInstanceByKey(processDefinitionKey);
String processInstanceId = instance.getProcessInstanceId();
//Find the timer job. For this process, there is exactly one timer job which is always started
Job timerJob = managementService.createJobQuery().processInstanceId(processInstanceId).singleResult();
Assert.assertNotNull(timerJob );
//Force the timer to fire
managementService.executeJob(timerJob.getId());
//TODO: Validate the results of the timer executing
}
01-31-2013 06:12 PM
02-01-2013 03:03 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.