3 Replies Latest reply on Oct 17, 2008 7:24 PM by Petr Nejedly

    Redirect between multiple Seam war apps

    Petr Nejedly Newbie

      Hello,


      I wonder if the following is possible. I was looking for an answer but couldn't find one yet.


      I have an ear file including multiple war files. All the wars are configured to support Seam. One of the war apps is our workflow portal (gateway) including task list page. Is it possible to have pages designed to carry out the tasks in other war files? If so, how can we redirect to those pages in pages.xml so that the business process conversation is passed to the target page?


      Thanks a lot,


      Petr

        • 1. Re: Redirect between multiple Seam war apps
          Petr Nejedly Newbie

          I've been investigating a bit more on this and it looks like I can do the external redirect in pages.xml like:


          <page view-id="/alias/cmmTask.xhtml" > 
                   <action execute="#{facesContext.externalContext.redirect('../../cmm/pages/product/task.jsf')}" />
              </page>



          It carries over the conversation id, so everything is ok there. But if I call a method annotated @EndTask on a bean in the other module, it doesn't work. Looks like it doesn't even install Seam's core JBPM-related components in the module (since they are dependent on <jbpm /> which is present only in the portal module.


          Is there a way how to enable Jbpm Seam components in other modules without configuring Jbpm in each of them?


          Cheers, Petr

          • 2. Re: Redirect between multiple Seam war apps
            Petr Nejedly Newbie

            Ok, I deployed JBPMConfiguration into its own sar file and exposed it on JNDI. In my component.xml files in defferent modules I can now install Jbpm component and pass the JNDI name to it. THe required Seam Jbpm components (e.g. BusinessProcess.java) now get installed properly.


            Now I'm obviously facing another problem - the different Seam containers (wars) don't share the same component instances (e.g. BusinessProcess). What is the best way to pass the selected process and task to the other modules? Some kind of Interceptor that would insert the processId into URL? Or Filter? Or is there a way of sharing the instances between the modules?


            P.


            • 3. Re: Redirect between multiple Seam war apps
              Petr Nejedly Newbie

              Forgot to mention I'm using Seam 2.0.2 with Jbpm 3.3.0