2 Replies Latest reply on Feb 11, 2010 3:26 AM by Atul Joshi

    Can I call one more event -listener class in the State node ?

    Atul Joshi Newbie

      I am using timer for the waitevent in process design,  In the Following state node can I use one more event-listener class, which will be called when workflow comes up to the wait event ?

       

       

       

      <state g="151,177,99,56" name="guardedWait">

      <event-listener class="com.implementation.helper.Escalate1"/>

       

      <on event="timeout">

       

      <timer duedate="1 business days" repeat="2 business days"/>

       

      <event-listener class="com.implementation.helper.Escalate2"/>

       

      </on>

       

      <transition g="8,-10" name="go on" to="next step"/>

       

      </state>

        • 2. Re: Can I call one more event -listener class in the State node ?
          Atul Joshi Newbie

          Yes I have tried the same but given a design time error, I got the solution form developer guide. which is given below example,  thanks

          <state name="wait">
              <on event="start">
                     <event-listener class="org.jbpm.examples.eventlistener.LogListener"><field name="msg"><string value="start on activity wait"/></field>
                  </event-listener>   
              </on>   
              <on event="end">  
                     <event-listener class="org.jbpm.examples.eventlistener.LogListener">    
                     <field name="msg"><string value="end on activity wait"/></field>   
                 </event-listener>   
             </on>
             <transition to="park">   
             <event-listener class="org.jbpm.examples.eventlistener.LogListener">  
                    <field name="msg"><string value="take transition"/></field>
                   </event-listener>   
            </transition> 
          </state>

          but you can not have

          <state name="wait">   
              <on event="start"> 
              <event-listener class="org.jbpm.examples.eventlistener.LogListener"/>   
             <event-listener class="org.jbpm.examples.eventlistener.LogListener"/>
              </on>
              <transition to="park"/>
          </state>