[jBPM] - Jbpm with user transaction
by Jean-François Houzard
Jean-François Houzard [https://community.jboss.org/people/jhouzard] created the discussion
"Jbpm with user transaction"
To view the discussion, visit: https://community.jboss.org/message/777138#777138
--------------------------------------------------------------
Hi!
I have a very basic workflow. In my workflow I have a diverging gateway.
In this gateway I use a service to control the flow.
My problem is that my service is a transactional service (I use spring-data in it), and as soon as I use this service to decide, I get an exception like the following.
How can I use a transactional service in the gateway?
Thank you
org.jbpm.workflow.instance.WorkflowRuntimeException: [eu.publications.ceres.jbpm.module_workflow:21 - check_bypass:14] -- Exception when trying to evaluate constraint execute in split check_bypass
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:130)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164)
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:303)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:168)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1082)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320)
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:120)
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:39)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:367)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
at eu.publications.ceres.jbpm.ModuleWorkflowIT.runModuleWorkflowTest(ModuleWorkflowIT.java:101)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.RuntimeException: Exception when trying to evaluate constraint execute in split check_bypass
at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:79)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)
... 47 more
Caused by: java.lang.RuntimeException: unable to execute ReturnValueEvaluator
at org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator.evaluate(ReturnValueConstraintEvaluator.java:130)
at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:72)
... 48 more
Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: Unknown node instance type: org.jbpm.workflow.instance.node.SplitInstance@413f9276; nested exception is java.lang.IllegalArgumentException: Unknown node instance type: org.jbpm.workflow.instance.node.SplitInstance@413f9276
at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:301)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:404)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.data.jpa.repository.support.LockModeRepositoryPostProcessor$LockModePopulatingMethodIntercceptor.invoke(LockModeRepositoryPostProcessor.java:91)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy36.findByEventCodeAndOrigin(Unknown Source)
at eu.publications.ceres.jbpm.service.impl.DecisionHelperService.checkBypass(DecisionHelperService.java:39)
at eu.publications.ceres.jbpm.ModuleWorkflowIT$1.checkBypass(ModuleWorkflowIT.java:51)
at eu.publications.ceres.jbpm.Process_eu_publications_ceres_jbpm_module_workflow_44f51f3fbd8346aca5a1aef536c68e4f.returnValueEvaluator3(Process_eu_publications_ceres_jbpm_module_workflow_44f51f3fbd8346aca5a1aef536c68e4f.java:28)
at eu.publications.ceres.jbpm.Process_eu_publications_ceres_jbpm_module_workflow_44f51f3fbd8346aca5a1aef536c68e4fReturnValueEvaluator3Invoker.evaluate(Process_eu_publications_ceres_jbpm_module_workflow_44f51f3fbd8346aca5a1aef536c68e4fReturnValueEvaluator3Invoker.java:15)
at org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator.evaluate(ReturnValueConstraintEvaluator.java:128)
... 49 more
Caused by: java.lang.IllegalArgumentException: Unknown node instance type: org.jbpm.workflow.instance.node.SplitInstance@413f9276
at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.writeNodeInstanceContent(AbstractProtobufProcessInstanceMarshaller.java:343)
at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.writeNodeInstance(AbstractProtobufProcessInstanceMarshaller.java:149)
at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.writeProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:107)
at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.writeProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:70)
at org.jbpm.persistence.processinstance.ProcessInstanceInfo.update(ProcessInstanceInfo.java:198)
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.hibernate.ejb.event.BeanCallback.invoke(BeanCallback.java:37)
at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:94)
at org.hibernate.ejb.event.EntityCallbackHandler.preUpdate(EntityCallbackHandler.java:79)
at org.hibernate.ejb.event.EJB3FlushEntityEventListener.invokeInterceptor(EJB3FlushEntityEventListener.java:61)
at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349)
at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1175)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1251)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:269)
at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:123)
at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:55)
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:95)
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:85)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:313)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
... 61 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777138#777138]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[JBoss Messaging] - Restart Jboss node after Failover completed
by carlos roman
carlos roman [https://community.jboss.org/people/cromansia] created the discussion
"Restart Jboss node after Failover completed"
To view the discussion, visit: https://community.jboss.org/message/777095#777095
--------------------------------------------------------------
Hello,
We have installed 2 nodes with Jboss 5.1.0.GA; include Jgroups 2.6.15.GA and JBM 1.4.3.GA ( With MySQL persistence )
Node A: Jboss
Node B: Jboss + MySQL
Question:
We need re-start Jboss Node after "Jboss Messaging Failover completed" happen in one of these nodes; due a network link have been down and restart again more later?
Remark:
We are using one switch to connect the PCs where the Jboss nodes are running.
We have distributed a topic and a queue in the cluster.
We disconnected the link for the Node A, and we wait until "Jboss Messaging Failover completed" message is showed on the JMS Logs in the Node B.
We have observed in this point that the jbm_postoffice row for the queue in Node A in the Persistence Storage have been removed.
We have observed also that the jgroups have excluded the Node A from the cluster in the Node B view.
After that, we connected again the network link for the Node A.
We observed that jgroups re-join the cluster correctly, so the JBM in Node A or in Node B does not create the row for the queue for Node A again. So i think that the Node A cannot manage messages for the distributed queue anymore.
Does anyone know this behaviour? Is the re-start process the only action that we can do to recover the cluster after this failure?
Let me know for more information.
Thanks, Carlos Roman
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777095#777095]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
Re: [jboss-user] [JBoss Web Services] - JBossWS - Installation
by Mario Jaramillo
Mario Jaramillo [https://community.jboss.org/people/marioja76] commented on the document
"JBossWS - Installation"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-13545#comment-11153
--------------------------------------------------
Hi, I downloaded "jbossws-cxf-4.1.0.Final" and "jboss-as-7.1.1.Final"
setting properties
# Optional JBoss Home
jboss710.home=(a)jboss710.home@
jboss711.home=C:\jboss-as-7.1.1.Final
jboss712.home=(a)jboss712.home@
jboss720.home=(a)jboss720.home@
# The JBoss server under test. This can be [jboss710|jboss711|jboss712|jboss720]
jbossws.integration.target=jboss711
- - And when I try execute ant deploy-jboss711, obtain this error, someone has a suggestion please !!
C:\jbossws-cxf-bin-dist>ant deploy-jboss711
Buildfile: C:\jbossws-cxf-bin-dist\build.xml
target-jboss711:
prepare:
init:
[echo] integration.target=jboss711
undeploy-jboss711:
BUILD FAILED
C:\jbossws-cxf-bin-dist\build\build-deploy.xml:110: Not available: C:jboss-as-7.1.1.Final/jboss-modules.jar
--------------------------------------------------
13 years, 4 months