5 Replies Latest reply on Feb 19, 2007 10:39 AM by camunda

    undoStart

    tom.baeyens

      Bernd,

      could you explain a bit more the undoStart method ?

      public void undoStart() {
       actorId = null;
       start = null;
       }
      


      especially i'm a bit concerned about the following aspects:

      * you set the actorId directly instead of using the setActorId(...,...) method which adds a log record and fires the assign event. is that on purpose ?

      * should the swimlane be updated as well ?

      * undo might be handled more generically by reversely playing the logs and generating compensating transactions for the updates that were logged. i didn't get to implementing this yet. but this might be something that competes with such an approach.

      which use case are you trying to cover with this method ?

      wouldn't just using the setters on actorId and start be a better approach as that wouldn't give our users the impression that this undo reverts back a lot of other things as well (e.g. variable updates that have been done between the start and the undoStart).




        • 1. Re: undoStart
          camunda

          Hi Tom,

          good points... The Use case is the following:

          If I open one task (for me in Swing, but is is the same in Webapps too) I call the task, so that no other user starts the task concurrently.

          If now a user just closes the Form (which can be handled easly in Swing, maybe in JSF too) I undo the start, so that the Task is again in the pool.

          So my intention was really only to have it back in the actor pool and set the start date to null.

          In our apps, we never change variables between start and end of a task. But If we would do so, and the users closes the Form, maybe a real Undo like you proposed is the better choice, yes.

          Is that Undo ready in jbpm 3.2? Then I can switch my Command to that logic and we remove the undoStart method again, no problem.

          Or we remove the method and introduce a setter for date, then I can move the logic to the Special command and explain the intetntion there...

          EWhat do you think?

          • 2. Re: undoStart
            tom.baeyens

             

            "camunda" wrote:

            Or we remove the method and introduce a setter for date, then I can move the logic to the Special command and explain the intetntion there...


            if you meant the a setStart(Date) then i think that would be the best solution.

            undo won't be implemented any time soon.

            • 3. Re: undoStart
              camunda

              Okay, I will remove the undoStart method and introduce a setStart(date). And I will link to this forum in the "CancelWorkOnTaskCommand" (not yet committed)

              • 4. Re: undoStart
                dmlloyd

                Also please stay consistent with source formatting - do not use tab characters in source files.

                • 5. Re: undoStart
                  camunda

                   

                  Also please stay consistent with source formatting


                  no problem. Normaly I leave it to the IDE and do not touch formatting. Do you have a complete Eclipse-Formatting style ready to use?