[jboss-user] [JBoss jBPM] - Exception while executing SubProcess

suchi1247 do-not-reply at jboss.com
Mon Aug 20 06:01:04 EDT 2007


Hi., 
 Iam trying to executing the below program in which ProcessState node is used.
<process-definition
  |   xmlns=""  name="MainProcess">
  |    <start-state name="start">
  |       <transition name="" to="state1"></transition>
  |    </start-state>
  |    <state name="state1">
  |       <transition name="" to="process1"></transition>
  |    </state>
  |    <end-state name="end1"></end-state>
  |    <process-state name="process1">
  |     <sub-process name="ChildProcess"></sub-process>
  |     <transition name="" to="end1"></transition>
  |    </process-state>
  | </process-definition>
And the childProcess is

  | <process-definition
  |   xmlns=""  name="ChildProcess">
  |    <start-state name="start">
  |       <transition name="" to="ChildProcessState"></transition>
  |    </start-state>
  |    <state name="ChildProcessState">
  |       <event type="node-enter">
  |          <action name="Action" class="com.iton.handlers.ChildProcessAction"></action>
  |       </event>
  |       <transition name="" to="end1"></transition>
  |    </state>
  |    <end-state name="end1"></end-state>
  | </process-definition>
  | 
The Program which iam trying to Execute is 

  | 	JbpmConfiguration jbpmConfiguration =JbpmConfiguration.parseResource("hibernate.cfg");
  | 		JbpmContext jbpmContext=jbpmConfiguration.createJbpmContext();
  | 		  try{
  | //		parsing sub process
  | 		ProcessDefinition subProcessDefinition = ProcessDefinition.parseXmlResource("ChildProcess/processdefinition.xml");
  |         System.out.println("Entered into Subproceess");
  |         jbpmContext.deployProcessDefinition(subProcessDefinition);
  |         System.out.println("subproceess Deployed ");
  |         ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("MainProcess/processdefinition.xml");
  |     	System.out.println("Entered into Main Process");
  | 		jbpmContext.deployProcessDefinition(processDefinition);
  | 		System.out.println("Main proceess deployed");
  | 		
  |          ProcessInstance subProcessInstance = subProcessDefinition.createProcessInstance();
  |       	  jbpmContext.save(subProcessInstance);
  |       	  System.out.println("subproceess saved ");
  |       	  //parsing parent process
  |       	  ProcessInstance processInstance = processDefinition.createProcessInstance();
  |       	  jbpmContext.save(processInstance);
  | 		  System.out.println("Main Process Saved");
  | 		  
  | 	    System.out.println(" a: "+ processInstance.getRootToken().getNode().getName());
  | 		processInstance.signal();
  | 		System.out.println(" b: "+ processInstance.getRootToken().getNode().getName());
  | 		System.out.println("going to Process State now");
  | 	processInstance.signal();
  |   }  	
  | 			catch(Exception e)
  | 			{e.printStackTrace();}
  | 			finally{
  | 				jbpmContext.close();
  | 				}
  | 
But I found the following Exception while executing the above code.
14:25:15,057 WARN   [JDBCExceptionReporter] SQL Error: 1, SQLState: 23000
  | 14:25:15,057 ERROR  [JDBCExceptionReporter] ORA-00001: unique constraint (JBPM.SYS_C007079) violate
  | 
  | 14:25:15,057 WARN   [JDBCExceptionReporter] SQL Error: 1, SQLState: 23000
  | 14:25:15,057 ERROR  [JDBCExceptionReporter] ORA-00001: unique constraint (JBPM.SYS_C007079) violate
  | 
  | 14:25:15,057 ERROR  [AbstractFlushingEventListener] Could not synchronize database state with sessi
  | org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
  |         at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
  |         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  |         at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
  |         at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92)
  |         at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
  |         at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:218)
  |         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.ja
  |         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.ja
  |         at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:52)
  |         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
  |         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
  |         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
  |         at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushing
  |         at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java
  |         at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
  |         at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
  |         at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
  |         at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:253)
  |         at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:211)
  |         at org.jbpm.svc.Services.close(Services.java:222)
  |         at org.jbpm.JbpmContext.close(JbpmContext.java:139)
  |         at com.iton.servlets.TestProcessState.doGet(TestProcessState.java:90)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.j
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Ht
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  |         at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (JBPM.SYS_C007079) violated
  | 
  |         at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:441)
  |         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:337
  |         at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
  |         at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
  |         ... 39 more
  | 
And I found that exceptiom is araised when it entered in to subprocess and the statements in childprocess action are printed on console.Also processdefinition and processinstances are saved in the db while executing.

Please Some one Help me to solve this Problem.

Thank you.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075738#4075738

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075738



More information about the jboss-user mailing list