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