0 Replies Latest reply on Jul 21, 2008 11:31 AM by chawlaashish26

    jbpm decision node EL and Bean

      Hi All,
      I want to refer to a value from a bean in a jbpm decision node, but not able to get that using EL. I can write the decision handler and do it that way, but i would prefer using the EL. Can anyone help me in that?

      Here is what i am doing.

      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="http-demo-process">
       <swimlane name="initiator">
       <assignment actor-id="manager" />
       </swimlane>
       <start-state name="start">
       <transition to="call action"></transition>
       </start-state>
       <node name="call action">
       <action class="com.sample.action.MessageActionHandler">
       <message>First message</message>
       </action>
       <transition to="hasMessage?"></transition>
       </node>
      
       <decision name="hasMessage?" expression="#{( ??????? ? 'true' : 'false')}">
       <transition name="true" to="post data"></transition>
       <transition name="false" to="end"></transition>
       </decision>
       <node name="post data">
       <action class="com.sample.action.PostActionHandler">
       </action>
       <transition to="end"></transition>
       </node>
       <end-state name="end"></end-state>
      </process-definition>


      and here is the bean which i created.

      package com.sample.bean;

      import java.io.Serializable;
      public class MyVariableBean implements Serializable{

      private static final long serialVersionUID = 1L;
      private Boolean myValue = true;

      public MyVariableBean() {}
      public Boolean getMyValue()
      {
      return myValue;
      }

      public void setMyValue(Boolean paramVal)
      {
      myValue = paramVal;
      }
      }

      The value of MyValue is set in Message Action Handler...but then how should I refer to the MyValue in decision node EL??

      Please help..

      thanks
      ashish