[jBPM] - Serialization and declared types
by Lukasz Kozerski
Lukasz Kozerski [http://community.jboss.org/people/lukasz.kozerski] created the discussion
"Serialization and declared types"
To view the discussion, visit: http://community.jboss.org/message/616828#616828
--------------------------------------------------------------
Hi, I have problem with (I suppose) session serialization and declared types. Process looks like this: Start -> Script: Stuff.status="X" -> WorkItem -> Script: Stuff.status="Y" -> End And the test: ksession = newSession(); ksession.startProcess("process", parameters); ksession.fireAllRules(); objects = ksession.getObjects(); assertThat(objects).hasSize(1); o = objects.iterator().next(); assertEquals("X", type.get(o, "status")); // test ok ksession.dispose(); ksession = loadSession(sessionId); ksession.getWorkItemManager().completeWorkItem(workItemId, null); objects = ksession.getObjects(); assertThat(objects).hasSize(1); o = objects.iterator().next(); assertEquals("Y", type.get(o, "status")); // test fail, status=="X" ksession.dispose(); My question is: why this test fails? Full maven project attached. Thanks, Lukasz
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/616828#616828]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[jBPM] - jBPM 5.1 in a real world web application
by rahzel
rahzel [http://community.jboss.org/people/rahzel] created the discussion
"jBPM 5.1 in a real world web application"
To view the discussion, visit: http://community.jboss.org/message/613004#613004
--------------------------------------------------------------
We are writing a prototype based on Java EE 6 (JSF 2.0, EJB 3.1, JPA 2.0). Application Server is JBoss AS 6.1. The customer described his business processes (about 30) in BPMN 2.0. There are many business rules as well and he wants to configure the rules (not the processes) in the running system without developer assistance. We are evaluating jBPM 5.1 and Drools Expert/Guvnor 5.2 for this purpose. After reading the manuals and many threads in this forum and spending some days programming I have some questions. Mainly about the scope and lifecycle of the KnowledgeSession and long running business processes. Most answers you read are like “it depends on the scenario”. So I try to describe our scenario.
Our target is to develop a business (web) application for an administration department. There are about 100 parallel users. The business processes consists of many nodes (average around 10) including user tasks, business rule tasks, service tasks, gateways and timers. The business use cases respectively the user interface are task centric. For example a process instance is started by a user or within another process execution, the process instance runs in a user task and generates a task which is displayed in a specific task list. Another user logs in, completes the tasks and the process instance proceeds. After that it runs maybe into a business rule task and after that again in a user task generating another type of task. Thus the processes are long running (several days or even weeks).
Everything has to be persistent. After a failure or maintenance reboot every process instance has to be in the state before the reboot.
*KnowledgeSession Scope*
I can’t really determine in which Scope (per request, per user session, per application, per process instance) to instantiate the KnowledgeSession. I have some questions to narrow down the choice:
*Question 1*: Is the session thread safe? If not application scope wouldn’t be an option.
*Question 2*: What’s about facts (input/output data for business rules)? I it reliable to work with only one session (application scope) which manages many running process instances involving business rule tasks? I fear that’s not the case, because facts are added to the session. Thus the result would be unreliable if multiple parallel rule executions run in one session.
*KnowledgeSession persistence*
I don’t know if it is required to load and reuse persisted sessions after a server reboot. The KnowledgeSession and process instances both get persisted. I implemented an example where I have some process instances in a wait state (human task). When I restart the server and create a new session I can complete a human task and the process instance proceeds. Thus it seems that a persisted process instance is independent from a concrete session.
*Question 3*: Is there a reason to load and reuse persisted sessions after a server reboot? If yes and if I have more than one session (for example because I use one session per http request) how would I know which session to load concerning a specific wait state? When I complete a task I don’t know which session was active as the process instance hit the wait state.
*Timers*
*Question 4*: Is it true that timers are not persistent? See https://issues.jboss.org/browse/JBPM-3170 https://issues.jboss.org/browse/JBPM-3170. Thus I have to use an external timer service if I want to implement long running processes with timers? Any ideas?
*Summary*
*Question 5*: Considering the above topics, what would be the best practice to deal with the KnowledgeSession?
Thanks in advance!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/613004#613004]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
Re: [jboss-user] [EJB3] - How to configure EJB3 MDBs for IBM Websphere MQ
by yogananth Mahalingam
yogananth Mahalingam [http://community.jboss.org/people/yogamaha] commented on the document
"How to configure EJB3 MDBs for IBM Websphere MQ"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-12944#comment-7111
--------------------------------------------------
Hi,
I have to tell this is an excellent article.
Part 1 of this article worked fine. I have configured MQ details using annotation inside the EJB & worked fine.
Part 2 - I tried to externalize the Queue related information into "ejb3-interceptors-aop.xml" so that I can use the same EAR in different environments & just update the "ejb3-interceptors-aop.xml" based on environment. This resulted in exception (Stack trace is below). Below are the configurations I have used:
*Configuration (ejb3-interceptors-aop.xml):*
<domain name="MyMessageDrivenBean" extends="Message Driven Bean" inheritBindings="true">
<annotation expr="class(*) AND !class((a)org.jboss.annotation.ejb.DefaultActivationSpecs)">
@org.jboss.annotation.ejb.DefaultActivationSpecs ({(a)javax.ejb.ActivationConfigProperty(propertyName = "destination", propertyValue = "MYQUEUENAME"),(a)javax.ejb.ActivationConfigProperty(propertyName = "hostName", propertyValue = "MyServerName"),(a)javax.ejb.ActivationConfigProperty(propertyName = "queueManager", propertyValue = "QUEUEMANAGER"),(a)javax.ejb.ActivationConfigProperty(propertyName = "port", propertyValue = "1415"),(a)javax.ejb.ActivationConfigProperty(propertyName = "transportType", propertyValue = "CLIENT")})
</annotation>
</domain>
*EJB Annotation:*
@AspectDomain(value="MyMessageDrivenBean")
@MessageDriven(name="TestMDB",
activationConfig =
{
@ActivationConfigProperty(propertyName = "destinationType",propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "QUEUE"),
@ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true"),
}
)
@ResourceAdapter(value="wmq.jmsra.rar")
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
*Stack Trace:*
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=RequestMonitor.ear,jar=RequestEJB.jar,name=TestMDB,service=EJB3 state=Create: org.jboss.deployers.spi.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:QUEUE@@localhost
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.activate(JBossMessageEndpointFactory.java:348) [:1.7.17]
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:214) [:1.7.17]
at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:248) [:1.7.17]
at org.jboss.ejb3.mdb.MessagingContainer.lockedStart(MessagingContainer.java:201) [:1.7.17]
at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:1105) [:1.7.17]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.0.GA]
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]
at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]
at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:154) [:0.2.2]
at org.jboss.system.tools.ProfileServiceToolsFacade.addURI(ProfileServiceToolsFacade.java:233) [:6.0.0.Final]
at org.jboss.system.tools.LegacyDeploymentScannerAdapter.addURL(LegacyDeploymentScannerAdapter.java:140) [:6.0.0.Final]
at org.jboss.system.tools.DeploymentScanner.addURL(DeploymentScanner.java:91) [:6.0.0.Final]
at org.jboss.system.tools.DeploymentScanner.addURL(DeploymentScanner.java:83) [:6.0.0.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
at org.jboss.system.server.jmx.MBeanServerWrapper.invoke(MBeanServerWrapper.java:138) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427) [:1.6.0_26]
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) [:1.6.0_26]
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265) [:1.6.0_26]
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360) [:1.6.0_26]
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) [:1.6.0_26]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) [:1.6.0_26]
at sun.rmi.transport.Transport$1.run(Transport.java:159) [:1.6.0_26]
at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]
at sun.rmi.transport.Transport.serviceCall(Transport.java:155) [:1.6.0_26]
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) [:1.6.0_26]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) [:1.6.0_26]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) [:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
Caused by: javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'localhost:'
at com.ibm.mq.connector.ResourceAdapterConnectionPool.allocateConnection(ResourceAdapterConnectionPool.java:330) [:6.0.2.11 - j600-211-110318 ]
at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:370) [:6.0.2.11 - j600-211-110318 ]
at org.jboss.resource.deployers.RARDeployment.endpointActivation(RARDeployment.java:330) [:6.0.0.Final]
at org.jboss.resource.deployers.RARDeployment.internalInvoke(RARDeployment.java:284) [:6.0.0.Final]
at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:153) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) [:6.0.0.GA]
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:58) [:1.7.17]
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.activate(JBossMessageEndpointFactory.java:344) [:1.7.17]
... 105 more
Caused by: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'localhost:'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:644) [:6.0.2.11 - j600-211-110318 ]
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2596) [:6.0.2.11 - j600-211-110318 ]
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1941) [:6.0.2.11 - j600-211-110318 ]
at com.ibm.mq.jms.MQConnection.<init>(MQConnection.java:904) [:6.0.2.11 - j600-211-110318 ]
at com.ibm.mq.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:5048) [:6.0.2.11 - j600-211-110318 ]
at com.ibm.mq.connector.ResourceAdapterConnectionPool.initializeJMSConnection(ResourceAdapterConnectionPool.java:495) [:6.0.2.11 - j600-211-110318 ]
at com.ibm.mq.connector.ResourceAdapterConnectionPool.createNewConnection(ResourceAdapterConnectionPool.java:401) [:6.0.2.11 - j600-211-110318 ]
at com.ibm.mq.connector.ResourceAdapterConnectionPool.allocateConnection(ResourceAdapterConnectionPool.java:317) [:6.0.2.11 - j600-211-110318 ]
... 113 more
--------------------------------------------------
14 years, 8 months
[jBPM] - How to know if a token is running
by José Peñalba Morales
José Peñalba Morales [http://community.jboss.org/people/josepm] created the discussion
"How to know if a token is running"
To view the discussion, visit: http://community.jboss.org/message/615278#615278
--------------------------------------------------------------
First of all, hi all there, I am new on this community.
Second, sorry for my bad English.
I hope someone can help me with this problem (sorry if this is a silly question).
It is related with:
http://community.jboss.org/message/386777#386777 http://community.jboss.org/message/386777
I have a concurrence problem. A user manually ends a pending task instance (TaskInstance.end()). The following activities until next "wait state" are long running (several minutes). We would like the user to synchronously wait until end of execution.
As the user is working at a web environment he can, at any moment, look for task instances to end (JbpmContext.getTaskMgmtSession().findTaskInstances(actorId) at another thread). If the user perform this query while a the previous activities are not finished, he finds the same task instance as before an is able to end it again. This leads to a "StaleObjectStateException" on the token in one (or both) of the threads with unpredictable results.
I understand the suggestion on the related discussion, any long time activities can be executed asynchronously in order to avoid this problem. But due to our needs (the user should be able to perform all activities on the process instance synchronously) this is not the desired solution.
¿Is there any way to force jBpm to flush database operations when "save" is called and not wait until the context is closed?
For example, ¿could be valid calling on "task-end" event?:
jbpmContext.save(taskInstance);
Or for example, ¿modifing the hibernate session flush mode could be a valid solution? ¿Does it have undesired consequences?
Something like:
jbpmContext.getSession().setFlushMode(FlushMode.AUTO)
or
jbpmContext.getSession().setFlushMode(FlushMode.ALWAYS)
This could help us to avoid the concurrence problem.
Many thanks in advance.
Regards,
José
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/615278#615278]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[jBPM] - Error while sending E mail Notification in jBPM 3.2.........
by Chamin Dennis Livera
Chamin Dennis Livera [http://community.jboss.org/people/dennislivera] created the discussion
"Error while sending E mail Notification in jBPM 3.2........."
To view the discussion, visit: http://community.jboss.org/message/611813#611813
--------------------------------------------------------------
I have tried to send e mail Notification using following procedure
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="simple">
<start-state name="Start">
<transition to="Notification"></transition>
</start-state>
<task-node name="Notification">
<task name="Notification">
<event type="node-enter">
<mail name="M_MailAction" to="test(a)gmail.com (mailto:test@gmail.com)" template="jbpm.mail.templates.xml">
<subject>Subject: Mail action - mail</subject>
<text>Text: This mail is of type- mail actions</text>
</mail>
</event>
<assignment actor-id="E mail Sender"></assignment>
</task>
<transition to="End"></transition>
</task-node>
<end-state name="End"></end-state>
</process-definition>
but couldn't, following error occer every time i try
log4j:WARN No appenders could be found for logger (org.jbpm.JbpmConfiguration). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Address at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at org.jbpm.jpdl.xml.JpdlXmlReader.class$(JpdlXmlReader.java:269) at org.jbpm.jpdl.xml.JpdlXmlReader.createMailDelegation(JpdlXmlReader.java:879) at org.jbpm.graph.action.MailAction.read(MailAction.java:17) at org.jbpm.jpdl.xml.JpdlXmlReader.readAction(JpdlXmlReader.java:697) at org.jbpm.jpdl.xml.JpdlXmlReader.createAction(JpdlXmlReader.java:681) at org.jbpm.jpdl.xml.JpdlXmlReader.readActions(JpdlXmlReader.java:635) at org.jbpm.jpdl.xml.JpdlXmlReader.readEvents(JpdlXmlReader.java:624) at org.jbpm.jpdl.xml.JpdlXmlReader.readNode(JpdlXmlReader.java:529) at org.jbpm.jpdl.xml.JpdlXmlReader.readNodes(JpdlXmlReader.java:256) at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:157) at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:181) at com.sample.SimpleProcessTest.execute(SimpleProcessTest.java:18) at com.sample.SimpleProcessTest.main(SimpleProcessTest.java:14) Caused by: java.lang.ClassNotFoundException: javax.mail.Address at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) ... 15 more
Whta went wrong, is there any other configurations i have to make??
Need Help?
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/611813#611813]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months