6 Replies Latest reply on Feb 23, 2009 7:16 AM by David Roberts

    Timer repetition functionality

    Ivan Sevastyanov Newbie

      Does attribute "repeat" of timer element accept "yes" "no" as value now?

      What is the differences between one and "10 seconds", for example?

      I did not find information about this in documentation.

        • 1. Re: Timer repetition functionality
          Andreas Schienagel Newbie

          On timers you can set a "duedate" which specifies the first time, the timer is executed, e.g. 1 minute -> timer is executed after one minute.

          If a "repeat"-attribut is set, the timer is created again after the time you set here, e.g "repeat=10 seconds" --> timer is executed every 10 seconds as long as the process execution is in this node. You can set the repeat value to "yes" as well.
          This means, that the repeat value is taken from the duedate attribute:
          "duedate=1 minute repeat=yes" means execution after 1 minute and repetitions in 1 minute cycles. AFAIK the value "no" is not possible. If you want no repeat don't set it.

          I hope that helps.

          • 2. FFF
            Ivan Sevastyanov Newbie

            Thank you very mach, syngolis!

            • 3. Re: Timer repetition functionality
              Ronald van Kuijk Master

              If 'no' does not work on a timer, that is a bug, can you confirm this behaviour and then file a jira issue for this

              • 4. Re: Timer repetition functionality
                Andreas Schienagel Newbie

                The question is, what surplus do you get with the option to set repeat to 'no'? If don't want to repeat i don't set it.

                It seems no to work (improper format of duration 'no' ):


                2007-06-29 15:05:00,609 ERROR [STDERR] ... 5 more
                2007-06-29 15:05:00,609 ERROR [STDERR] Caused by: javax.ejb.TransactionRolledbackLocalException: couldn't execute org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand@e415b8
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:262)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:954)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
                2007-06-29 15:05:00,609 ERROR [STDERR] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
                2007-06-29 15:05:00,609 ERROR [STDERR] at $Proxy59.execute(Unknown Source)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jbpm.scheduler.ejbtimer.TimerServiceBean.ejbTimeout(TimerServiceBean.java:95)
                2007-06-29 15:05:00,781 ERROR [STDERR] ... 19 more
                2007-06-29 15:05:00,781 ERROR [STDERR] Caused by: org.jbpm.JbpmException: couldn't execute org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand@e415b8
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
                2007-06-29 15:05:00,781 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
                2007-06-29 15:05:00,781 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                2007-06-29 15:05:00,781 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
                2007-06-29 15:05:00,781 ERROR [STDERR] ... 30 more
                2007-06-29 15:05:00,781 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: improper format of duration 'no'
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jbpm.calendar.Duration.<init>(Duration.java:151)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jbpm.job.Timer.execute(Timer.java:105)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand.execute(ExecuteTimerCommand.java:23)
                2007-06-29 15:05:00,781 ERROR [STDERR] at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
                2007-06-29 15:05:00,781 ERROR [STDERR] ... 39 more


                • 5. Re: Timer repetition functionality
                  Ronald van Kuijk Master

                  Leaving it out is an option, but imo if yes is an accepted value, no should be as well.

                  • 6. Re: Timer repetition functionality
                    David Roberts Apprentice

                    Also take note that if you use a repeat such as "24 hours" etc, it seems to be case sensitive. So "24 Hours" will give an exception saying that the duration is not in the correct format, but "24 hours" works fine.
                    At least that is the case with the Jbpm 3.2.6 SNAPSHOT.