[jboss-user] [JBoss jBPM] - #{taskInstance} is null on Notify='yes'

james_hays do-not-reply at jboss.com
Fri May 25 14:00:30 EDT 2007

I've run into an issue using jBPM 3.2 and above.  I was running jBPM with 3.2GA with all the various fixes to getting the new mail component working, but was still running into issues.  I'm now running the latest CVS version as of  5/25/2007 which still gives me the issue.

When I have notify='yes' set on a particular task, I don't seem to have access to the #{taskInstance variable in the mail template.  

Here's my jpdl section.

  |     <task-node name="Gate Approval">
  |         <task name="Approval" notify="yes">
  |            <assignment actor-id="#{gateApprovalRequest.approver.emplId}"/>
  |         </task>
  |         <transition name="complete" to="Complete"/>
  |         <transition name="arbitrate" to="Arbitrate" />
  |     </task-node>
If I take the notify off, all is process as expected.  With the notify set to yes, I've traced down the code into jbpm's org.jbpm.mail.Mail

  |   String evaluate(String expression) {
  |     if (expression==null) {
  |       return null;
  |     }
  |     VariableResolver variableResolver = JbpmExpressionEvaluator.getUsedVariableResolver();
  |     if (variableResolver!=null) {
  |       variableResolver = new MailVariableResolver(templateVariables, variableResolver);
  |     }
  |     return (String) JbpmExpressionEvaluator.evaluate(expression, executionContext, variableResolver, null);
  |   }
where the return statement evaluates the expressions in my template.  This is where I've tracked that #{taskInstance is returning null.

Any thoughts on this?  This is the first assignment in the business process.



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

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

More information about the jboss-user mailing list