1 Reply Latest reply on Mar 11, 2010 3:20 PM by kukeltje

    jbpm 4.3 timer expression




      I wanted to configure timer duedate and repeat attributes from instance variables, but I couldn't get direct access to them. After some time with debugger I've found that Juel evaluator of timers doesn't have access to execution context, but to job context only. Instead of #{escalate} I had to use

      #{job.execution.variables['escalate']} .


      here is xml snippet:


      <task g="203,152,92,52" name="initiation" assignee="#{initiator}">
              <on event="start">
                    <event-listener class="com.pradny.task.EventHandler">
                     <field name="type"><string value="task-start1"/></field>             
                    <event-listener class="com.pradny.task.EventHandler">
                     <field name="type"><object expr="#{escalate}"/></field>             
              <on event="timeout">
                    <timer duedate="10 seconds" repeat="#{job.execution.variables['escalate']}"/>
                <event-listener class="com.pradny.task.EventHandler">
                     <field name="type"><string value="task-overdue"/></field>             
              <transition to="approval" />



      Could anyone confirm that this approach is correct? Is there any reason that wouldn't allow standard access to instance variables?