[JBoss jBPM] - Re: Problem configuring jBPM4 with Spring
by ziglee
My case is a little diferent. I'm using JPA (hibernate implementation) so I would like to know how can I stop depending on jbpm.hibernate.cfg.xml.
I tried to expose my sessionFactory through this bean:
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
| p:dataSource-ref="dataSource">
| <property name="jpaVendorAdapter">
| <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
| <property name="showSql" value="true" />
| <property name="generateDdl" value="true" />
| <property name="databasePlatform" value="${hibernate.dialect}" />
| </bean>
| </property>
| </bean>
|
| <bean id="sessionFactory" factory-bean="entityManagerFactory" factory-method="getSessionFactory"/>
and used
<process-engine-context>
| <command-service>
| <retry-interceptor />
| <environment-interceptor />
| <spring-transaction-interceptor />
| </command-service>
| </process-engine-context>
|
| <transaction-context>
| <transaction />
| <hibernate-session current="true" />
| </transaction-context>
|
but all I got was:
Caused by: org.hibernate.HibernateException: No CurrentSessionContext configured!
Can somebody help me?
Thanks in advance!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247845#4247845
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247845
16 years, 8 months
[JBoss jBPM] - Re: How to design a Task Node with two Transition?
by prajatna
"kukeltje" wrote : Sorry, pressed submit instead of preview.... and this link does not belong here
|
| You cannot leave a task-node on a node-enter. You can only do this on generic nodes. The usage of a tasknode is completely superfluous here.
Thanks for your comments...
Then, what we should use in my scenario, where we have two transition with a Task node.
I also tried with task assignment like....
| <task-node name="PM_Approval" >
| <task>
| <assignment class="com.sample.nodeAction.PMAssignAction"></assignment>
| </task>
| <transition to="HOD_Approval" name="Accepted"></transition>
| <transition to="end" name="Denied"></transition>
| </task-node>
|
and from inside my PMAssignAction class i am trying to switch to required transition as follows.
| public class PMAssignAction implements AssignmentHandler {
|
|
| private static final long serialVersionUID = 1L;
|
| public void assign(Assignable assignable, ExecutionContext executionContext)
| throws Exception {
|
| System.out.println("--------PMAssignAction------------1-------");
| System.out.println("This Node is---"+executionContext.getNode().getName());
|
| System.out.print("Enter your decission: ");
| BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
| String decision = null;
|
| try {
| decision = br.readLine();
| } catch (IOException ioe) {
| System.out.println("IO error trying to read your decission!");
| }
|
| System.out.println("Thanks for the desission, " + decision);
| System.out.println("---------PMAssignAction------------2-------");
|
| if(decision != null && decision.equalsIgnoreCase("a")){
|
| executionContext.getContextInstance().setVariable("decision", decision);
| System.out.println("---------PMAssignAction----a--------3---");
| executionContext.getProcessInstance().signal("Accepted");
| //leaveNode("Accepted");
| }
| else if(decision != null && decision.equalsIgnoreCase("d")){
|
| executionContext.getContextInstance().setVariable("decision", decision);
| System.out.println("---------PMAssignAction-----d-------3----");
| executionContext.getProcessInstance().signal("Denied");
|
| }
| else{
| System.out.println("Error trying to read your decission!..Enter only a/d ");
| }
| }
| }
But unfortunately , this is also not working..... The problem is that once flow reaches the end state by giving denied decision.... it is again coming back to the previous node....
Please find the log below and help me out resolving this.....Thanks..
|
| 16:49:51,530 [main] DEBUG Converters : adding converter 'R', 'org.jbpm.context.exe.converter.SerializableToByteArrayConverter'
| 16:49:51,530 [main] DEBUG Converters : adding converter 'I', 'org.jbpm.context.exe.converter.IntegerToLongConverter'
| 16:49:51,530 [main] DEBUG Converters : adding converter 'H', 'org.jbpm.context.exe.converter.ShortToLongConverter'
| 16:49:51,530 [main] DEBUG Converters : adding converter 'G', 'org.jbpm.context.exe.converter.FloatToDoubleConverter'
| 16:49:51,540 [main] DEBUG Converters : adding converter 'F', 'org.jbpm.context.exe.converter.FloatToStringConverter'
| 16:49:51,540 [main] DEBUG Converters : adding converter 'E', 'org.jbpm.context.exe.converter.ByteToLongConverter'
| Hi............
| ---------------------1-----------------
| You are now in node: start
| ---------------------2-----------------
| 16:49:51,570 [main] DEBUG GraphElement : event 'before-signal' on 'StartState(start)' for 'Token(/)'
| 16:49:51,570 [main] DEBUG GraphElement : event 'node-leave' on 'StartState(start)' for 'Token(/)'
| 16:49:51,570 [main] DEBUG GraphElement : event 'transition' on 'Transition(Test)' for 'Token(/)'
| 16:49:51,570 [main] DEBUG GraphElement : event 'node-enter' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:51,580 [main] DEBUG GraphElement : event 'task-create' on 'Task(PM_Approval)' for 'Token(/)'
| --------PMAssignAction------------1-------
| This Node is---PM_Approval
| Enter your decission: d
| Thanks for the desission, d
| ---------PMAssignAction------------2-------
| 16:49:55,435 [main] DEBUG VariableContainer : update variable 'decision' in 'TokenVariableMap1193779' to value 'd'
| ---------PMAssignAction-----d-------3----
| 16:49:55,445 [main] DEBUG GraphElement : event 'before-signal' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:55,445 [main] DEBUG GraphElement : event 'node-leave' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:55,445 [main] DEBUG GraphElement : event 'transition' on 'Transition(Denied)' for 'Token(/)'
| 16:49:55,445 [main] DEBUG GraphElement : event 'node-enter' on 'EndState(end)' for 'Token(/)'
| 16:49:55,445 [main] DEBUG GraphElement : event 'process-end' on 'ProcessDefinition(processdefinition)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'after-signal' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'node-leave' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'transition' on 'Transition(Accepted)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'node-enter' on 'TaskNode(HOD_Approval)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'task-create' on 'Task(HOD_Approval)' for 'Token(/)'
| --------HODAssignAction------------1-------
| This Node is---HOD_Approval
| Enter your decission:
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247835#4247835
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247835
16 years, 8 months
[JBoss jBPM] - Re: Integration problem of jBPM 4, Spring and Hibernate
by KeithWong123
Thank you for your help! However, other problems come out......
Do you have any working example or tutorial recommended to me? I want to learn how to integrate JBPM4, Spring and Hibernate. However, I cannot find any example which can guide me through the whole process.
Now I am facing this problem:
How to call Spring beans from a JBPM4 process? Should I create an 'environment' variable to access Spring bean?
The following is my code:
import org.jbpm.api.Configuration;
| import org.jbpm.api.ExecutionService;
| import org.jbpm.api.HistoryService;
| import org.jbpm.api.ManagementService;
| import org.jbpm.api.NewDeployment;
| import org.jbpm.api.ProcessEngine;
| import org.jbpm.api.ProcessInstance;
| import org.jbpm.api.RepositoryService;
| import org.jbpm.api.TaskService;
| import org.jbpm.pvm.internal.env.EnvironmentFactory;
| import org.jbpm.pvm.internal.env.SpringContext;
| import org.springframework.beans.BeansException;
| import org.springframework.context.ApplicationContext;
| import org.springframework.context.ApplicationContextAware;
| import org.springframework.context.support.ClassPathXmlApplicationContext;
| import org.springframework.stereotype.Controller;
|
| import POJO.Product;
| import Service.ProductManager;
| @Controller
| public class Test implements ApplicationContextAware{
|
| private ProductManager managerProduct;
| private static ApplicationContext ac =null;
|
| public static void main(String args[]){
| ac = new ClassPathXmlApplicationContext(new String[] {"applicationContext-test.xml"});
| Test test = new Test();
| test.startUpJBPM();
| //EnvironmentFactory environmentFactory = new PvmEnvironmentFactory("environment.cfg.xml");
| environment.setContext(new SpringContext(ac)); <=== Not sure how to create and use 'environment'
| }
|
| public void startUpJBPM(){
| ProcessEngine processEngine = new Configuration().buildProcessEngine();
| RepositoryService repositoryService = processEngine.getRepositoryService();
| ExecutionService executionService = processEngine.getExecutionService();
| TaskService taskService = processEngine.getTaskService();
| HistoryService historyService = processEngine.getHistoryService();
| ManagementService managementService = processEngine.getManagementService();
| NewDeployment nd = repositoryService.createDeployment();
| nd.addResourceFromClasspath("jpdl/process.jpdl.xml").deploy();
| ProcessInstance processInstance = executionService.startProcessInstanceByKey("process");
| }
|
| public void createProduct(){
| System.out.println("==== createProduct===");
| managerProduct= (ProductManager) ac.getBean("productManager");
| Product p = new Product();
| p.setSku("04081528");
| p.setQuantity(04);
| p.setSupplierCode("04081528");
| p.setIsMain(0);
| managerProduct.addProduct(p);
| }
| public ProductManager getManagerProduct() {
| return managerProduct;
| }
|
| public void setManagerProduct(ProductManager managerProduct) {
| this.managerProduct = managerProduct;
| }
|
| public void setApplicationContext(ApplicationContext ac)throws BeansException {
| this.ac=ac;
| }
|
|
| }
|
Please help to indicate what is wrong.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247828#4247828
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247828
16 years, 8 months
[JBoss jBPM] - Re: [JBPM4 Error]Getting error while 2 tasks are created on
by sushantgupta402
<?xml version="1.0" encoding="UTF-8"?>
|
| <process name="SimpleTaskCreation" xmlns="http://jbpm.org/4.0/jpdl">
| <start name="start1" g="292,97,48,48">
| <transition to="task1"/>
| </start>
| <end name="end1" g="272,471,48,48"/>
| <task name="task1" g="239,180,92,52">
| <transition to="task2"/>
| </task>
| <task name="task2" g="271,291,92,52">
| <transition to="task3"/>
| </task>
| <task name="task3" g="197,392,92,52">
| <transition to="end1"/>
| </task>
| </process>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247819#4247819
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247819
16 years, 8 months
[JBoss jBPM] - Re: [JBPM4] Error while ending a process having a sub-proces
by sushantgupta402
============ MainProcess =========================
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process name="MainProcess" xmlns="http://jbpm.org/4.0/jpdl">
| <start name="start1" g="94,35,48,48">
| <transition to="Subprocess1"/>
| </start>
| <end name="end1" g="102,232,48,48"/>
| <sub-process name="Subprocess1" g="117,141,92,52" sub-process-key="SubProcess">
| <transition to="end1"/>
| </sub-process>
| </process>
|
| ============ SubProcess =========================
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process name="SubProcess" xmlns="http://jbpm.org/4.0/jpdl">
| <start name="start1" g="66,73,48,48">
| <transition to="state1"/>
| </start>
| <end name="end1" g="67,283,48,48"/>
| <state name="state1" g="118,182,92,52">
| <transition to="end1"/>
| </state>
| </process>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247818#4247818
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247818
16 years, 8 months
[JBoss jBPM] - Re: [JBPM4 Error]Getting error while 2 tasks are created on
by sushantgupta402
=== Environment ==============================
- jBPM Version : jBPM4.0
- Database : Oracle 10g
- JDK : jdk1.5.0_16
- Container : jdk1.5.0_16
- Configuration : No customization done
- Libraries : libraries that comes with jBPM
=== Process ==================================
<?xml version="1.0" encoding="UTF-8"?>
=== API ===================================
String processNameWV = "SimpleTaskCreation";
String processName = processNameWV+"-1";
String key = "MainProcess1.1";
String executionId = processNameWV+"."+key;
ProcessInstance processInstance = executionService.startProcessInstanceByKey(processNameWV,key );
executionService.signalExecutionById(executionId);
executionService.signalExecutionById(executionId);
=== Stacktrace ==============================
16:01:24,379 INF | [Environment] Hibernate 3.3.1.GA
16:01:24,379 INF | [Environment] hibernate.properties not found
16:01:24,389 INF | [Environment] Bytecode provider name : javassist
16:01:24,389 INF | [Environment] using JDK 1.4 java.sql.Timestamp handling
16:01:24,459 INF | [Configuration] configuring from resource: jbpm.hibernate.cfg.xml
16:01:24,459 INF | [Configuration] Configuration resource: jbpm.hibernate.cfg.xml
16:01:24,559 INF | [Configuration] Reading mappings from resource : jbpm.repository.hbm.xml
16:01:24,810 INF | [Configuration] Reading mappings from resource : jbpm.execution.hbm.xml
16:01:25,000 INF | [Configuration] Reading mappings from resource : jbpm.history.hbm.xml
16:01:25,130 INF | [Configuration] Reading mappings from resource : jbpm.task.hbm.xml
16:01:25,180 INF | [Configuration] Reading mappings from resource : jbpm.identity.hbm.xml
16:01:25,210 INF | [Configuration] Configured SessionFactory: null
16:01:25,240 INF | [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
16:01:25,250 INF | [DriverManagerConnectionProvider] Hibernate connection pool size: 20
16:01:25,250 INF | [DriverManagerConnectionProvider] autocommit mode: false
16:01:25,260 INF | [DriverManagerConnectionProvider] using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@172.18.17.40:1521:etv2
16:01:25,260 INF | [DriverManagerConnectionProvider] connection properties: {user=jbpm4, password=****}
16:01:25,621 INF | [Dialect] Using dialect: org.hibernate.dialect.Oracle9iDialect
16:01:25,641 INF | [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
16:01:25,641 INF | [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:01:25,641 INF | [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
16:01:25,711 INF | [SessionFactoryImpl] building session factory
16:01:26,722 INF | [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
16:01:27,774 FIN | [ProcessDefinitionImpl] creating new execution for process 'SimpleTaskCreation'
16:01:27,804 FIN | [DefaultIdGenerator] generated execution id SimpleTaskCreation.MainProcess1.1
16:01:27,804 FIN | [ExecuteActivity] executing activity(start1)
16:01:27,814 FIN | [ExecuteActivity] executing activity(task1)
16:01:27,884 FIN | [Signal] signalling activity(task1), signalName=null
16:01:27,894 FIN | [ExecuteActivity] executing activity(task2)
16:01:27,974 FIN | [Signal] signalling activity(task2), signalName=null
### EXCEPTION ###########################################
16:01:27,984 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.SignalCmd@a166bd
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:844)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)
at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findTaskByExecution(DbSessionImpl.java:382)
at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:115)
at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:101)
at org.jbpm.pvm.internal.model.op.Signal.perform(Signal.java:68)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:637)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:597)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:398)
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.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
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.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84)
at TechPoC.TestJBPM4.main(TestJBPM4.java:171)
### EXCEPTION ###########################################
Exception in thread "main" org.hibernate.NonUniqueResultException: query did not return a unique result: 2
at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:844)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)
at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findTaskByExecution(DbSessionImpl.java:382)
at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:115)
at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:101)
at org.jbpm.pvm.internal.model.op.Signal.perform(Signal.java:68)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:637)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:597)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:398)
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.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
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.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84)
at TechPoC.TestJBPM4.main(TestJBPM4.java:171)
=== Debug logs ==============================
past debug logs here
=== Problem description =========================
I started the process instance and then signalled it from Start to Task-1 a task is generated for User1 (checked in the database).
Now I signalled the process again and the process got moved ahead to Task-2 and a new task is created for User2.
Now when I signalled the process instance again got the error org.hibernate.NonUniqueResultException: query did not return a unique result: 2 . Below is the stack trace. Please let me know if this is a bug and when can we expect this to be fixed.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247817#4247817
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247817
16 years, 8 months
[JBoss jBPM] - [JBPM4] Error while ending a process having a sub-process
by sushantgupta402
=== Environment ==============================
- jBPM Version : jBPM4.0
- Database : Oracle 10g
- JDK : jdk1.5.0_16
- Container : jdk1.5.0_16
- Configuration : No customization done
- Libraries : libraries that comes with jBPM
=== Process ==================================
============ MainProcess =========================
<?xml version="1.0" encoding="UTF-8"?>
<sub-process name="Subprocess1" g="117,141,92,52" sub-process-key="SubProcess">
</sub-process>
============ SubProcess =========================
<?xml version="1.0" encoding="UTF-8"?>
=== API ===================================
String processNameWV = "MainProcess";
| String processName = processNameWV+"-1";
| String key = "MainProcess2.0";
| String executionId = processNameWV+"."+key;
| ProcessInstance processInstance = executionService.startProcessInstanceByKey(processNameWV,key );
| executionService.endProcessInstance(processInstance.getId(), "end1");
=== Stacktrace ==============================
16:13:50,822 INF | [Environment] Hibernate 3.3.1.GA
16:13:50,832 INF | [Environment] hibernate.properties not found
16:13:50,832 INF | [Environment] Bytecode provider name : javassist
16:13:50,842 INF | [Environment] using JDK 1.4 java.sql.Timestamp handling
16:13:50,902 INF | [Configuration] configuring from resource: jbpm.hibernate.cfg.xml
16:13:50,902 INF | [Configuration] Configuration resource: jbpm.hibernate.cfg.xml
16:13:50,992 INF | [Configuration] Reading mappings from resource : jbpm.repository.hbm.xml
16:13:51,253 INF | [Configuration] Reading mappings from resource : jbpm.execution.hbm.xml
16:13:51,443 INF | [Configuration] Reading mappings from resource : jbpm.history.hbm.xml
16:13:51,573 INF | [Configuration] Reading mappings from resource : jbpm.task.hbm.xml
16:13:51,613 INF | [Configuration] Reading mappings from resource : jbpm.identity.hbm.xml
16:13:51,643 INF | [Configuration] Configured SessionFactory: null
16:13:51,673 INF | [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
16:13:51,673 INF | [DriverManagerConnectionProvider] Hibernate connection pool size: 20
16:13:51,673 INF | [DriverManagerConnectionProvider] autocommit mode: false
16:13:51,673 INF | [DriverManagerConnectionProvider] using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@172.18.17.40:1521:etv2
16:13:51,683 INF | [DriverManagerConnectionProvider] connection properties: {user=jbpm4, password=****}
16:13:52,174 INF | [Dialect] Using dialect: org.hibernate.dialect.Oracle9iDialect
16:13:52,184 INF | [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
16:13:52,184 INF | [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:13:52,194 INF | [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
16:13:52,254 INF | [SessionFactoryImpl] building session factory
16:13:53,296 INF | [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
16:13:54,978 FIN | [ProcessDefinitionImpl] creating new execution for process 'MainProcess'
16:13:55,158 FIN | [DefaultIdGenerator] generated execution id MainProcess.MainProcess2.3
16:13:55,168 FIN | [ExecuteActivity] executing activity(start1)
16:13:55,168 FIN | [ExecuteActivity] executing activity(Subprocess1)
16:13:56,971 FIN | [ProcessDefinitionImpl] creating new execution for process 'SubProcess'
16:13:57,191 FIN | [DefaultIdGenerator] generated execution id SubProcess.490
16:13:57,201 FIN | [ExecuteActivity] executing activity(start1)
16:13:57,201 FIN | [ExecuteActivity] executing activity(state1)
16:13:57,372 FIN | [ExecutionImpl] execution[MainProcess.MainProcess2.3] ends with state end1
16:13:57,452 FIN | [DbSessionImpl] deleting process instance MainProcess.MainProcess2.3
16:13:57,502 WRN | [JDBCExceptionReporter] SQL Error: 2292, SQLState: 23000
16:13:57,502 SEV | [JDBCExceptionReporter] ORA-02292: integrity constraint (JBPM4.FK_EXEC_SUPEREXEC) violated - child record found
### EXCEPTION ###########################################
16:13:57,502 SEV | [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#489]
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:2579)
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2735)
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:1029)
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.svc.ExecutionServiceImpl.endProcessInstance(ExecutionServiceImpl.java:116)
at TechPoC.TestJBPM4.main(TestJBPM4.java:154)
Caused by: java.sql.SQLException: ORA-02292: integrity constraint (JBPM4.FK_EXEC_SUPEREXEC) violated - child record found
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:2561)
... 16 more
### EXCEPTION ###########################################
Exception in thread "main" org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#489]
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:2579)
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2735)
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:1029)
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.svc.ExecutionServiceImpl.endProcessInstance(ExecutionServiceImpl.java:116)
at TechPoC.TestJBPM4.main(TestJBPM4.java:154)
Caused by: java.sql.SQLException: ORA-02292: integrity constraint (JBPM4.FK_EXEC_SUPEREXEC) violated - child record found
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:2561)
... 16 more
=== Debug logs ==============================
past debug logs here
=== Problem description =========================
If there is an active sub process I am not able to end the main process. getting database error.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247816#4247816
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247816
16 years, 8 months