13 Replies Latest reply on Jul 6, 2007 11:08 AM by James Hays

    #{taskInstance} is null on Notify='yes'

    James Hays Novice

      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.

      Thanks,

      James