3 Replies Latest reply on Jul 25, 2011 11:03 AM by krisverlaenen

    jbpm5.x bpmn timer datetime format

    sasir

      In bpmn file, am able to use timers by defining period and delay(<timeCycle xsi:type="tFormalExpression">1d###1d</timeCycle>). However I want to decide the resurring period progrmatically outside depending on calendars and want to pass it to the workflow

       

      jBPM3.x accepts datetime variable for determining deadline but i couldnt find any corresponding doc in 5.x reg that

       

      Does jBPM5.x supports datetime varibales for defining deadline. Can you please point me to the right example?

        • 1. Re: jbpm5.x bpmn timer datetime format
          krisverlaenen

          In the example you mentioned, a hardcoded value of 1 day is used but you can also inject a variable here, the same way you can do for service task parameters for example.

           

          So you should be able to also specify something like #{x}ms (where x is a process variable containing the amount of ms, e.g. 10), or #{y} (where y is a process variable containing the entire expression, e.g. 10h).

           

          Kris

          • 2. Re: jbpm5.x bpmn timer datetime format
            sasir

            Kris, Thanks for replying    

             

            I want to be able to inject procee variables(values are derived using specific business logic) in standard data time format rather than letting the bpm engine derive expiry time

             

            For example i want the task deadline to be reached at a particular input time so that timer should also expire at that time (dd-MMM-yyyy HH:mm:ss). To put it simply, its more like passing value rather than expression

            • 3. Re: jbpm5.x bpmn timer datetime format
              krisverlaenen

              Ok, got it.  BPMN2 defines 3 types of timer expressions: timeDuration (trigger after a certain amount of time), timeCycle (trigger repeatedly) and timeDate (trigger on a specific date and time).  It seems you're looking for the last one.  Unfortunately, only the first two options are currently supported in jBPM5.

               

              I'll look at adding support for this: https://issues.jboss.org/browse/JBPM-3298

               

              As a workaround for now, I think it should be possible to use timeDuration as described earlier, but then add some action script before that that would translate the generated date and time variable back into a duration variable.

               

              Kris