[jboss-user] [jBPM] New message: "jbpm 4.3 timer expression"
Martin Pradny
do-not-reply at jboss.com
Thu Mar 11 09:10:29 EST 2010
User development,
A new message was posted in the thread "jbpm 4.3 timer expression":
http://community.jboss.org/message/531391#531391
Author : Martin Pradny
Profile : http://community.jboss.org/people/mpradny
Message:
--------------------------------------------------------------
Hello,
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>
<event-listener class="com.pradny.task.EventHandler">
<field name="type"><object expr="#{escalate}"/></field>
</event-listener>
</on>
<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>
</event-listener>
</on>
<transition to="approval" />
</task>
Could anyone confirm that this approach is correct? Is there any reason that wouldn't allow standard access to instance variables?
Thanks,
Martin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/531391#531391
More information about the jboss-user
mailing list