7 Replies Latest reply on Jun 17, 2010 4:00 AM by rebody

    How to set timeout runtime

    yogitabartake

      Is there any way to set a timeout period for an activity after the activity starts ? The timeout period will be dynamic in my case and I will be fetching it in the class that I call on that activity.So I need to set the timeout period after I fetch it.

      Please guide me with some way to achieve the same...

       

      Thanks for any reply in advance

        • 1. Re: How to set timeout runtime
          rebody

          Hi Yogita,

           

          you could use expression in the duedate attribute.  So you could set a process variable and read it using expression.  Like this:

           

          <timer duedate='#{proc_var}' />

          • 2. Re: How to set timeout runtime
            yogitabartake

            Thanks a lot HuiSheng

             

            But is it possible to set the timer for a java or a decision activity?

            • 3. Re: How to set timeout runtime
              rebody

              Hi Yogita,

               

              Did you means that you want to create dynamic timer in the runtime?

               

              Is it necessary?

              • 4. Re: How to set timeout runtime
                yogitabartake

                Well not exactly. I just want to set the timeout period runtime for a java and a decision activity.

                • 5. Re: How to set timeout runtime
                  rebody

                  Hi Yogita,

                   

                  You can set a variable before timer create.  And let timer use this process variable for its duedate attribute value.  We cannot modify timer though java or decision activity directly.

                   

                  If you really want to do that, you could use hibernate to access database directly, once you get the timerImpl,  you could do whatever you want to do.  But please notice that is not recommended.

                  • 6. Re: How to set timeout runtime
                    yogitabartake

                    What I meant to ask is can I have a timer transition or a timeout event on a java or decision activity in the following manner...

                     

                     

                    <java name="someActivity" >
                        <on event="timeout">
                          <timer duedate="10 minutes"/>
                          <event-listener />
                        </on>

                        <transition name="go on" to="next step" />
                      </java>

                     

                    OR

                     

                     

                    <java name="someActivity" >
                        <transition name="go on" to="next step" />
                        <transition name="timeout" to="escalation" >
                          <timer duedate="9 minutes" />
                        </transition>
                      </java>

                    Coz I have heard it can be used only for wait type of activities.Is that true?

                    • 7. Re: How to set timeout runtime
                      rebody

                      Hi Yogita,

                       

                      Yes, we cannot define a timer on an automatic actvity.  Because the automatic activity will execute and go to the next step immediately,  Even if you put a timer on it, the timer won't worked.