<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Problem with stopping subProcesses (jbpm 4.3)
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/danny_fh">Daniel Schiller</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/548447#548447">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi all,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>i have a simple process including a subprocess. Now it might be necessary to stop the process using execution.end("stopped") when the subprocess is active. If i stop the subprocess first, the next activity after the subprocess-activity will be called. But i want to stop the process right where it is (means while executing the subprocess). So i tried to stop the main-process first. But in that case i retrieve the following error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2010-06-17 08:59:07,595|WARN  | JDBCExceptionReporter | SQL Error: 2292, SQLState: 23000</p><p>2010-06-17 08:59:07,595|ERROR | JDBCExceptionReporter | ORA-02292: Integritäts-Constraint (JBPM.FK_EXEC_SUPEREXEC) verletzt - untergeordneter Datensatz gefunden ==> means: violation of constraint, found subordinated data <==</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2010-06-17 08:59:07,595|ERROR | AbstractFlushingEventListener | Could not synchronize database state with session</p><p>org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#3860030]</p><p>    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)</p><p>    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)</p><p>    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2569)</p><p>    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2725)</p><p>    at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)</p><p>    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)</p><p>    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)</p><p>    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)</p><p>    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)</p><p>    at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)</p><p>    at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)</p><p>    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)</p><p>    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)</p><p>    at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)</p><p>    at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findProcessInstanceByIdIgnoreSuspended(DbSessionImpl.java:212)</p><p>    at org.jbpm.pvm.internal.hibernate.DbSessionImpl.deleteProcessInstance(DbSessionImpl.java:252)</p><p>    at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:382)</p><p>    at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)</p><p>    at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)</p><p>    at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)</p><p>    at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)</p><p>    at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)</p><p>    at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)</p><p>    at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.execute(ProcessEngineImpl.java:300)</p><p>    at de.ingmbh.weblets.wm.service.services.ExecutionServiceImpl.endProcessInstance(ExecutionServiceImpl.java:202)</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</p><p>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</p><p>    at java.lang.reflect.Method.invoke(Unknown Source)</p><p>    at junit.framework.TestCase.runTest(TestCase.java:154)</p><p>    at junit.framework.TestCase.runBare(TestCase.java:127)</p><p>    at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)</p><p>    at junit.framework.TestResult$1.protect(TestResult.java:106)</p><p>    at junit.framework.TestResult.runProtected(TestResult.java:124)</p><p>    at junit.framework.TestResult.run(TestResult.java:109)</p><p>    at junit.framework.TestCase.run(TestCase.java:118)</p><p>    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)</p><p>    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)</p><p>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)</p><p>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)</p><p>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)</p><p>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)</p><p>Caused by: java.sql.SQLException: ORA-02292: Integritäts-Constraint (JBPM.FK_EXEC_SUPEREXEC) verletzt - untergeordneter Datensatz gefunden</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)</p><p>    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)</p><p>    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)</p><p>    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)</p><p>    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)</p><p>    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)</p><p>    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)</p><p>    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)</p><p>    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)</p><p>    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)</p><p>    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3468)</p><p>    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1062)</p><p>    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2551)</p><p>    ... 41 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Any suggestions?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Regards,</p><p>Daniel</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/548447#548447">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>