[jBPM Users] - Jbpm integration transaction problem
by eliseu.cartaxo
Jbpm 4
Jboss AS 5.0.0GA
Oracle Database 10G
I'm integration my application with jbpm using the example from the dev-guide
this.processEngine = (ProcessEngine) ctx
| .lookup("java:/ProcessEngine");
The jbpm-oracle-ds
<?xml version="1.0" encoding="UTF-8"?>
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- JBoss Server Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <!-- $Id: jbpm-oracle-ds.xml 4458 2009-04-06 14:36:41Z heiko.braun(a)jboss.com $ -->
|
| <!-- ===================================================================== -->
| <!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
| <!-- ===================================================================== -->
|
| <datasources>
| <xa-datasource>
| <jndi-name>JbpmDS</jndi-name>
| <track-connection-by-tx/>
| <!-- uncomment to enable interleaving <interleaving/> -->
| <isSameRM-override-value>false</isSameRM-override-value>
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:oracle:thin:@xxxx:1521:devdb2</xa-datasource-property>
| <!--xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:XE</xa-datasource-property-->
| <xa-datasource-property name="User">xxx</xa-datasource-property>
| <xa-datasource-property name="Password">xxx</xa-datasource-property>
| <idle-timeout-minutes>240</idle-timeout-minutes>
| <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
| <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
| <!-- Checks the Oracle error codes and messages for fatal errors -->
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
| <no-tx-separate-pools/>
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </xa-datasource>
| <no-tx-datasource>
| <jndi-name>xeo_nojta</jndi-name>
| <use-java-context>false</use-java-context>
| <connection-url>jdbc:oracle:thin:@xxx:1521:devdb2</connection-url>
| <!--connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url-->
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <user-name>xxx</user-name>
| <password>xxx</password>
| <idle-timeout-minutes>240</idle-timeout-minutes>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </no-tx-datasource>
| <!--xa-datasource>
| <jndi-name>xeo</jndi-name>
| <track-connection-by-tx/>
| <isSameRM-override-value>false</isSameRM-override-value>
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:oracle:thin:@devdb2.itds.pt:1521:devdb2</xa-datasource-property>
| <!xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:XE</xa-datasource-property>
| <xa-datasource-property name="User">ponto_optimo</xa-datasource-property>
| <xa-datasource-property name="Password">ponto_optimo</xa-datasource-property>
| <idle-timeout-minutes>240</idle-timeout-minutes>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <no-tx-separate-pools/>
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </xa-datasource-->
|
| <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
| name="jboss.jca:service=OracleXAExceptionFormatter">
| <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
| </mbean>
|
| </datasources>
|
But i'm getting the following error
Stack trace :
19:36:31,656 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.xastart] [com.arjuna.ats.internal.jta.transaction.arjunacore.xastart] TransactionImple.enlistResource - xa_start - caught: XAException.XA_RETRY for < 131075, 27, 25, 494545511025355559997101589998975852975754100495348585699455110253555599971015899989758529757541004953485856101 >
| 19:36:31,656 ERROR [STDERR] oracle.jdbc.xa.OracleXAException
| 19:36:31,656 ERROR [STDERR] at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:882)
| 19:36:31,656 ERROR [STDERR] at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:221)
| 19:36:31,656 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:213)
| 19:36:31,656 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:889)
| 19:36:31,656 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:500)
| 19:36:31,656 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:908)
| 19:36:31,656 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:662)
| 19:36:31,656 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)
| 19:36:31,656 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)
| 19:36:31,656 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)
| 19:36:31,656 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
| 19:36:31,656 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.loader.Loader.doQuery(Loader.java:696)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.loader.Loader.doList(Loader.java:2228)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.loader.Loader.list(Loader.java:2120)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
| 19:36:31,656 ERROR [STDERR] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
| 19:36:31,656 ERROR [STDERR] at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:88)
| 19:36:31,656 ERROR [STDERR] at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:80)
| 19:36:31,656 ERROR [STDERR] at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
| 19:36:31,656 ERROR [STDERR] at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInExistingTx(JtaTransactionInterceptor.java:65)
| 19:36:31,656 ERROR [STDERR] at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:51)
| 19:36:31,656 ERROR [STDERR] at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithoutRetry(JtaRetryInterceptor.java:56)
| 19:36:31,671 ERROR [STDERR] at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:48)
| 19:36:31,671 ERROR [STDERR] at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
| 19:36:31,671 ERROR [STDERR] at org.jbpm.pvm.internal.query.TaskQueryImpl.list(TaskQueryImpl.java:204)
| 19:36:31,671 ERROR [STDERR] at netgest.xeobpm.jbpm.runtime.JbpmProcessRuntimeService.getTaskById(JbpmProcessRuntimeService.java:312)
| 19:36:31,671 ERROR [STDERR] at netgest.xeobpm.jbpm.data.XeoJbpmTaskDataManager.fillObjectDataSet(XeoJbpmTaskDataManager.java:199)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.ejb.impl.boManagerBean.loadObject(boManagerBean.java:1372)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.xwc.components.connectors.XEOObjectConnector.getXEOObject(XEOObjectConnector.java:41)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.xwc.components.connectors.XEOObjectConnector.getXEOAttribute(XEOObjectConnector.java:86)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.xwc.components.connectors.XEOObjectConnector.getAttribute(XEOObjectConnector.java:72)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.xwc.components.beans.XEOBaseList.rowDoubleClick(XEOBaseList.java:94)
| 19:36:31,671 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 19:36:31,671 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 19:36:31,671 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 19:36:31,671 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 19:36:31,671 ERROR [STDERR] at org.apache.el.parser.AstValue.invoke(AstValue.java:170)
| 19:36:31,671 ERROR [STDERR] at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| 19:36:31,671 ERROR [STDERR] at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
| 19:36:31,671 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.xwc.framework.components.XUICommand.broadcast(XUICommand.java:347)
| 19:36:31,671 ERROR [STDERR] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
| 19:36:31,671 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
| 19:36:31,671 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
| 19:36:31,671 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.xwc.framework.jsf.XUILifecycleImpl.execute(XUILifecycleImpl.java:95)
| 19:36:31,671 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.xwc.framework.http.XUIServlet.service(XUIServlet.java:103)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.xwc.framework.http.XUILoginFilter.doFilter(XUILoginFilter.java:48)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.http.DeployFilter.doFilter(DeployFilter.java:600)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 19:36:31,671 ERROR [STDERR] at netgest.bo.http.boCharsetFilter.doFilter(boCharsetFilter.java:22)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 19:36:31,671 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| 19:36:31,671 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| 19:36:31,671 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| 19:36:31,671 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| 19:36:31,671 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| 19:36:31,671 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| 19:36:31,671 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| 19:36:31,671 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
| 19:36:31,671 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| 19:36:31,671 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| 19:36:31,671 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
| 19:36:31,906 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
| 19:36:31,906 ERROR [JDBCExceptionReporter] Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f577cae:cba:4a96d150:8c status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f577cae:cba:4a96d150:8c status: ActionStatus.ABORT_ONLY >))
| 19:36:32,046 INFO [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.query.TaskQueryImpl@190eca6
| org.hibernate.exception.GenericJDBCException: Cannot open connection
| at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
| at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
| at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
| at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
| at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
| at org.hibernate.loader.Loader.doQuery(Loader.java:696)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
| at org.hibernate.loader.Loader.doList(Loader.java:2228)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
| at org.hibernate.loader.Loader.list(Loader.java:2120)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
| at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:88)
| at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:80)
| at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
| at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInExistingTx(JtaTransactionInterceptor.java:65)
| at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:51)
| at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithoutRetry(JtaRetryInterceptor.java:56)
| at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:48)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
| at org.jbpm.pvm.internal.query.TaskQueryImpl.list(TaskQueryImpl.java:204)
| at netgest.xeobpm.jbpm.runtime.JbpmProcessRuntimeService.getTaskById(JbpmProcessRuntimeService.java:312)
| at netgest.xeobpm.jbpm.data.XeoJbpmTaskDataManager.fillObjectDataSet(XeoJbpmTaskDataManager.java:199)
| at netgest.bo.ejb.impl.boManagerBean.loadObject(boManagerBean.java:1372)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getXEOObject(XEOObjectConnector.java:41)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getXEOAttribute(XEOObjectConnector.java:86)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getAttribute(XEOObjectConnector.java:72)
| at netgest.bo.xwc.components.beans.XEOBaseList.rowDoubleClick(XEOBaseList.java:94)
| 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.apache.el.parser.AstValue.invoke(AstValue.java:170)
| at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
| at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
| at netgest.bo.xwc.framework.components.XUICommand.broadcast(XUICommand.java:347)
| at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
| at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
| at netgest.bo.xwc.framework.jsf.XUILifecycleImpl.execute(XUILifecycleImpl.java:95)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
| at netgest.bo.xwc.framework.http.XUIServlet.service(XUIServlet.java:103)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.xwc.framework.http.XUILoginFilter.doFilter(XUILoginFilter.java:48)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.http.DeployFilter.doFilter(DeployFilter.java:600)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.http.boCharsetFilter.doFilter(boCharsetFilter.java:22)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f577cae:cba:4a96d150:8c status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f577cae:cba:4a96d150:8c status: ActionStatus.ABORT_ONLY >))
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
| at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)
| at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
| ... 74 more
| Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f577cae:cba:4a96d150:8c status: ActionStatus.ABORT_ONLY >)
| at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:409)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
| ... 76 more
| Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f577cae:cba:4a96d150:8c status: ActionStatus.ABORT_ONLY >
| at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:879)
| at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:675)
| at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)
| ... 80 more
| 19:36:32,062 ERROR [application] java.lang.NullPointerException
| javax.faces.el.EvaluationException: java.lang.NullPointerException
| at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
| at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
| at netgest.bo.xwc.framework.components.XUICommand.broadcast(XUICommand.java:347)
| at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
| at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
| at netgest.bo.xwc.framework.jsf.XUILifecycleImpl.execute(XUILifecycleImpl.java:95)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
| at netgest.bo.xwc.framework.http.XUIServlet.service(XUIServlet.java:103)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.xwc.framework.http.XUILoginFilter.doFilter(XUILoginFilter.java:48)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.http.DeployFilter.doFilter(DeployFilter.java:600)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.http.boCharsetFilter.doFilter(boCharsetFilter.java:22)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.NullPointerException
| at java.util.Hashtable.get(Hashtable.java:334)
| at netgest.bo.runtime.boRuntimeException.init(boRuntimeException.java:53)
| at netgest.bo.runtime.boRuntimeException.<init>(boRuntimeException.java:21)
| at netgest.xeobpm.exceptions.XeoBpmException.<init>(XeoBpmException.java:17)
| at netgest.xeobpm.jbpm.runtime.JbpmProcessRuntimeService.getTaskById(JbpmProcessRuntimeService.java:327)
| at netgest.xeobpm.jbpm.data.XeoJbpmTaskDataManager.fillObjectDataSet(XeoJbpmTaskDataManager.java:199)
| at netgest.bo.ejb.impl.boManagerBean.loadObject(boManagerBean.java:1372)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getXEOObject(XEOObjectConnector.java:41)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getXEOAttribute(XEOObjectConnector.java:86)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getAttribute(XEOObjectConnector.java:72)
| at netgest.bo.xwc.components.beans.XEOBaseList.rowDoubleClick(XEOBaseList.java:94)
| 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.apache.el.parser.AstValue.invoke(AstValue.java:170)
| at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
| ... 38 more
| 19:36:32,062 WARN [lifecycle] #{viewBean.rowDoubleClick}: java.lang.NullPointerException
| javax.faces.FacesException: #{viewBean.rowDoubleClick}: java.lang.NullPointerException
| at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
| at netgest.bo.xwc.framework.components.XUICommand.broadcast(XUICommand.java:347)
| at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
| at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
| at netgest.bo.xwc.framework.jsf.XUILifecycleImpl.execute(XUILifecycleImpl.java:95)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
| at netgest.bo.xwc.framework.http.XUIServlet.service(XUIServlet.java:103)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.xwc.framework.http.XUILoginFilter.doFilter(XUILoginFilter.java:48)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.http.DeployFilter.doFilter(DeployFilter.java:600)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at netgest.bo.http.boCharsetFilter.doFilter(boCharsetFilter.java:22)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
| at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
| at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
| ... 37 more
| Caused by: java.lang.NullPointerException
| at java.util.Hashtable.get(Hashtable.java:334)
| at netgest.bo.runtime.boRuntimeException.init(boRuntimeException.java:53)
| at netgest.bo.runtime.boRuntimeException.<init>(boRuntimeException.java:21)
| at netgest.xeobpm.exceptions.XeoBpmException.<init>(XeoBpmException.java:17)
| at netgest.xeobpm.jbpm.runtime.JbpmProcessRuntimeService.getTaskById(JbpmProcessRuntimeService.java:327)
| at netgest.xeobpm.jbpm.data.XeoJbpmTaskDataManager.fillObjectDataSet(XeoJbpmTaskDataManager.java:199)
| at netgest.bo.ejb.impl.boManagerBean.loadObject(boManagerBean.java:1372)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getXEOObject(XEOObjectConnector.java:41)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getXEOAttribute(XEOObjectConnector.java:86)
| at netgest.bo.xwc.components.connectors.XEOObjectConnector.getAttribute(XEOObjectConnector.java:72)
| at netgest.bo.xwc.components.beans.XEOBaseList.rowDoubleClick(XEOBaseList.java:94)
| 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.apache.el.parser.AstValue.invoke(AstValue.java:170)
| at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
| ... 38 more<?xml version="1.0" encoding="UTF-8"?>
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- JBoss Server Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <!-- $Id: jbpm-oracle-ds.xml 4458 2009-04-06 14:36:41Z heiko.braun(a)jboss.com $ -->
|
| <!-- ===================================================================== -->
| <!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
| <!-- ===================================================================== -->
|
| <datasources>
| <xa-datasource>
| <jndi-name>JbpmDS</jndi-name>
| <track-connection-by-tx/>
| <!-- uncomment to enable interleaving <interleaving/> -->
| <isSameRM-override-value>false</isSameRM-override-value>
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:oracle:thin:@devdb2.itds.pt:1521:devdb2</xa-datasource-property>
| <!--xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:XE</xa-datasource-property-->
| <xa-datasource-property name="User">ponto_optimo</xa-datasource-property>
| <xa-datasource-property name="Password">ponto_optimo</xa-datasource-property>
| <idle-timeout-minutes>240</idle-timeout-minutes>
| <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
| <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
| <!-- Checks the Oracle error codes and messages for fatal errors -->
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
| <no-tx-separate-pools/>
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </xa-datasource>
| <no-tx-datasource>
| <jndi-name>xeo_nojta</jndi-name>
| <use-java-context>false</use-java-context>
| <connection-url>jdbc:oracle:thin:@devdb2.itds.pt:1521:devdb2</connection-url>
| <!--connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url-->
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <user-name>ponto_optimo</user-name>
| <password>ponto_optimo</password>
| <idle-timeout-minutes>240</idle-timeout-minutes>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </no-tx-datasource>
| <!--xa-datasource>
| <jndi-name>xeo</jndi-name>
| <track-connection-by-tx/>
| <isSameRM-override-value>false</isSameRM-override-value>
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:oracle:thin:@devdb2.itds.pt:1521:devdb2</xa-datasource-property>
| <!xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:XE</xa-datasource-property>
| <xa-datasource-property name="User">ponto_optimo</xa-datasource-property>
| <xa-datasource-property name="Password">ponto_optimo</xa-datasource-property>
| <idle-timeout-minutes>240</idle-timeout-minutes>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <no-tx-separate-pools/>
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </xa-datasource-->
|
| <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
| name="jboss.jca:service=OracleXAExceptionFormatter">
| <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
| </mbean>
|
| </datasources>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252125#4252125
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252125
15 years, 3 months
[jBPM Users] - how to differentiate different ends ?
by npirard
[jBPM 4]
Is there a simple mean to differentiate the differente possible ends of a process?
For instance in the example
org.jbpm.examples.end.multiple.EndMultipleTest
that comes with the distribution, a process may have three different ends. But once the process is ended, how can we know what end it reached?
The Unit Test only tests that the process ended correctly, not that it reached the intended end ("ok", "bad request" or "internal server error") that are defined in the JPDL :
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process name="EndMultiple" xmlns="http://jbpm.org/4.0/jpdl">
|
| <start g="16,96,48,48">
| <transition to="get return code" name=""/>
| </start>
|
| <state g="96,94,111,52" name="get return code">
| <transition g="151,60:-36,11" name="200" to="ok"/>
| <transition g=":-16,-27" name="400" to="bad request"/>
| <transition g="151,183:-33,-32" name="500" to="internal server error"/>
| </state>
|
| <end g="238,37,48,48" name="ok"/>
| <end g="238,98,48,48" name="bad request"/>
| <end g="240,160,48,48" name="internal server error"/>
|
| </process>
|
I did not find how to query about it with the API.
here is what I tried, in EndMultipleTest :
| public void testEndMultipleOk() {
| ProcessInstance processInstance = executionService.startProcessInstanceByKey("EndMultiple");
| String pid = processInstance.getId();
| processInstance = executionService.signalExecutionById(pid, "200");
| assertTrue(processInstance.isEnded());
| // end of the official test
|
|
| assertEquals("ended", processInstance.getState());//state is "ended", not "ok"
|
| //HistoryActivity
| HistoryActivityInstanceQuery historyActivityInstanceQuery = historyService.createHistoryActivityInstanceQuery();
| historyActivityInstanceQuery.executionId(pid);
| List<HistoryActivityInstance> list = historyActivityInstanceQuery.list();
| System.out.println("list for pid size : " + list.size());
| for (HistoryActivityInstance historyActivityInstance : list) {
| System.out.println("history activity for pid: " + historyActivityInstance.getActivityName());
| }
|
| historyActivityInstanceQuery = historyService.createHistoryActivityInstanceQuery();
| historyActivityInstanceQuery.activityName("get return code");
| list = historyActivityInstanceQuery.list();
| System.out.println("list for \"get return code\" size : " + list.size());
| for (HistoryActivityInstance historyActivityInstance : list) {
| System.out.println("history activity for \"get return code\": " + historyActivityInstance.getActivityName());
| }
|
| historyActivityInstanceQuery = historyService.createHistoryActivityInstanceQuery();
| historyActivityInstanceQuery.activityName("ended");
| list = historyActivityInstanceQuery.list();
| System.out.println("list for \"ended\" size : " + list.size());
| for (HistoryActivityInstance historyActivityInstance : list) {
| System.out.println("history activity for \"ended\": " + historyActivityInstance.getActivityName());
| }
|
| historyActivityInstanceQuery = historyService.createHistoryActivityInstanceQuery();
| historyActivityInstanceQuery.activityName("ok");
| list = historyActivityInstanceQuery.list();
| System.out.println("list for \"ok\" size : " + list.size());
| for (HistoryActivityInstance historyActivityInstance : list) {
| System.out.println("history activity for \"ok\": " + historyActivityInstance.getActivityName());
| }
|
|
| //Job
| JobQuery jobQuery = managementService.createJobQuery().processInstanceId(pid);
| List<Job> listJobs = jobQuery.list();
| System.out.println("listJobs size : " + listJobs.size());
| for (Job job : listJobs) {
| System.out.println("job : " + job.getId());
| }
|
|
| //HistoryProcessInstance
| HistoryProcessInstanceQuery historyProcessInstanceQuery = historyService.createHistoryProcessInstanceQuery();
| historyProcessInstanceQuery.state("ok");
| List<HistoryProcessInstance> listHPI = historyProcessInstanceQuery.list();
| System.out.println("IP list for \"ok\" size : " + listHPI.size());
|
| historyProcessInstanceQuery = historyService.createHistoryProcessInstanceQuery();
| historyProcessInstanceQuery.state("get return code");
| listHPI = historyProcessInstanceQuery.list();
| System.out.println("IP list for \"get return code\" size : " + listHPI.size());
|
| historyProcessInstanceQuery = historyService.createHistoryProcessInstanceQuery();
| historyProcessInstanceQuery.state("ended");
| listHPI = historyProcessInstanceQuery.list();
| System.out.println("IP list for \"ended\" size : " + listHPI.size());
| }
|
and here the output :
anonymous wrote :
| 18:23:17,388 FIN | [BaseJbpmTestCase] === starting testEndMultipleOk =============================
| 18:23:17,481 FIN | [ProcessDefinitionImpl] creating new execution for process 'EndMultiple'
| 18:23:17,497 FIN | [DefaultIdGenerator] generated execution id EndMultiple.20
| 18:23:17,497 FIN | [ExecuteActivity] executing activity(24150744)
| 18:23:17,497 FIN | [ExecuteActivity] executing activity(get return code)
| 18:23:17,544 FIN | [Signal] signalling activity(get return code), signalName=200
| 18:23:17,544 FIN | [ExecuteActivity] executing activity(ok)
| 18:23:17,544 FIN | [ExecutionImpl] execution[EndMultiple.20] ends with state ended
| 18:23:17,606 FIN | [DbSessionImpl] deleting process instance EndMultiple.20
| list for pid size : 1
| history activity for pid: get return code
| list for "get return code" size : 1
| history activity for "get return code": get return code
| list for "ended" size : 0
| list for "ok" size : 0
| listJobs size : 0
| IP list for "ok" size : 0
| IP list for "get return code" size : 0
| IP list for "ended" size : 1
| 18:23:17,950 FIN | [DeleteDeploymentCmd] deleting deployment 15
| 18:23:18,044 FIN | [BaseJbpmTestCase] === ending testEndMultipleOk =============================
|
I tried a bit in all directions, but did not find a clue on how to get more precision other than the fact that my process is in "ended" state. I have seen that I could have "cancel" or "error" too (cf org.jbpm.examples.end.state.EndStateTest), but I would have been interested in finding some history about the names of the end nodes. For exemple find all process that ended with "bad request". Is it possible with the API ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252117#4252117
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252117
15 years, 3 months