-
1. Re: Repeat timer only once
swiderski.maciej Mar 14, 2010 8:05 AM (in response to preetigupta)Hi,
if you use duedate only that should do what you expect. In your case if timer will have only duedate="10 seconds" then execution will happen in 10 seconds and timer will be canceled/closed.
Cheers,
Maciej
-
2. Re: Repeat timer only once
preetigupta Mar 14, 2010 12:05 PM (in response to swiderski.maciej)Hi Maciej
Thanks for the reply. I understand this. But I have to repeat timer once after due date. In total timer has to run two times. One at due date, then after the repeat interval and then it should be expired. Hope you help me in this scenario.
Thanks and Regards
Preeti Gupta
-
3. Re: Repeat timer only once
swiderski.maciej Mar 14, 2010 3:46 PM (in response to preetigupta)1 of 1 people found this helpfulYou could try to create two timers instead of one that has repeat attribute.
I tested following configuration on a wait state:
<on event="timeout"> <timer duedate="10 minutes"/> <event-listener class="EventListenerClass" /> </on> <on event="timeout"> <timer duedate="20 minutes"/> <event-listener class="EventListenerClass" /> </on>
please note that I tested it on 4.3 version so I can't say if that will work properly for version 3.
As soon as transition is taken to move forward all timers will be canceled/closed.
HTH
Maciej
-
4. Re: Repeat timer only once
preetigupta Mar 15, 2010 12:53 AM (in response to swiderski.maciej)Hi Maciej
Thanks for the reply and analysis.
I already need to implement more than one timer, so the way you suggested, I would in total have three timers on that state. I will try and hope that should work.
Beside this, I need to send reminder mail to user. But its like reminder1 and reminder2 should follow templateA. But after that reminder mail should follow templateB. Is it possible to change template through code? Or to specify two reminder actions on one task.
Thanks and Regards
Preeti Gupta
-
5. Re: Repeat timer only once
swiderski.maciej Mar 15, 2010 4:48 AM (in response to preetigupta)1 of 1 people found this helpfulUnfortunately you cannot add more than one reminder. I mean you can add it but only first one will be created.
What I could suggest you here to do is to try to use parameters with the template and modify these parameters. So lets consider following template:
<mail-template name="my-dynamic-template"> <to addresses="${addressee}" /> <subject>${subject}</subject> <text>${title} ${header} ${body} ${footer}</text> </mail-template>
And then when executing reminder will rely on process variables to fill in the template. Perhaps you could setup event listener that will be notified as soon as reminder goes off and if you reach number of reminders sent with default values then you could update them and new values will be set when sending next time.
Did not try it my self but I think it is worth spending some time to check if that will work.
Cheers
Maciej
-
6. Re: Repeat timer only once
preetigupta Mar 15, 2010 5:37 AM (in response to swiderski.maciej)Thanks. I will try this way.
Regards
Preeti Gupta