[jBPM Users] - Re: [jBPM4] Synchronous process execution
by kukeltje
anonymous wrote : I understand what you are saying, but in my opinion the "to many (java) threads" should be at the user consideration, if I want to use them, the jBPM should give that option.
It's not something that could/should not be in jBPM, it's just that the combination of having a blocking process with waitstates is not something that has been requested a lot before (at all afaik) so there simple was not any time spent in realizing this.
With my 'previous post' I refered to the post in this topic, sorry for the confusion. Like I said, jBPM supports executing synchronous services and is blocking IF the services you call are all synchrounous. Since you do not seem to have a problem with blocking threads, you can create blocking services. That is even cleaner than jBPM providing it 'intrisically' ;-).
So this way you do not lose the 'synchronism' and I still think a thread blocking for possible long period (since you have human task) is a wrong design of a system with many downsides and possible problems like transactiontimeouts, etc.Maybe it is time to rethink some of your architecture.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260138#4260138
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260138
16 years, 5 months
[jBPM Users] - event listener expression
by theSourpuss
Hi,
=== Environment ==============================
- jBPM Version : 4.1
- JDK : 1.6
- Configuration : SeamConfiguration/SpringConfiguration
=== Process ==================================
<on event="end">
| <event-listener expr="#{processEndLogActivityHandler}">
| <property name="processEndStatus"><string value="successful"/></property>
| </event-listener>
| </on>
=== Stacktrace ================================
java.lang.NullPointerException
at org.jbpm.pvm.internal.model.op.ExecuteEventListener.perform(ExecuteEventListener.java:81)
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.SeamTransactionInterceptor.execute(SeamTransactionInterceptor.java:40)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84)
=== Problem description =========================
According to jbpdl-4.0.xsl an event-listener can have an 'expr' attribute instead of an 'class' attribute. But why I get an exception if I use the 'expr' attribute. The 'expr' works fine in java and custom activities.
As I have seen it is not considered in EventListenerBinding->JpdlParser->parseObjectDescriptor(...)
Am I right, or is it in any way possible to use expression here?
kind regards,
tony
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260108#4260108
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260108
16 years, 5 months
[jBPM Users] - org.hibernate.MappingException: Named query not known: findP
by homes
=== Environment ==============================
- jBPM Version : 4.1
- JBOSS Version: 5.0.0.GA
- Database : Oracle 11g
- JDK : java version "1.6.0_12"
- Configuration : original jbpm.cfg.xml
- Libraries : no additional libs
=== API ===================================
public static void main(String[] args) {
| Properties p = new Properties();
| p.put("java.naming.factory.initial",
| "org.jnp.interfaces.NamingContextFactory");
| p.put("java.naming.provider.url", "jnp://localhost:1099");
| p.put("java.naming.factory.url.pkgs",
| "org.jboss.naming:org.jnp.interfaces");
| try {
| InitialContext initial = new InitialContext(p);
| Object ref = initial.lookup("jbpm/CommandExecutor");
|
| RemoteCommandExecutorHome comServiceHome = (RemoteCommandExecutorHome) PortableRemoteObject.narrow(ref, RemoteCommandExecutorHome.class);
|
| RemoteCommandExecutor jbpm4 = comServiceHome.create();
|
| FindLatestProcessDefinitionByKeyCmd cmd = new
| FindLatestProcessDefinitionByKeyCmd("processkey");
|
| Object def = jbpm4.execute(cmd);
|
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
=== Stacktrace ==============================
15:08:41,784 INFO [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.FindLatestProcessDefinitionByKeyCmd@8a0821
| org.hibernate.MappingException: Named query not known: findProcessDefinitionsByKey
| at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:93)
| at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1287)
| at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findLatestProcessDefinitionByKey(DbSessionImpl.java:114)
| at org.jbpm.pvm.internal.cmd.FindLatestProcessDefinitionByKeyCmd.execute(FindLatestProcessDefinitionByKeyCmd.java:44)
| at org.jbpm.pvm.internal.cmd.FindLatestProcessDefinitionByKeyCmd.execute(FindLatestProcessDefinitionByKeyCmd.java:33)
| at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
| at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInNewTx(JtaTransactionInterceptor.java:79)
| at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:61)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithRetry(JtaRetryInterceptor.java:52)
| at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:45)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
| at org.jbpm.enterprise.internal.ejb.CommandExecutorSLSB.execute(CommandExecutorSLSB.java:102)
| 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.jboss.invocation.Invocation.performCall(Invocation.java:386)
| at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
| at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
| at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
| at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
| at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
| at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
| at org.jboss.ejb.Container.invoke(Container.java:1029)
| 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:549)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
| 15:08:41,790 ERROR [LogInterceptor] RuntimeException in method: public abstract java.lang.Object org.jbpm.enterprise.internal.ejb.RemoteCommandExecutor.execute(org.jbpm.api.cmd.Command) throws java.rmi.RemoteException:
| org.hibernate.MappingException: Named query not known: findProcessDefinitionsByKey
| at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:93)
| at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1287)
| at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findLatestProcessDefinitionByKey(DbSessionImpl.java:114)
| at org.jbpm.pvm.internal.cmd.FindLatestProcessDefinitionByKeyCmd.execute(FindLatestProcessDefinitionByKeyCmd.java:44)
| at org.jbpm.pvm.internal.cmd.FindLatestProcessDefinitionByKeyCmd.execute(FindLatestProcessDefinitionByKeyCmd.java:33)
| at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
| at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInNewTx(JtaTransactionInterceptor.java:79)
| at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:61)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithRetry(JtaRetryInterceptor.java:52)
| at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:45)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
| at org.jbpm.enterprise.internal.ejb.CommandExecutorSLSB.execute(CommandExecutorSLSB.java:102)
| 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.jboss.invocation.Invocation.performCall(Invocation.java:386)
| at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
| at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
| at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
| at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
| at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
| at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
| at org.jboss.ejb.Container.invoke(Container.java:1029)
| 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:549)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
=== Problem description =========================
jbpm4.execute(cmd) throws Exception. You can see in printed stacktrace (jboss) that there are problems with
named queries. Did have someone else this problem? The Exception occured when I execute the different FindProcessDefinition commands.
I searched in the *.hbm.xml files after this query but it is not available. Can someone else try to execute this command?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260092#4260092
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260092
16 years, 5 months
[jBPM Users] - JBPM 4 Persistent Variable
by czujnik
I've tried to implement in my jBPM project implement process variable which will be stored in separated Table mapped by Hibernate entity. Entity works find when I'm trying to store it outside the jBPM (only by savbing it usinf Hibernate).
When I create entity and I'm trying to set it as Variable, I got exception :(:
org.hibernate.HibernateException: instance not of expected entity type: org.jbpm.pvm.internal.type.variable.UnpersistableVariable is not a: org.jbpm.pvm.internal.type.Variable
Entity is mapped correctly, because I can create entity and store it in DB outside Process. Primary key of the entity id long. The only configuration I made was hibernate configuration of new entity.
Variable is persisted as binary data when I implement Serializable interface in it, but this not match my requirements :(
My problem is how to persist variable as separated entity (in proper mapped table).
Thanks in advance
Pawel
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260056#4260056
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260056
16 years, 5 months