[jboss-user] [JBoss jBPM] - Re: setting and accessing process variables in jpdl

shea.phillips do-not-reply at jboss.com
Wed Mar 28 14:54:42 EDT 2007


I now have my process working pretty well.  I am invoking my seam components in bsh inside a script element with variable elements.  This seems to work reasonbly well, although ultimately I would like to have less bsh.  I will be doing more investigation on how to enable this.

One problem I did encounter was accessing process instance variables in decision expressions like:


  | <decision name="someDecision" expression="#{ (someVar == null) ? 'Skip' : 'doIt' }">
  |     <transition name="Skip" to="doNothing"/>
  |     <transition name="doIt" to="doStuff"/>
  | </decision>
  | 

where someVar is a process instance variable with a non-null value.  In the above case, the 'Skip' transition would always be taken although the 'doIt' transition should have been.

If, however, I put an equivalent expression inside a 'condition' element on a specific transition, things  worked (the variable was accessible).   For example:


  |     <decision name="someDecision">
  |         <transition to="doStuff" name="doIt">
  |             <condition expression='#{ not empty someVar }'/>            
  |         </transition>
  |         <transition to="doNothing" name="skip"/>
  |     </decision>
  | 

I'm not positive my problem with decision expressions was not an oversight of some subtle detail on my part (maybe in the EL notation or something), but this may be useful information for someone else.


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

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



More information about the jboss-user mailing list