2 Replies Latest reply on Feb 14, 2008 7:11 PM by rocknroll

    Integrating process' execution with external webapps issues

    rocknroll

      I have the following scenario at one of the projects i've been working in:

      I have a process definition that should work together with several Web applications. I believe that the interaction should happen at the State nodes (which purpose i believe (correct if i'me wrong) is to delegate the execution to some external component) What i dont get yet is: should the component be an application that has no user interaction ? Can it be a Web application? We are using the jbpm-console (that's why i'm asking for the integration with other web applications) and at some point in the process' execution we would like to redirect the execution (via http request/response) to another application, then redirect it back.

      I do know that the actionhandlers were designed to work in an stand-alone way, without any web contexts dependency.

      What is the best way to build this solution ?

      Sorry if this is some kind of old discussion in the forum, I looked for a post about this kind of issue and didnt find any.

        • 1. Re: Integrating process' execution with external webapps iss
          kukeltje

          States are for situations where a process has to wait e.g. for an external trigger. Where that comes from does not matter. It might be a system from a different company with it's own workflow etc... Can be a webapp as well.

          And yes, actionhandlers do not have any dependency on the webcontext.

          What is the best way to build this solution ?

          Totally depends on the other system. You can do anything from the actionhandler you can in plain java.

          Sorry if this is some kind of old discussion in the forum, I looked for a post about this kind of issue and didnt find any.

          Did you use the search in the forum or did you use google? The latter is better (at the moment)

          • 2. Re: Integrating process' execution with external webapps iss
            rocknroll

            Thanks for the quick answer.
            So I used my imagination and i came up with the following solution.
            My Action Handler gets the HttpServletResponse from the FacesContext, then it takes the actual token from the Execution Context. Now I use the JNDI to publish an object that holds, among other things, the token. The idea is that the external application (which has been started using the redirect method of the HttpServletResponse) should trigger the signal on the token, so it can fallow some outgoing transition. I don't think this is the most clever solution, but in my point of view it should work ! Working is all i need for now. Unfortunately the implementation is not as simple as i thought it would be. I'm having some problems while publishing the token object at the jndi tree. Whenever I try to bind it to a jndi name I get an exception, thrown by the FacesServlet:

            17:56:53,686 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception
            java.lang.NoClassDefFoundError: Lorg/jbpm/graph/exe/Token;
             at java.lang.Class.getDeclaredFields0(Native Method)
             at java.lang.Class.privateGetDeclaredFields(Class.java:2259)
             at java.lang.Class.getDeclaredField(Class.java:1852)
             at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1582)
            


            I've already put the jbpm-jpdl.jar file in the the $CLASSPATH, in the jboss lib dir, in the $JBOSS_CLASSPATH. And Still I get the same Exception. Even when I try to pass the Token to another component (a plain java Object, for example).
            By the way, I'm using Jbpm-jpdl-3.2.GA.

            Did anyone already saw something like that ?

            Has anybody already been through this kind of issue ? (use of a token from another web application)

            I believe this shouldn't happen at all!