14 Replies Latest reply on Jul 17, 2006 4:17 PM by kukeltje

    webservices and jbpm

    tom.baeyens

      here's how our current approach is to binding jbpm to webservices:

      1) exposing the jbpm API's as a webservice. This would be done by exposing the jbpm command service as a web service. i don't know if that is possible. especially since the parameter of the execute(Command c) takes a command (interface) and we don't know yet all the implementations. So we don't know how the xml will look like for the different commands.

      the first place to start looking would be to make an ejb out of the command execution service and then try to expose it as a webservice.

      otherwise, we would have to create a custom stateless session bean that we have to expose as a web service.

      2) from jbpm to web service. this would be a configurable action implementation that does a web service invocation. configurations would be a url, method, parameters? and other info necessary to invoke a web service.

      just my initial thoughts

        • 1. Re: webservices and jbpm
          jimrigsbee

          There currently is a command execution stateless session bean in the source tree. So we already have a starting point for this EJB. This is being used by the Jms command executor but could easily be exposed as a web service.

          The command object would have to have a special serializer because it is a complex XML type. If we create a sample Java client with the serializer thrown in it should not be that hard for our clients to get up to speed using it.

          Perhaps, someone could then create a sample .NET or other language client from that model.

          Jim

          • 2. Re: webservices and jbpm
            kukeltje

            Thanks, I did not look into this for the last few months . For this 'customer' I'll try using axis2 with xmlbeans (their, no rather mine current preference) but it has to wait for at least two weeks since I'm off playing golf in France for 5 days.

            • 3. Re: webservices and jbpm
              aguizar

              The XML Schema allows for deriving types from other types. Java-XML binding frameworks such as JAXB match type derivation with class inheritance. Therefore, the Command service should not be hard to expose.

              Regarding invocation, be careful, don't treat web services as RMI. For a document-oriented service, the notion of "parameters" has no meaning. We must devise a way to assemble an XML document from the process variables.

              I remember discussing this topic some time ago (in the sourceforge forums!). Back then I rounded up the conclusions and put together a paper. I just attached it to a Wiki page. We can pick up from there.

              • 4. Re: webservices and jbpm
                tom.baeyens

                Kukeltje,

                please also consider the new JBoss WS stack: http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS

                i know heard they had compatibility problems with axis and therefor started this new project. if you want more background, you can ask on the jboss ws forums. some very competent people there that know much better then i why they needed to write a separate impl.

                alternatively, i also like the approach that alex took with bpel: using jee 1.4 web services so that your solution becomes portablel across app servers.

                • 5. Re: webservices and jbpm
                  eruiz

                  Hello,

                  I don't know what is the best solution, but at DiSiD we are developing BPM applications using jBPM but without using EJBs, our applications are the most portable applications because they can be deployed in an application server and in a servlet container like Tomcat.

                  Exposing the jBPM API as webservices with EJBs signifies to limit the portability that the jBPM has. I don't know if JBoss offers another way to implement WS as another frameworks does (like Springframework) but it could be a good feature to not limit the use of the jBPM-WS to applications that must be deployed on application servers.

                  Best regards.

                  • 6. Re: webservices and jbpm
                    kukeltje

                    Tom,

                    I would, but this 'customer' is *not* running JBoss, but a plain tomcat server and currenty not willing to migrate (yet). If JBoss-WS runs on Tomcat, I'll have a look, but if it does not run (out of the box) on tomcat.

                    I'll have a look next week

                    Have a nice holiday with the familiy

                    • 7. Re: webservices and jbpm
                      tom.baeyens

                      it does run outside of jboss. i remember that was recently announced. you may want to check which exact version that supports this on
                      http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS

                      or ask it on

                      http://www.jboss.org/index.html?module=bb&op=viewforum&f=200

                      • 8. Re: webservices and jbpm
                        kukeltje

                        I like it the other way around, first ask and only if someone posts a RT..... I'll go and have a look in the wiki/docs/....

                        :-P

                        • 9. Re: webservices and jbpm
                          koen.aers

                          LOL

                          You didn't see the answers yet that Thomas Diesler dares to throw at guys who did not read the smart questions manual I presume? ;-)

                          • 10. Re: webservices and jbpm
                            kukeltje

                            No I did not.... Now you made me scared to even try to start using JBossWS. I hate forum guys.... They are the biggest jackasses ever to populate the world.

                            • 11. Re: webservices and jbpm
                              kukeltje

                              Sorry, should have added a ;-) to this last post. I do not want people to take this last remark to seriously

                              • 12. Re: webservices and jbpm
                                koen.aers

                                wussie :P

                                • 13. Re: webservices and jbpm
                                  kukeltje

                                  Sounds like Koen needs a holiday, he is getting delirious or maybe I should just kick him of this forum for verbally abusing the moderator

                                  /Kick

                                  • 14. Re: webservices and jbpm
                                    kukeltje

                                    shhoooooot I did it. I FIRST searched the JBossWS forum. The second topic I found was

                                    http://www.jboss.org/index.html?module=bb&op=viewtopic&t=85118

                                    which indicates a small packaging issue, but more important, refers to http://labs.jboss.com/portal/jbossws/user-guide/en/html/installation.html#install-tomcat so I am probably going to use jbossWS but....

                                    We've run into an issue (not jBPM/JBoss related) where a customer already had axis in its environment and was relying on specific functionality and another stack could not be run concurrently.... maybe an issue to keep in mind