Antoine T [
https://community.jboss.org/people/atran] created the discussion
"Re: Not terminating process if timer"
To view the discussion, visit:
https://community.jboss.org/message/805922#805922
--------------------------------------------------------------
Hi,
Thank you for your answer. I tried your solution in a script task before the end:
StatefulKnowledgeSession ksession = (StatefulKnowledgeSession)
kcontext.getKnowledgeRuntime();
ksession.dispose();
However, the process terminated with an exception:
ERROR instance.timer.TimerManager.execute - Error when executing timer job
org.drools.RuntimeDroolsException: Unexpected exception executing action
org.jbpm.process.instance.event.DefaultSignalManager$SignalProcessInstanceAction@71b8b3bb
at
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:995)
at
org.drools.impl.StatefulKnowledgeSessionImpl.executeQueuedActions(StatefulKnowledgeSessionImpl.java:866)
at
org.jbpm.process.instance.event.DefaultSignalManager.signalEvent(DefaultSignalManager.java:90)
at
org.jbpm.process.instance.timer.TimerManager$ProcessJob.execute(TimerManager.java:323)
at org.drools.time.SelfRemovalJob.execute(SelfRemovalJob.java:15)
at org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:51)
at org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:14)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown
Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jbpm.workflow.instance.WorkflowRuntimeException:
[fr.thales.services.jbpm.validationPattern.SimpleTimer:1 - Script:4] -- Illegal method
call. This session was previously disposed.
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:132)
I guess the timer thread just never ends?
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/805922#805922]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]