[JBoss jBPM] - Timers don't get executed after server crash
by jeppe.klausen
We've experiencing some problems regarding timers that don't get executed using jBPM version 3.2.2 after a server crash.
It seems like that not alle timers are re-initiated after rebooting the application server (ver. 4.2.2). This is getting a quite critical issue since we have a lot of non-executed jobs in the jbpm_job table with old due dates.
Is there any way to restart those triggers or to prevent this from happening?
Our jboss.xml looks like this:
<jboss>
| <enterprise-beans>
|
| <session>
| <ejb-name>CommandServiceBean</ejb-name>
| <jndi-name>ejb/CommandServiceBean</jndi-name>
| <local-jndi-name>CommandServiceBean</local-jndi-name>
| </session>
|
| <session>
| <ejb-name>TimerServiceBean</ejb-name>
| <jndi-name>ejb/TimerServiceBean</jndi-name>
| <local-jndi-name>TimerServiceBean</local-jndi-name>
| </session>
|
| <message-driven>
| <ejb-name>CommandListenerBean</ejb-name>
| <destination-jndi-name>queue/JbpmCommandQueue</destination-jndi-name>
| </message-driven>
|
| <message-driven>
| <ejb-name>JobListenerBean</ejb-name>
| <destination-jndi-name>queue/JbpmJobQueue</destination-jndi-name>
| </message-driven>
|
| </enterprise-beans>
| </jboss>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237932#4237932
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237932
16 years, 10 months
[JBoss jBPM] - Subprocess followed by
by flavio.donze
Hello everyone
I want my main process to end if the subprocess returns a certain result. If the subprocess is followed by an "end" element the following Exception is thrown:
| ### EXCEPTION ###########################################
| 14:44:51,812 SEV | [AbstractFlushingEventListener] Could not synchronize database state with session
| org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.jpdl.internal.model.JpdlExecution#6]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
| at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2569)
| at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2725)
| at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
| at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:54)
| at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:106)
| at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:65)
| at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:61)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.repository.RepositoryServiceImpl.deleteDeploymentCascade(RepositoryServiceImpl.java:62)
| at org.jbpm.examples.subprocess.outcomeactivity.SubProcessOutcomeActivityTest.tearDown(SubProcessOutcomeActivityTest.java:52)
| at junit.framework.TestCase.runBare(TestCase.java:130)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: java.sql.SQLException: Integrity constraint violation FK_EXEC_SUBPI table: JBPM4_EXECUTION in statement [delete from JBPM4_EXECUTION where DBID_=? and DBVERSION_=?]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
| at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2551)
| ... 29 more
|
You can test this using the org.jbpm.examples.subprocess.outcomeactivity test case.
Change the following:
| <process name="SubProcessDocument" xmlns="http://jbpm.org/4.0/jpdl">
|
| <start g="32,111,48,48">
| <transition to="review" />
| </start>
|
| <sub-process name="review"
| sub-process-key="SubProcessReview"
| g="96,16,127,52">
|
| <transition name="ok" to="next step" g="167,67:6,-19"/>
| <transition name="nok" to="update" g="-22,-18"/>
| <transition name="reject" to="close" g="167,200:7,3"/>
| </sub-process>
|
| <state name="next step" g="255,41,88,52"/>
| <state name="update" g="256,106,88,52"/>
| <end name="close" g="258,175,88,52"/>
|
| </process>
|
The last element is changed from a "state" to an "end" element.
Well is this constellation conceptional not possible or should I file a bug?
cheers
Flavio
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237901#4237901
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237901
16 years, 10 months
[JBoss jBPM] - jBPM 4 CR1 AsyncActivity Unit Test fails due to FK constrain
by joshsiaw
Hi, I just installed jBPM4 CR1 yesterday and have been trying out the examples and testing the api. I tried to run testAsyncActivity on JUnit and it failed with this error. Btw, I'm using MySQL 5 for the JBPM db.
| 19:11:49,159 FIN | [ProcessDefinitionImpl] creating new execution for process 'AsyncActivity'
| 19:11:49,159 FIN | [DefaultIdGenerator] generated execution id AsyncActivity.7
| 19:11:49,159 FIN | [ExecuteActivity] executing activity(18093512)
| 19:11:49,174 FIN | [JobExecutorMessageSession] sending message ExecuteActivityMessage
| 19:11:49,221 FIN | [ExecuteJobCmd] executing job ExecuteActivityMessage[8]...
| 19:11:49,237 FIN | [ExecuteActivity] executing activity(generate pdf)
| 19:11:49,237 FIN | [JobExecutorMessageSession] sending message ExecuteActivityMessage
| 19:11:49,237 FIN | [ExecuteJobCmd] executed job ExecuteActivityMessage[8]
| 19:11:49,284 FIN | [ExecuteJobCmd] executing job ExecuteActivityMessage[9]...
| 19:11:49,299 FIN | [ExecuteActivity] executing activity(calculate primes)
| 19:11:49,299 FIN | [ExecuteActivity] executing activity(end)
| 19:11:49,299 FIN | [Execution] process-instance ends with state ended
| 19:11:49,315 FIN | [DbSessionImpl] deleting process instance AsyncActivity.7
| 19:11:49,315 FIN | [ExecuteJobCmd] executed job ExecuteActivityMessage[9]
| 19:11:49,315 WRN | [JDBCExceptionReporter] SQL Error: 1451, SQLState: 23000
| 19:11:49,315 SEV | [JDBCExceptionReporter] Cannot delete or update a parent row: a foreign key constraint fails (`jbpmdb/jbpm4_execution`, CONSTRAINT `FK_EXEC_INSTANCE` FOREIGN KEY (`INSTANCE_`) REFERENCES `jbpm4_execution` (`DBID_`))
| ### EXCEPTION ###########################################
| 19:11:49,315 SEV | [AbstractFlushingEventListener] Could not synchronize database state with session
| org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.jpdl.internal.model.JpdlExecution#7]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
| at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2569)
| at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2725)
| at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
|
Basically the test is failing to delete the process instance after the jobs are done and the process reaches the end state. Does anyone have a solution for this problem? Did I setup my db connection incorrectly?
Any help would be appreciated. Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237865#4237865
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237865
16 years, 10 months