4 Replies Latest reply on Sep 5, 2008 9:11 AM by francis17101970

    jBPM + WebServices + EJB 3.0

    cdc08x

      Hi all!

      I've been searching for days for a good solution to my problem: due to university work, I have to find something able to describe the behaviour of a web-application (server-side) as a graph (state-transitions network), in XML, then translate it as a real application able to make its status evolve through calls to multiple methods, as a WebService. The WebService must be encoded using EJB 3.0 (that is, a Stateless Session Bean, linked somehow to the conversational logic - stateful, of course).

      This seems to be something that's covered by Seam 2.0. Is it correct?
      I've read its documentation, explored the examples, but, before going on, I would like to be sure I'm on the right way.

      Could someone suggest me some useful links to documents / articles / anything about the solution to my question?

      Thank you very very much, in advance.
      --
      Claudio Di Ciccio

        • 1. Re: jBPM + WebServices + EJB 3.0

          Well if I understand your requirements, you should encode your graph based application in XML. JBPM seems to fit perfectly. The Web service can expose your jbpm command service as a web service. Moreover jBPM supports natively the ESB so you can orchestrate Services simply using jBPM Nodes
          (see
          http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.2.2/html/SOA_ESB_JBPM_Integration_Guide/index.html)

          The webservice encoded using ejb 3.0 what do you mean ? using annotations @Webservice ?
          if I understand your requirement for this you don't need Seam to use them. Anyway Seam helps a lot if you have EJB in your application, you'll save a lot of time wasted in writing useless Java Bean code. (just to mention one)

          P.s. Besides the official docs, there's one article in my blog which is a good starting point for jbpm.


          • 2. Re: jBPM + WebServices + EJB 3.0
            cdc08x

            Thank you very very VERY much Francesco!
            I'll carefully read your article, and the documentation.

            The webservice encoded using ejb 3.0 what do you mean ? using annotations @Webservice ?

            About "using EJB 3", yes, I meant "@WebService" annotations over Session Beans, and so on. Actually, there's no need to include Entity Beans or Message Beans at the moment.
            if I understand your requirement for this you don't need Seam to use them. Anyway Seam helps a lot if you have EJB in your application, you'll save a lot of time wasted in writing useless Java Bean code. (just to mention one)

            Do you mean annotations like @NotNull? If so, yes, I've seen it in the examples, it's a very nice feature, but, you're right, I'm not focusing on them, now.

            Thank you very much, once more!

            • 3. Re: jBPM + WebServices + EJB 3.0
              cdc08x

              Hi Francesco (and who reads here)!

              I searched and read and searched again, after reading your very useful links, and my problem remained the same: WebService in EJB 3.0 must be deployed over StateLESS Session Beans, then there is no way to mantain the state of the current process running - apart from explicitly pass it through the methods' parameters.

              For example, if I want the user to select a product

              @WebMethod public void selectProduct(Product p)
              before adding it to cart
              @WebMethod addToCart(Product p)
              , this rule is easily expressible on a process. But how may I connect the transition of the process instance to the WS calls?

              Then, it seems that Seam works best (with conversation ids and so on), to my purpose - more than the jBPM / jPDL suite for JBossAS.

              Am I wrong? If so, tell me (any link with examples or whatever should be very appreciated! :)

              Thanks in advance!

              • 4. Re: jBPM + WebServices + EJB 3.0

                Hello,
                well as far as I know there's an API called JAX-WS that' about
                stateful Web Services
                https://jax-ws.dev.java.net/nonav/2.1/docs/statefulWebservice.html

                Anyway if you check the WS Stack
                http://jbws.dyndns.org/mediawiki/index.php?title=JBossWSGenerellStackComparison

                that's available only on a few WSStack....even if it's mentioned Native JBossWS is able to handle Stateful WS.
                Not having too much experience on this I honestly cannot tell you more....
                regards