[Ctk-developers] Another ctkWorkflow thingie: goToStep(..) goes always back to starting step

Daniel Haehn haehn at bwh.harvard.edu
Fri Jun 3 19:56:46 UTC 2011


Hi Danielle,

the property sounds like a great idea!

Thanks,
Daniel

On Fri, Jun 3, 2011 at 3:52 PM, Danielle Pace <danielle.pace at kitware.com> wrote:
> Hi Daniel,
> CanGoToStep checks to see if a path exists between two steps - so it is not
> helpful in your case.
> Right now, there is no method to go to a specific step without transitioning
> back.  We could add a property that dictates whether to go back to the
> starting step after successfully getting to a 'finish' step...
> Thanks,
>
> Danielle
>
>
>
>
> On Fri, Jun 3, 2011 at 3:45 PM, Daniel Haehn <haehn at bwh.harvard.edu> wrote:
>>
>> Hi Danielle,
>>
>> hm this does not make totally sense to me. What about the canGoToStep
>> method - this only checks for next step?
>>
>> Wouldn't it make more sense to have the behavior I observed and you
>> described for the canGoToStep call and do not go back when you call
>> goToStep?
>>
>> Or is there another method I could use to go from step 1 to step 4, f.e.?
>>
>> Thanks
>> Daniel
>>
>> On Fri, Jun 3, 2011 at 3:40 PM, Danielle Pace <danielle.pace at kitware.com>
>> wrote:
>> > Hi Daniel,
>> > This is the intended behavior when using 'goToStep'.
>> > The idea is that, partway through the workflow, you could execute the
>> > steps
>> > until a 'finish step' was reached - using the default parameters for
>> > those
>> > steps.  Then you can evaluate the results that occur with default
>> > parameters.  If you get to the 'finish' step successfully, it puts you
>> > back
>> > where you started - so that you can continue to step through and alter
>> > parameters if you like.
>> > If you do not get to the 'finish' step successfully (i.e. default
>> > parameters
>> > produce errors on your data or because of the parameters you set in
>> > prior
>> > steps), it will stop at the error.
>> > Hope that helps,
>> >
>> > Danielle
>> >
>> >
>> >
>> >
>> > On Fri, Jun 3, 2011 at 3:34 PM, Daniel Haehn <haehn at bwh.harvard.edu>
>> > wrote:
>> >>
>> >> Hi guys,
>> >>
>> >> if I use ctkWorkflow.goToStep(x), the workflow goes to the step x
>> >> along the workflow (according to onEntry, validate and onExit calls).
>> >>
>> >> But then, after reaching step x, it goes directly back to where I am
>> >> coming from - again along the workflow. This goes so fast so it seems
>> >> there is no movement at all.
>> >>
>> >> I digged a little and it seems line 1035 in ctkWorkflow.cpp is not
>> >> right? After reaching the 'finish step' (which in my understanding is
>> >> the target step), it goes back to the starting step.
>> >>
>> >>
>> >> 1019 //
>> >>
>> >> --------------------------------------------------------------------------
>> >> 1020 void ctkWorkflow::goToStepSucceeded()
>> >> 1021 {
>> >> 1022   Q_D(ctkWorkflow);
>> >> 1023
>> >> 1024   logger.debug("goToStepSucceeded");
>> >> 1025
>> >> 1026   // after success, go back to the step at which we begin looking
>> >> for
>> >> 1027   // the finish step (will exit the current step and enter the
>> >> starting step)
>> >> 1028
>> >> 1029   d->createTransitionToPreviousStartingStep(d->StartingStep,
>> >> d->CurrentStep);
>> >> 1030
>> >> 1031   d->GoToStep = 0;
>> >> 1032   d->StartingStep->setStatusText("Attempt to go to the finish
>> >> step succeeded");
>> >> 1033   d->StartingStep = 0;
>> >> 1034
>> >> 1035   this->goFromGoToStepToStartingStep();
>> >> 1036 }
>> >> 1037
>> >>
>> >> Is this correct behavior and I understand the goToStep(x) call wrong
>> >> or is this a bug?
>> >>
>> >> Cheers,
>> >> Daniel
>> >> _______________________________________________
>> >> Ctk-developers mailing list
>> >> Ctk-developers at commontk.org
>> >> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>> >
>> >
>> >
>> > --
>> > Danielle Pace, M.ESc.
>> > Research and Development Engineer
>> > Kitware Inc.,
>> > North Carolina Office
>> > www.kitware.com
>> > 919-969-6990 X 319
>> >
>
>
>
> --
> Danielle Pace, M.ESc.
> Research and Development Engineer
> Kitware Inc.,
> North Carolina Office
> www.kitware.com
> 919-969-6990 X 319
>



More information about the Ctk-developers mailing list