2 Replies Latest reply on Oct 8, 2007 3:27 AM by chawax

    How to split JBPM configuration for Seam ?

    chawax

      Hi,

      In my Seam application, I use JBPM both for processes and pageflows.
      My app is deployed as an EAR which includes :
      - A JAR with business classes (entities, services, ...) and business process definitions, let call it core.jar
      - And of course the WAR which includes page flows definitions.
      So my process definitions are bundled in core, and my page flows definitions are bundled in WAR.

      The last problem is that JBPM configuration is done is a single file that has to be either in core.jar, either in WAR. I would like the JBPM configuration to be defined in two files :
      - the components.xml file in the core jar would configure process definitions
      - the one in the WAR would configure pageflow definitions.

      For example, I would like this configuration :

      <bpm:jbpm>
       <bpm:process-definitions>
       <value>bpm/todo/processdefinition.xml</value>
       <value>bpm/validationDemandeAbsence/processdefinition.xml</value>
       </bpm:process-definitions>
       <bpm:pageflow-definitions>
       <value>WEB-INF/pageflow/demandeAbsence/demandeAbsence.jpdl.xml</value>
       </bpm:pageflow-definitions>
      </bpm:jbpm>


      to be splitted in a configuration for core.jar with process definitions :

      <bpm:jbpm>
       <bpm:process-definitions>
       <value>bpm/todo/processdefinition.xml</value>
       <value>bpm/validationDemandeAbsence/processdefinition.xml</value>
       </bpm:process-definitions>
      </bpm:jbpm>


      and a configuration in WAR for page flow definitions :

      <bpm:jbpm>
       <bpm:pageflow-definitions>
       <value>WEB-INF/pageflow/demandeAbsence/demandeAbsence.jpdl.xml</value>
       </bpm:pageflow-definitions>
      </bpm:jbpm>


      The problem is that Seam tells me that the JBPM component is declared twice ... How could I do this ?

        • 1. Re: How to split JBPM configuration for Seam ?
          thejavafreak

          What is the error stack trace?

          Perhaps you can add a feature request in JIRA.

          • 2. Re: How to split JBPM configuration for Seam ?
            chawax

            The error stack trace is this one :

            Caused by: java.lang.IllegalStateException: Two components with the same name and precedence: org.jboss.seam.bpm.jbpm
             at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:446)
             at org.jboss.seam.init.Initialization.installComponentFromXmlElement(Initialization.java:356)
             at org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:256)
             at org.jboss.seam.init.Initialization.initComponentsFromXmlDocuments(Initialization.java:114)
             ... 139 more


            In fact what I need is that Seam works this way :
            - If the bpm component has not been instantiated yet, instantiate it
            - If the bpm component has already been instantiated, just add process definitions or page flow definitions to it.
            Don't know if it's something possible with Seam ...