5 Replies Latest reply on Jul 31, 2006 6:41 AM by kukeltje

    Timer

    viegas

      I want to create a workflow where a date is inserted in the start state and then a timer is started to go on in the inserted date minus 4 weeks, is that possible? if so how?

      Thanks

        • 1. Re: Timer
          cpob

          Should be rather simple.

          You can see how to programmatically create a timer if you look at the CreateTimerAction source code. They build a Timer object.

          I would created an action handler on the node-exit of the start state which would take the entered date, and then do simple java date math

          Date newDate = new Date( enteredDate.getTime() - 2419200000 )


          Where 2419200000 is 4 weeks (in milliseconds).

          Or
          Date newDate = new Date( enteredDate.getTime() - (4 * 7 * 24 * 60 * 60 * 1000) )

          For the 4 weeks, 7 days in a week, 24 hours in day, so on and so on.

          • 2. Re: Timer
            viegas

            where can I find the createTimerAction????

            Thanks a lot for the tip

            • 3. Re: Timer
              viegas

              Ok Ive found it.

              • 4. Re: Timer
                viegas

                I have another question, Where can I find the sintax for the due date, for the repeat and so on?

                • 5. Re: Timer
                  kukeltje

                  The same place I found it, the documentation.