[JBoss jBPM] - What we did: Flexible IN-Parameters for Nodes
by Vorsorge
Hi,
we just started using Jbpm in our productive environment in a smaller insurance company. Our aim for the coming years is to use jBPM as the base for our business process server for all our business processes.
How far we can go this way depends on many things.
But when we started we discovered some things missing in Jbpm where we found our own solutions for. I want to tell you about this and hope for reactions in the range of "jBPM already can do this. Just RTFM, stupid!" to "Nice, but I have some ideas how you could improve this" and "Oh, that's greeat. Tell me more".
Our aim:
Maximaze the reusability of nodes for the business analyst.
Consequence:
We need a way to configure IN-Parameters of nodes.
Example:
A node which reads some data from a database might be used in different processes slightly differently:
a) Give me all data younger than the processVariable "letterRecieved"
b) Give me all data younger than 01.02.2007
c) Give me all data from the last two weeks.
In this case all we have to do is to give the date to a SQL-Statment but it comes from different sources.
In a) the source is a process variable, in b) it's a constant value and in c) it's the result of a computation.
What we did:
We are using the configuration mechanism of Jbpm to insert Strings in a special formatted way.
For a) this would be in jPDL:
| <action class="abcActionHandler.AbcHandler">
| <selectDate>
| IN;VAR;Date;letterRecieved
| </selectDate>
| </action>
For b)
<action class="abcActionHandler.AbcHandler">
| <selectDate>
| IN;CONST;Date;01.02.2007
| </selectDate>
| </action>
For c)
<action class="abcActionHandler.AbcHandler">
| <selectDate>
| IN;FUNC;functionClass
| </selectDate>
| </action>
Our handler would need a selectDate class variable.
At runtime the value of this variable would be parsed. Depending on the second parameter {VAR; CONST; FUNC} the needed date
would be computed and used.
a) From the process variable "letterRecieved" with type Date
b) The constant value 01.02.2007 would be parsed to Date.
c) An instance of funcionClass would be instantiated which is able to compute the needed Date.
Depending on the reactions to this posting maybe I will post more.
Regards,
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076703#4076703
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076703
18Â years, 8Â months
[JBoss Seam] - Error creating component org.jboss.seam.core.resourceBundle
by demetrio812
Hi,
I just downloaded the latest version(Build #142 22-ago-2007 0.49.47), I created a project with seam-gen, tried to deploy: all is ok.
Then I added some resource bundle files in "resources" directory and the following code in components.xml:
| <core:resource-bundle>
| <core:bundle-names>
| <value>messages</value>
| <value>messages_site</value>
| <value>messages_articles</value>
| <value>messages_articles_list</value>
| <value>messages_articles_form</value>
| </core:bundle-names>
| </core:resource-bundle>
|
I restarted the server and I got the following exception:
anonymous wrote :
| 11:33:36,265 ERROR [[/unica3]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
| java.lang.RuntimeException: Could not create Component: org.jboss.seam.core.resourceBundle
| at org.jboss.seam.init.Initialization.addComponent(Initialization.java:955)
| at org.jboss.seam.init.Initialization.installComponents(Initialization.java:882)
| at org.jboss.seam.init.Initialization.init(Initialization.java:538)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| 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:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
| 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:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
| at org.jboss.web.WebModule.startModule(WebModule.java:83)
| at org.jboss.web.WebModule.startService(WebModule.java:61)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.start(Unknown Source)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy46.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalArgumentException: no such setter method: org.jboss.seam.core.ResourceBundle.bundleNames
| at org.jboss.seam.util.Reflections.getSetterMethod(Reflections.java:235)
| at org.jboss.seam.Component.initInitializers(Component.java:480)
| at org.jboss.seam.Component.(Component.java:260)
| at org.jboss.seam.Component.(Component.java:214)
| at org.jboss.seam.init.Initialization.addComponent(Initialization.java:940)
| ... 139 more
| 11:33:36,296 ERROR [StandardContext] Error listenerStart
|
How can I solve this? Is it a bug?
Thanks
Demetrio Filocamo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076700#4076700
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076700
18Â years, 8Â months
[JBossWS] - Re: trying to access a webservice - not working from either
by rodgerca
Well I have now managed to get my webservice running from within SOAPUI - I did this by changing my return arraylist to a simple array of objects. Don't think arrayLists are supported but frankly the documentation on the JBoss sites is pretty bad so I had to work that out for myself.
I am still getting the error below when I run my webservice from a java client, but I'm not going to investigate further because the webservice is working and that's what matters. Unless anyone can tell me if there is anything obvious I am doing wrong....
Exception in thread "main" org.jboss.ws.WSException: Cannot obtain java/xml type mapping for: {http://com.cmmgroup/address}addressRequestArray
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.processOutputDocElement(JAXRPCMetaDataBuilder.java:778)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataDoc(JAXRPCMetaDataBuilder.java:897)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:214)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:216)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:85)
| at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| at com.cmmgroup.address.client.runAddressAsWebService.main(runAddressAsWebService.java:27)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076699#4076699
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076699
18Â years, 8Â months
[JBoss Seam] - Finding an entity using a non-@Id unique identifier
by uke
Hi!
I'm using an EntityHome-object which I'm using to view Employees on a viewEmployee.xhtml page, using in pages.xml with no problems.
My problem now is that I want to use viewEmployee.xhtml to view an Employee based on a unique employement-number instead, and that's where I run into problems.
This is my current attempt, where I first find the corresponding id, and then try to load viewEmployee.xhtml the usual way:
(foo.xhtml)
| <h:form>
| <h:inputText id="employmentNumber" value="#{employmentNumber}"/>
| <h:commandButton id="find" value="Find" action="#{employeeDao.findByEmploymentNumber}"/>
| </h:form>
|
(components.xml)
| <fwk:entity-query name="employeeIdByEmploymentNumber"
| entity-manager="#{entityManager}"
| ejbql="select e.id from Employee e">
| <fwk:restrictions>
| <value>employmentNumber = #{employmentNumber}</value>
| </fwk:restrictions>
| </fwk:entity-query>
|
(EmployeeDao.java (Extends EntityHome))
| public String findByEmploymentNumber() {
| EntityQuery eQuery = (EntityQuery)Component.getInstance("employeeIdByEmploymentNumber");
| Long l = null;
| if(eQuery.getResultCount() > 0)
| l = (Long)eQuery.getSingleResult();
| if(l != null) {
| setId(l);
| return "found";
| } else {
| facesMessages.add("Not found!");
| }
| return "";
| }
|
(pages.xml)
| <page view-id="/foo.xhtml">
| <navigation from-action="#{employeeDao.findByEmploymentNumber}">
| <rule if-outcome="found">
| <redirect view-id="/viewEmployee.xhtml">
| <param name="employeeId" value="#{employeeDao.id}" converterId="javax.faces.Long"/>
| </redirect>
| </rule>
| </navigation>
| </page>
|
The id is a Long, and the employmentNumber is a String.
This all works, except that I get LazyInitializationExceptions in viewEmployee.xhtml when trying to render connected entities. If I just reload the "An Error Occurred:"-page, though, everything works perfectly. So somehow, my solution closes the session that I'm keeping the Employee in.
I'm not sure if this is a good solution for this at all, so any help or suggestions would be greatly appreciated. :)
/uke
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076693#4076693
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076693
18Â years, 8Â months