Topic
  • 6 replies
  • Latest Post - ‏2013-03-17T21:19:52Z by SystemAdmin
SystemAdmin
SystemAdmin
7615 Posts

Pinned topic Change the Timing period in Attached Timer when I start Task its connected

‏2013-01-15T11:19:52Z |
Hi,
I have a human service task and I attached Timer event to it, and assign its timing period through a variable , could I reset the value of the variable that in the timer event when I start the human service task and the variable take the new value?
Updated on 2013-03-17T21:19:52Z at 2013-03-17T21:19:52Z by SystemAdmin
  • kolban
    kolban
    3322 Posts

    Re: Change the Timing period in Attached Timer when I start Task its connected

    ‏2013-01-15T17:08:10Z  
    If I am hearing you correctly you have a User Task activity at the BPD level that is implemented by a Human Service. You also have a timer attached to the BPD User Task Activity. The timer's interval is governed by a variable. When the Human Service runs, you want to update "the variable" used to control the timer's interval.

    Unfortunately, I don't believe that will work for two reasons:

    1. When a timer starts and its interval is taken from a variable, the value of the variable is used and then the timer is locked down to that value. Subsequently changing the value of the variable will not change the duration of the timer.

    2. When you invoke a Human Service from a BPD, a copy of the variable value is passed in. Changing the local copy in the Human Service will have no effect on the value of the variable in the BPD.

    Neil
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Change the Timing period in Attached Timer when I start Task its connected

    ‏2013-01-17T22:29:28Z  
    If you are able to get the timer id, I believe there is a JS API to reschedule the timer. It isn't in the documents but it does code complete at the BPD level. You would need to play around with this to see if it also works at the service level. I would make a quick and dirty test first, but my mental model would be to set a BPD variable to the timer ID on the pre of the timer and use that as an input argument to your service. Assuming the call works at the service level you could do it there. If it did not, then you could put an IME at the BPD level that would execute the js script and call the UCA from the service when it starts.

    The method is -

    
    tw.system.rescheduleTimer(timerId, TWDate);
    


    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Change the Timing period in Attached Timer when I start Task its connected

    ‏2013-01-19T18:43:18Z  
    If you are able to get the timer id, I believe there is a JS API to reschedule the timer. It isn't in the documents but it does code complete at the BPD level. You would need to play around with this to see if it also works at the service level. I would make a quick and dirty test first, but my mental model would be to set a BPD variable to the timer ID on the pre of the timer and use that as an input argument to your service. Assuming the call works at the service level you could do it there. If it did not, then you could put an IME at the BPD level that would execute the js script and call the UCA from the service when it starts.

    The method is -

    <pre class="jive-pre"> tw.system.rescheduleTimer(timerId, TWDate); </pre>

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
    Thank Andrew,
    This is actually what i did to solve my issue and its work correctly and support my goal.

    Thanks again
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Change the Timing period in Attached Timer when I start Task its connected

    ‏2013-03-09T17:27:00Z  
    Thank Andrew,
    This is actually what i did to solve my issue and its work correctly and support my goal.

    Thanks again
    Hi to all!
    I have been testin the solution in this post, but i have a question about that, i'm trying to generate many alerts from a timer attached to a task, so i use a tw.system.rescheduleTimer JS API, i need the task not finalize so i disabled the option from timer, but when i used the API it looks to work, there is not exception throw (i tested in a service level but rigth now i pur this at BPD Level) but there is no token for the timer after the reschedule.

    so, what i want is to use the seme timer for generate some alert about due time of the activity, for example i want to notify 30 minutes before the due time with an alert, 15 minutes with a email an 1 minute reassing the task back to group or other user.

    can you help me.
    Thanks.
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Change the Timing period in Attached Timer when I start Task its connected

    ‏2013-03-14T21:24:04Z  
    Hi to all!
    I have been testin the solution in this post, but i have a question about that, i'm trying to generate many alerts from a timer attached to a task, so i use a tw.system.rescheduleTimer JS API, i need the task not finalize so i disabled the option from timer, but when i used the API it looks to work, there is not exception throw (i tested in a service level but rigth now i pur this at BPD Level) but there is no token for the timer after the reschedule.

    so, what i want is to use the seme timer for generate some alert about due time of the activity, for example i want to notify 30 minutes before the due time with an alert, 15 minutes with a email an 1 minute reassing the task back to group or other user.

    can you help me.
    Thanks.
    Did you select "repeatable" on the timer event?

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Change the Timing period in Attached Timer when I start Task its connected

    ‏2013-03-17T21:19:52Z  
    Did you select "repeatable" on the timer event?

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
    Hi

    yes, but i was having problems with that, basically its important to select the moment to re-scheduling the timer if i do after a system task, we can found i different result, i make a post for this:

    http://ccuencat.wordpress.com/2013/03/13/programando-los-eventos-intermedios-de-temporizador-en-ibm-bpm/

    Thanks for your help.