6 Replies Latest reply on May 22, 2006 12:37 AM by David Hosier

    jBPM evaluation queries

    Celso Pinto Newbie

      Hi everyone,

      I've been assigned to evaluate open-source BPM/BEPL solutions for a major government project and I'm starting with jBPM. I've followed the user guide to create a simple process but I have to admit I'm failing to understand what is possible to do with jBPM.

      For instance, one of the core requirements is that the process invokes a series of webservices and applies transformations to the results of each webservice invocations to pass along to the next call. Is webservice invocation something that jBPM supports? How can I create a task that does this, if at all possible?

      Also, can I apply transformations to the results, for instance, with XSL? If so, how?

      I've seen a few proprietary solutions that do this and within their products it was pretty obvious on how to perform these tasks.

      Any insight is deeply appreciated.

        • 1. Re: jBPM evaluation queries
          David Hosier Novice

          Anything you can do in Java, you can do with jBPM. There is no built-in support for the things you mention (i.e. node types that do those things), but you can attach custom action handlers to nodes. The action handlers are java classes that execute when the node is reached. So your java code could invoke those web services, transform the results, and stick those results into process variables for use in the next node in the process.

          • 2. Re: jBPM evaluation queries
            David Hosier Novice

            You might also give the User Guide a look, it contains a lot of information that could be quite helpful to you.

            http://docs.jboss.org/jbpm/v3/userguide/index.html

            • 3. Re: jBPM evaluation queries
              Ronald van Kuijk Master

              Many other (older) producs currently include functionality that in more recently products would be done with an ESB. The process engine is best for doing long running workflow processes. Calling services of different types is , as described above, possible by writing your own actionhandlers or inplementing one that can call an ESB. The latter is what we (in the company i work for) are doing. It will be a generic actionhandler (10 lines of code) that calls the ESB (currently mule, but it will be JBoss ESB once it is released). The data we transfer is an xml document of a map of variables. We are even thinking of ditiching the xml document an just use a
              (hash)map of variables

              hth

              • 4. Re: jBPM evaluation queries
                Celso Pinto Newbie

                Thanks for your replies guys. Your insight is truly valuable.

                I have a couple more questions though: is it possible to aggregate processes?

                Let me try to explain myself a bit better because I'm not sure if the term is correct.

                Let's say I have two distinct processes and using either one depends on a decision which is made by the client. If I were to implement that decision in jBPM, how would I invoke the corresponding process in the jBPM Process Designer? Or should I implement a new handler?

                Also, how can I assign a decision handler to a decision node? Reading the User Guide, I understand that the only way to do this is to implement a beanshell script (absolutely nothing against this, I truly enjoy the scripting environments one can use with Java), and to do this one has to apply changes to the XML itself not in the jBPM designer. Am I correct?

                Once again, thanks for taking the time to answer to my queries.

                • 5. Re: jBPM evaluation queries
                  David Hosier Novice

                  You can easily aggregate processes using the Process State, which is available in the process designer plugin. However, support for graphically setting properties on such nodes is limited, and you have to edit the source directly to get most of the detail in there. Search the user the User Guide for the term Process Composition and see this link in the User Guide: http://docs.jboss.org/jbpm/v3/userguide/jpdl.html#processstate.element

                  You can use either a Java class OR the expressions in a decision node. The User Guide points this out in the documentation of the decision node: http://docs.jboss.org/jbpm/v3/userguide/jpdl.html#decision.element. I think you might be able to supply the Java class via the graphical dialog in the process designer (not sure though), but I know you have to specify the expression directly in the source. And these expressions are specified in the transition elements of the decision node. However, note that the expressions are NOT beanshell expressions. I believe the User Guide is erroneous in this claim. I'm sure I've seen forum posts in regards to this, you should do a search. Someone correct me if I'm wrong.

                  • 6. Re: jBPM evaluation queries
                    David Hosier Novice

                    Some people have had questions about how to go about the whole process composition thing, so I figured I would clarify a bit. What you would need to do is create a new, separate process in the process designer. Then in your Process State in the other process, you put the new process' name in the sub-process element of the process state node in the source.