2 Replies Latest reply on May 18, 2009 10:26 AM by osvaldo.pina

    Setting the start date

    caron1

      Hi,

      We are busy implementing jbpm.

      In order to migrate historic data, I have written code to create the tasks, start the task and then end the task. This is working well except I now want to set the start date and end date on the taskInstance to my own dates.

      However, if I look at the code in org.jbpm.taskmgmt.exe.TaskInstance setStart sets the date to null.

       public void setStart(Date date) {
       start = null;
       }
      


      I am using version 3.2.3.

      Does anyone know how I can set the start date?

      Thanks in advance.
      Caron

        • 1. Re: Setting the start date
          kukeltje

          Hmm.... that is strange... setting it to null when you pass a parameter.

          If it is for ma migrationscript, you could use an SQL query or temporarily make a patch that does accept the date and sets it.

          • 2. Re: Setting the start date

            One of our team members found a solution for this problem:

            taskInstance.getStart().setTime(c.getTimeInMillis());

            It breaks encapsulation but it's the best solution we were able to find!