[jboss-user] [JBoss jBPM] - Re: Timers in jBPL

koen.aers@jboss.com do-not-reply at jboss.com
Sat Nov 8 08:48:33 EST 2008


There is nothing wrong with the documentation except for maybe it being a little bit (too?) concise:

1. If you specify a timer on a node it gets translated to a create-timer and a cancel-timer action. The create-timer action is associated with the node-enter event and the cancel-timer action is associated with the node-leave event. The timer will thus be created and start running when you enter the node, like you would expect. Similarly, the timer will be automatically canceled when you leave the node. So if you leave the node when the timer fires (such as in the example above), the timer will be canceled as expected. There is no cancel-event attribute for timers on nodes. The parser does not parse it and if you add it, it will be ignored.

2. If you specify a timer on a task, it will again be translated to a create-timer action and a cancel-timer action. In this case the create-timer action will be associated with the task-create event. So the timer will be created and start running when the task is created. As for the cancel-timer there is a difference with nodes. You can specify one or more event types with which the cancel-timer can be associated with the cancel-event attribute. The cancel-timer attribute is a comma separated list of event types. It can amongst others include task-create, task-end, task-cancel, task-start, etc. The cancel-timer action gets associated with each of the comma separated values that is specified in the list. So if I would have "task-start, task-end" as the value of the attribute, the cancel-timer action would be executed when the task is started as well as when the task is ended. If no value is specified for the cancel-event, the default is to associate the cancel-timer action with the task-end event.

I hope this clarifies he confusion.

Cheers,
Koen

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

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




More information about the jboss-user mailing list