2 Replies Latest reply on Feb 10, 2010 12:32 AM by Alejandro Guizar

    timer attribute names

    Alejandro Guizar Master
      I find the attributes of the timer element in jPDL 4 confusing and annoying. In jPDL 3 we already knew that "duedate" was not the most appropriate name for an attribute of type duration, why repeat the same mistake? I'd really like to phase out attribute "duedate" in favor of "delay", preserving backward compatibility, of course. I'd like to have the current "duedatetime" renamed to "duedate" but preserving compatibility would be harder.
        • 1. Re: timer attribute names
          Ronald van Kuijk Master

          Hmmm delay is also not quite right. Since with EL you can have fixed dates. Since the 'delay' in (business) time always results in a (due) date. So I'm kind of ambivalent.

           

          The difference between duedate and duedatetime is more confusing.

          • 2. Re: timer attribute names
            Alejandro Guizar Master

            Hmmm delay is also not quite right. Since with EL you can have fixed dates. Since the 'delay' in (business) time always results in a (due) date. So I'm kind of ambivalent.

            Right. Maybe the problem is mixing date and duration in the same attribute. I looked at java.util.Timer and I'd like to have the same kind of clean, concise parameters.

             

            What if:

            • duedate was a string literal or EL expression that returned either Date or String. If the result is a String, parse a Date based on the configured date-time format.
            • delay was a duration literal, calculated from the Date obtained from the duedate attribute or the current time if duedate is absent.
            • duedatetime was phased out instead, since duedate would now permit string literals.