[jboss-user] [JBoss jBPM] - jbpm decision node EL and Bean

ashishc do-not-reply at jboss.com
Mon Jul 21 11:32:01 EDT 2008


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165680#4165680

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165680



More information about the jboss-user mailing list