[JBoss JIRA] Created: (JBPM-2943) Problem terminating concurent executions that have active sub-processes [jBPM 4.3/4.4 + Oracle]
by Michal Klimuk (JIRA)
Problem terminating concurent executions that have active sub-processes [jBPM 4.3/4.4 + Oracle]
-----------------------------------------------------------------------------------------------
Key: JBPM-2943
URL: https://jira.jboss.org/browse/JBPM-2943
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.4, jBPM 4.3
Environment: JDK 1.6_20, Oracle 10, Spring 2.5.6, Hibernate 3.3.1.GA
Reporter: Michal Klimuk
I have a process that contains a fork activity with two branches - one containing a sub-process and the other any type of node from which we can terminate the whole process directly. A simplified version for test purposes would be:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<process name="p1"
schemaLocation="http://jbpm.org/4.0/jpdl http://docs.jboss.org/jbpm/xsd/jpdl-4.0.xsd"
xmlns="http://jbpm.org/4.0/jpdl">
<start g="143,27,80,40" name="start">
<transition g="-54,-22" name="to fork1" to="fork1" />
</start>
<fork g="143,117,48,48" name="fork1">
<transition g="-38,-22" name="to p2" to="p2" />
<transition g="34,-14" name="to state1" to="state1" />
</fork>
<state g="199,214,108,52" name="state1">
<transition to="join1" />
<transition g="-11,-21" name="end" to="end2" />
</state>
<sub-process g="18,227,92,52" name="p2" sub-process-key="p2">
<transition to="join1" />
</sub-process>
<join g="141,334,48,48" name="join1">
<transition to="end" />
</join>
<end-cancel g="405,217,92,102" name="end2" />
<end g="141,446,80,40" name="end" />
</process>
{code}
When I run the process and try to signal node 'state1' to end the whole process I get a constraint violation :
{color:red}
org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#10003]
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.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)
at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findProcessInstanceByIdIgnoreSuspended(DbSessionImpl.java:211)
at org.jbpm.pvm.internal.hibernate.DbSessionImpl.deleteProcessInstance(DbSessionImpl.java:251)
at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:382)
at org.jbpm.jpdl.internal.activity.EndActivity.execute(EndActivity.java:82)
at org.jbpm.jpdl.internal.activity.EndActivity.execute(EndActivity.java:45)
at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:417)
at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:61)
at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:35)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:55)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:88)
at org.jbpm.test.SubprocessTest.testEndWithActiveSubprocesses(SubprocessTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160)
at org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233)
at org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333)
at org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217)
at org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197)
at org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160)
at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.sql.SQLException: ORA-02292: violation de contrainte (BDOOA.FK_EXEC_SUPEREXEC) d'intégrité - enregistrement fils existant
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:966)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3423)
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2551)
... 54 more
{color}
I investigated the problem and I found out that it is due to the fact that we never try to terminate an existing sub-process from within the ExecutionImpl.end() method. It causes a delete of the parent execution row although it is still referenced by SUPEREXEC_ column of the sub-process.
I created a patch that works and that consists on adding the following code to ExecutionImpl.end(String state) (my code in the middle paragraph):
{code}
// end all child executions
// making a copy of the executions to prevent ConcurrentMoidificationException
List<ExecutionImpl> executionsToEnd = new ArrayList<ExecutionImpl>(executions);
for (ExecutionImpl child: executionsToEnd) {
child.end(state);
}
// terminates the sub-process if it exists
if(subProcessInstance != null) {
// to avoid the return signal (see superProcessExecution.signal() in the end(String state) method)
subProcessInstance.setSuperProcessExecution(null);
subProcessInstance.end(state);
}
setState(state);
{code}
I don't know if it is the right approach but it works pretty much fine. I join both the patch and the test module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBPM-2951) TaskService.completeTask fails when called with variables but no outcome
by Jon Kranes (JIRA)
TaskService.completeTask fails when called with variables but no outcome
------------------------------------------------------------------------
Key: JBPM-2951
URL: https://jira.jboss.org/browse/JBPM-2951
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.4
Reporter: Jon Kranes
Given a task 'task1' with a single named transition, if I call the variant of completeTask that takes the taskID and a Map of variables, the result is an error: "No unnamed transitions were found for the task 'task1'
According to the user guide (Section 5.7), if a task has one outgoing transition with a name, then calling compeleteTask(id, null) is expected to result in an error. It appears that calling completeTask(id, variables) is being treated as equivalent to calling completeTask(id, null, variables) and thus causing an error. This behavior seems incorrect -- completeTask(id, variables) should, aside from setting variables, follow the behavior of completeTask(id), which according to the user guide will complete the task and take the single outgoing transition regardless of whether it is named or not.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBPM-2944) JBoss Tools jBPM Project Wizard tries to get runtime from a broken link
by David Lambert (JIRA)
JBoss Tools jBPM Project Wizard tries to get runtime from a broken link
-----------------------------------------------------------------------
Key: JBPM-2944
URL: https://jira.jboss.org/browse/JBPM-2944
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: GPD
Affects Versions: jBPM 4.4
Environment: Rational Software Architect for WebSphere 7.5.3 on Windows XP SP3, IBM JDK 1.6
Reporter: David Lambert
Priority: Minor
I'm trying to set up a new jBPM project using the JBoss Tools wizard. The second screen asks the user to "Locate a JBoss jBPM Runtime" and offers a link to "Download the JBoss jBPM package if you have none available yet". However, clicking that link opens an Internet Explorer window pointing to
http://www.jboss.org/jbpm/downloads/
, which displays the message "Sorry, the page you're looking for cannot be found. Please use the Search box in the header to check that the information isn't located somewhere else."
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBPM-2950) HibernateException is thrown during concurrent Timers persistence
by Borislav Andruschuk (JIRA)
HibernateException is thrown during concurrent Timers persistence
-----------------------------------------------------------------
Key: JBPM-2950
URL: https://jira.jboss.org/browse/JBPM-2950
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Borislav Andruschuk
We deploy ProcessDefinition on application startup and use this one persisted instance during application activity in several threads (i.e. during full application live time). We noticed that during concurrent Timers creation for several processes which build from this ProcessDefinition instance we've got:
org.hibernate.HibernateException: identifier of an instance of org.jbpm.graph.def.Action was altered from 532 to 533
After investigation I've noticed that Action instance is persisted anew (not updated) in concurrent threads and new row appears in the table. The problematic place is in org.jbpm.db.JobSession.saveJob where Action is checked on existence in Hibernate Session's persistent context. The suggested fix is to changed condition:
!session.contains(action)
to
action.getId() == 0L
This change fixes our problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBPM-2949) JBPM4_LOB table its field BLOB_VALUE_ is only 255 bytes using database DB2; SQL ERROR 302
by Bastiaan Asselman (JIRA)
JBPM4_LOB table its field BLOB_VALUE_ is only 255 bytes using database DB2; SQL ERROR 302
-----------------------------------------------------------------------------------------
Key: JBPM-2949
URL: https://jira.jboss.org/browse/JBPM-2949
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.4
Environment: Ubuntu, JBPM 4.4, DB2 9.7, Java 5.0
Reporter: Bastiaan Asselman
In my hibernate config I defined to create the table structure.
When deploying a jpdl.xml file, the database structure is created. This is done successfully.
Unfortunately the length of the BLOB for the column BLOB_VALUE_ of the table JBPM4_LOB is too small, only 255 bytes.
My jpdl.xml file is bigger, and can therefor not be stored in the field. This results in the SQL error 302. (the data is too big for the field).
If I investigated the jbpm.execution.hbm.xml in the jar jbpm-pvm-4.4.jar, I found that there is no length specified for this field.
Strange enough DB2 its default length for a BLOB field is 1MB.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBPM-2962) Retrieving variable with null value failed in scripts
by William Ferreira (JIRA)
Retrieving variable with null value failed in scripts
-----------------------------------------------------
Key: JBPM-2962
URL: https://jira.jboss.org/browse/JBPM-2962
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.4
Reporter: William Ferreira
setting a variable with a null value in context cause the application to fail while trying to retrieve it from a (Groovy) Script :
Caused by: groovy.lang.MissingPropertyException: No such property: XXX
The bug is related to the EnvironmentBindings class :
'containsKey(Object key)' method makes use of the method 'get(Object key)' to determine if a Variable exists, but 'get(Object key)' returns the value of the key...
Regards
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBPM-2966) cancel and error end activity throws exception in subprocess
by Philipp Ossler (JIRA)
cancel and error end activity throws exception in subprocess
------------------------------------------------------------
Key: JBPM-2966
URL: https://jira.jboss.org/browse/JBPM-2966
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.4
Environment: jBPM 4.4
Reporter: Philipp Ossler
I created a simple process which includes a state and a subprocess with different end activities
The subprocess is similar to the example in user guide > http://docs.jboss.com/jbpm/v4/userguide/html_single/#endstate.
When I send the signal "end" to the state in the subprocess, the process wait in state "end state". That's correct!
But if I send the signal "cancel" or "end", a JbpmException "execution[...] has running subprocess: execution[...] in state cancel/error" throws.
This exception throws in method checkActive() of the class ExecutionImpl.
{code:java}
if (!isActive())
protected void checkActive()
{
if (!isActive())
{
throw new JbpmException(toString() + " is not active: " + state);
}
else if (this.subProcessInstance != null
&& !Execution.STATE_ENDED.equals(this.subProcessInstance.getState()))
{
throw new JbpmException(toString() + " has running subprocess: "
+ this.subProcessInstance.toString() + " in state " + this.subProcessInstance.getState());
}
}
{code}
The problem is that the methode only check if the subprocess has the state "end".
I think the method have to check if the subprocess state is one of {end, cancel, error}. Right?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBPM-2967) jBPM not support Hibernate 3.6 on oracle db
by Mark Li (JIRA)
jBPM not support Hibernate 3.6 on oracle db
-------------------------------------------
Key: JBPM-2967
URL: https://jira.jboss.org/browse/JBPM-2967
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.4
Environment: oracle 10g, hibernate 3.6, jBPM 3.6, java 1.6, windows 7
Reporter: Mark Li
following code will throw a cant cast to oracle.sql.BLOB exception!
ProcessEngine processEngine = new Configuration().setResource("cn/ac/iitcm/cmcollect/jbpm.cfg.xml").buildProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
NewDeployment deployment = repositoryService.createDeployment();
String id = deployment.addResourceFromClasspath("cn/ac/iitcm/cmcollect/collectprocess.jpdl.xml").deploy();
if I change to setBlob to setBinaryStream, this exception will pass, but other exception appears:
It will break constraint for JBPM_DEPLOYMENT.
hibernate 3.6 is much more faster than 3.6, I donot want to switch back. please correct this. thanks.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBPM-2969) DST switching not considered for in BusinessCalendarImpl
by Michael Wohlfart (JIRA)
DST switching not considered for in BusinessCalendarImpl
--------------------------------------------------------
Key: JBPM-2969
URL: https://jira.jboss.org/browse/JBPM-2969
Project: jBPM
Issue Type: Bug
Components: Runtime Engine
Affects Versions: jBPM 4.4
Environment: ubuntu 10.10, OpenJDK1.6
Reporter: Michael Wohlfart
Priority: Minor
BusinessCalendarImpl doesn't honor DST switching, in some special cases (less than 5 days before DST switching and 1 hour before midnight)
the following test fails:
-------------------------------------------------------------------------------
Test set: org.jbpm.test.timer.TimerTest
-------------------------------------------------------------------------------
Tests run: 17, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.696 sec <<< FAILURE!
testTimerELCalendarSubtract(org.jbpm.test.timer.TimerTest) Time elapsed: 0.071 sec <<< FAILURE!
junit.framework.AssertionFailedError: expected:<26> but was:<27>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:280)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:198)
at junit.framework.Assert.assertEquals(Assert.java:204)
at org.jbpm.test.timer.TimerTest.testTimerELCalendarSubtract(TimerTest.java:304)
to me it seems like this is cause by the BusinessCalendarImpl and the upcoming DST which leads to a wrong day of month calculation in the test and/or BusinessCalendarImpl class
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years