5 Replies Latest reply on Nov 25, 2005 2:30 AM by kukeltje

    Severe error while parsing task duration.

    saviola

      Hi, everybody!
      The case is as follows: I have a process defintiion which has a task node, which has a task with duration

      3 business hours and 15 minutes
      :
      <task name="Assign Account" blocking="true" priority="high" duedate="3 business hours and 15 minutes">
      . What I mentioned when the duration of the task has been parsed in the constructor of Duration class a null pointer exception is thrown on the line:
      this.milliseconds = (long) (amount * unit.longValue());

      This is so because unit is long and unit is long bacause a search is made in the map units for key
      hours and 15 minutes
      . A value with this key is obviously not avaulable in the map.
      According to the xsd schema the syntax is correct. So I suppose this should be a bug report.
      One more thing is that there is an inconsistency between the documentation and the xsd schema. The documentation says that the quantity part of the duration string must be parseable with Double.parse(quantity) but according to the schema the quantity must be integer.

      Regards,
      Saviola