0 Replies Latest reply on Nov 25, 2011 3:01 AM by Ivan Rododendro

    JBPM Integration : EL Resolution issue

    Ivan Rododendro Newbie

      Hi all,
      I'm quite new to JBPM / Seam, I'm facing a problem of missing resolution of a Seam component in a jpdl transition : in a process definition we use a reference to a seam component called etatEvenenemt, normally it works. In the transition ok of the node presenter EL cannot resolve etatEvenement and the property is set to 0. I have no other component with the same name. No exception is thrown

      Please help, I'm getting crazy...

      JBoss 4.2
      Seam 2.1.1

      this is the process definition :


      <process-definition name="gestionEvenement" xmlns="urn:jbpm.org:jpdl-3.2"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd">


                <start-state name="start">
                          <transition to="instruire">
                                    <action
                                              expression="#{evenementHome.changeEtat(etatEvenement.etatEvenementEnCoursDInstruction)}" />
                                    <create-timer name="rappelInstruction" duedate="2 business days">
                                              <action class="fr.vdm.eventsoe.commun.MailJbpmVdm">
                                                        <to>
                                                                  #{evenementList.getEvenementParId(Id).instructeur.email}
                                                        </to>
                                                        <subject>
                                                                  EventsOE - Rappel d'instruction pour
                                                                  l'&#233;v&#232;nement
                                                                  F#{evenementList.getEvenementParId(Id).code.code}
                                                        </subject>
                                                        <text>
                                                                  <![CDATA[
      --- MESSAGE AUTOMATIQUE ---


      Le delai de 48h pour l'instruction de l'&#233;v&#232;nement F#{evenementList.getEvenementParId(Id).code.code} #{evenementList.getEvenementParId(Id).nom} est &#233;coul&#233;.


      --- MESSAGE AUTOMATIQUE ---


      PS: Ce mail vous a &#233;t&#233; envoy&#233; de mani&#232;re
      automatique. Il est inutile d'y r&#233;pondre.
                         ]]></text>
                                              </action>
                                    </create-timer>
                          </transition>
                </start-state>


                <task-node name="instruire">
                          <event type="node-enter">
                                    <script>
                                              <expression>
                                                        viewId = /evenement.seam; objId = Id; objNameId =
                                                        evenementId;
                                              </expression>
                                              <variable name='viewId' access='write' mapped-name='viewId' />
                                              <variable name='objId' access='write' mapped-name='objId' />
                                              <variable name='objNameId' access='write' mapped-name='objNameId' />
                                    </script>
                          </event>


                          <task name="Instruire un dossier" duedate="2 business days"
                                    description="Evenement #{gestionEvenementCommun.value}">
                                    <assignment
                                              pooled-actors="#{ (not empty evenementHome and not empty evenementHome.instance and not empty evenementHome.instance.instructeur) ? evenementHome.instance.instructeur.username : cIHome.instance.evenement.instructeur.username }" />
                          </task>
                          <transition to="valider" name="valider">
                                    <action
                                              expression="#{evenementHome.changeEtat(etatEvenement.etatEvenementValidationInstruction)}" />
                                    <cancel-timer name="rappelInstruction" />
                          </transition>
                          <transition to="completer" name="completer">
                                    <action
                                              expression="#{evenementHome.changeEtat(etatEvenement.etatEvenementAttente)}" />
                                    <cancel-timer name="rappelInstruction" />
                          </transition>
                </task-node>


                <task-node name="valider">
                          <event type="node-enter">
                                    <script>
                                              <expression>
                                                        viewId = /evenement.seam; objId = Id; objNameId =
                                                        evenementId;
                                              </expression>
                                              <variable name='viewId' access='write' mapped-name='viewId' />
                                              <variable name='objId' access='write' mapped-name='objId' />
                                              <variable name='objNameId' access='write' mapped-name='objNameId' />
                                    </script>
                          </event>
                          <task name="Valider un dossier" duedate="1 business day"
                                    description="Evenement #{gestionEvenementCommun.value}">
                                    <assignment pooled-actors="#{evenementHome.instance.autorite.username}" />
                          </task>
                          <transition to="diffuser" name="diffuser">
                                    <action
                                              expression="#{evenementHome.changeEtat(etatEvenement.etatEvenementDiffusionAuxServices)}" />
                          </transition>
                          <transition to="instruire" name="instruire">
                                    <action
                                              expression="#{evenementHome.changeEtat(etatEvenement.etatEvenementEnCoursDInstruction)}" />
                          </transition>
                </task-node>


                <task-node name="completer">
                          <event type="node-enter">
                                    <script>
                                              <expression>
                                                        viewId =/ajoutCI.seam; objNameId =cIId;
                                              </expression>
                                              <variable name='viewId' access='write' mapped-name='viewId' />
                                              <variable name='objNameId' access='write' mapped-name='objNameId' />
                                    </script>
                          </event>
                          <task name="Completer un dossier" duedate="15 business days"
                                    description="Evenement #{gestionEvenementCommun.value}">
                                    <assignment pooled-actors="#{identity.username}" />
                          </task>
                          <transition to="instruire" name="instruire">
                                    <action
                                              expression="#{cIHome.instance.evenement.setEtat(etatEvenement.etatEvenementEnCoursDInstruction)}" />
                          </transition>
                </task-node>




                <task-node name="diffuser">
                          <event type="node-enter">
                                    <create-timer duedate="15 business days" transition="compiler" />
                          </event>
                          <task name="Diffusion du dossier" />
                          <transition to="compiler" name="compiler">
                                    <action
                                              expression="#{avisHome.changeEtat(etatEvenement.etatEvenementAttentePresentation)}" />
                          </transition>
                </task-node>


                <task-node name="compiler">
                          <event type="node-enter">
                                    <script>
                                              <expression>
                                                        viewId =/compilerPrescriptions.seam; objNameId
                                                        =evenementId; objId = Id;
                                              </expression>
                                              <variable name='viewId' access='write' mapped-name='viewId' />
                                              <variable name='objNameId' access='write' mapped-name='objNameId' />
                                              <variable name='objId' access='write' mapped-name='objId' />
                                    </script>
                          </event>
                          <task name="Compiler les prescriptions" duedate="1 business days"
                                    description="Evenement #{gestionEvenementCommun.value}">
                                    <assignment pooled-actors="#{identity.username}" />
                          </task>
                          <transition to="presenter" name="presenter">
                                    <action
                                              expression="#{compilationHome.changeEtat(etatEvenement.etatEvenementValidationCabinetMaire)}" />
                          </transition>
                </task-node>


                <task-node name="presenter">
                          <event type="node-enter">
                                    <script>
                                              <expression>
                                                        viewId =/saisirDecisionCab.seam; objNameId
                                                        =evenementId;
                                                        objId = Id;
                                              </expression>
                                              <variable name='viewId' access='write' mapped-name='viewId' />
                                              <variable name='objNameId' access='write' mapped-name='objNameId' />
                                              <variable name='objId' access='write' mapped-name='objId' />
                                    </script>
                          </event>
                          <task name="Saisir une decision du cabinet" duedate="5 business days"
                                    description="Evenement #{gestionEvenementCommun.value}">
                                    <assignment pooled-actors="#{identity.username}" />
                          </task>
                          <transition to="Ok" name="Ok">
                                    <action
                                              expression="#{saisirDecisionCabHome.instance.setEtat(etatEvenement.etatEvenementAvisFavorable)}" />
                          </transition>
                          <transition to="NOk" name="NOk">
                                    <action
                                              expression="#{saisirDecisionCabHome.instance.setEtat(etatEvenement.etatEvenementAvisDefavorable)}" />
                          </transition>
                </task-node>


                <task-node name="Ok">
                          <transition to="termine" />
                          <transition to="presenter"></transition>
                </task-node>


                <task-node name="NOk">
                          <transition to="termine" />
                          <transition to="presenter"></transition>
                </task-node>


                <end-state name="termine" />


                <event type="process-start">
                          <action expression="#{evenementHome.processStart}" />
                          <!-- <action expression="#{evenementHome.processStart}" /> <script name="affecterVars">
                                    <expression> evt = executionContext.getVariable("Evenement"); id = executionContext.getVariable("Id");
                                    ins = executionContext.getVariable("Instructeur"); dat = executionContext.getVariable("DateFin");
                                    </expression> <variable name='Evenement' access='write' mapped-name='evt'
                                    /> <variable name='Instructeur' access='write' mapped-name='ins' /> <variable
                                    name='Id' access='write' mapped-name='id' /> <variable name='DateFin' access='write'
                                    mapped-name='dat' /> </script> -->


                </event>

      </process-definition>


      @Name("etatEvenement")
      @Scope(ScopeType.STATELESS)
      public class EtatEvenement implements Serializable {
         
          public static final Integer etatEvenementInitialise = 0;
          public static final Integer etatEvenementHorsPerimetre = 1;
          public static final Integer etatEvenementHorsDelai = 2;
          public static final Integer etatEvenementEnCoursDInstruction = 3;
          public static final Integer etatEvenementDiffusionAuxServices = 4;
          public static final Integer etatEvenementValidationCabinetMaire = 5;
          public static final Integer etatEvenementAvisFavorable = 6;
          public static final Integer etatEvenementAvisDefavorable = 7;
          public static final Integer etatEvenementAvisReserve = 8;
          public static final Integer etatEvenementAnnule = 9;
          public static final Integer etatEvenementRefuse = 10;
          public static final Integer etatEvenementTermine = 11;
          public static final Integer etatEvenementAttente = 12;
          public static final Integer etatEvenementValidationInstruction = 13;
          public static final Integer etatEvenementAttentePresentation = 14;
         
          public EtatEvenement(){
              super();
          }


          /**
           * @return the etatEvenementInitialise
           */
          public Integer getEtatEvenementInitialise() {
              return etatEvenementInitialise;
          }


          /**
           * @return the etatEvenementHorsPerimetre
           */
          public Integer getEtatEvenementHorsPerimetre() {
              return etatEvenementHorsPerimetre;
          }


          /**
           * @return the etatEvenementHorsDelai
           */
          public Integer getEtatEvenementHorsDelai() {
              return etatEvenementHorsDelai;
          }


          /**
           * @return the etatEvenementEnCoursDInstruction
           */
          public  Integer getEtatEvenementEnCoursDInstruction() {
              return etatEvenementEnCoursDInstruction;
          }


          /**
           * @return the etatEvenementDiffusionAuxServices
           */
          public Integer getEtatEvenementDiffusionAuxServices() {
              return etatEvenementDiffusionAuxServices;
          }


          /**
           * @return the etatEvenementValidationCabinetMaire
           */
          public Integer getEtatEvenementValidationCabinetMaire() {
              return etatEvenementValidationCabinetMaire;
          }


          /**
           * @return the etatEvenementAvisFavorable
           */              
          public Integer getEtatEvenementAvisFavorable() {
              return etatEvenementAvisFavorable;
          }


          /**
           * @return the etatEvenementAvisDefavorable
           */
          public Integer getEtatEvenementAvisDefavorable() {
              return etatEvenementAvisDefavorable;
          }


          /**
           * @return the etatEvenementAvisReserve
           */
          public Integer getEtatEvenementAvisReserve() {
              return etatEvenementAvisReserve;
          }


          /**
           * @return the etatEvenementAnnule
           */
          public Integer getEtatEvenementAnnule() {
              return etatEvenementAnnule;
          }


          /**
           * @return the etatEvenementRefuse
           */
          public Integer getEtatEvenementRefuse() {
              return etatEvenementRefuse;
          }


          /**
           * @return the etatEvenementTermine
           */
          public Integer getEtatEvenementTermine() {
              return etatEvenementTermine;
          }
         
          /**
           * @return the etatEvenementAttente
           */
          public Integer getEtatEvenementAttente() {
              return etatEvenementAttente;
          }
         
          /**
           * @return the etatEvenementValidationInstruction
           */
          public Integer getEtatEvenementValidationInstruction() {
              return etatEvenementValidationInstruction;
          }


          public Integer getEtatEvenementAttentePresentation() {
              return etatEvenementAttentePresentation;
          }
      }