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

Danielle Pace danielle.pace at kitware.com
Fri Jun 3 19:40:04 UTC 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20110603/3f453b3d/attachment.htm>


More information about the Ctk-developers mailing list