<div>Hi Mike and Kjetil,</div><div><br></div><div>Thanks for your remarks.</div><div><br></div><div>I&#39;m starting to get more used to the idea of existing workflows calling only the latest version of a sub-workflow. It seemed counter-intuitive at first but now I can&#39;t think of a better way SAP could&#39;ve handled it.</div>

<div><br></div><div>Definitely one to watch out for; when in doubt create a new sub-workflow template.</div><div><br></div><div>The addition of new parameters in the binding makes existing workflow instances go into error even if they aren&#39;t mandatory!</div>

<div><br></div><div>I can&#39;t say I&#39;ve ever used local workflows, I&#39;ll have to look into that.</div><div><br></div><div>regards</div><div>Rick Bakker</div><div>hanabi technology</div><br><div class="gmail_quote">

On Mon, Mar 19, 2012 at 7:56 PM, Kjetil Kilhavn <span dir="ltr">&lt;<a href="mailto:kjetil.kilhavn@bluec.no">kjetil.kilhavn@bluec.no</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

It&#39;s a bit late and will definitely not solve your current problem Rick, but<br>
perhaps a local workflow would be the solution to this. Our &#39;holy book&#39; states<br>
that the recommendation is to use local workflows for subworkflows if the<br>
&quot;subworkflow&quot; is not called by other workflows.<br>
I haven&#39;t actually tried it, but since a local workflow is not callable outside<br>
its main workflow and not stored as a separate template I am sure it would<br>
share the runtime version with main workflow.<br>
<br>
A proper subworkflow is an independent workflow template, so you would usually<br>
not want it to be tied to the version of the calling workflow. Such a binding<br>
would for instance mean that error corrections wouldn&#39;t become effective for<br>
running instances. It would probably also make the runtime engine more<br>
complicated with multiple runtime versions of a workflow active at the same<br>
time.<br>
<br>
I see your problem though, and I&#39;ve had a similar problem once where we had to<br>
introduce code in the business object to check whether a specific container<br>
element existed in the container in order to control the behaviour. It&#39;s not a<br>
good design, but at the time it was the only solution possible for us.<br>
<br>
I suppose changing the binding of a subworkflow must be considered as important<br>
as changing the binding of a published BAPI, and SAP&#39;s solution to that is to<br>
create a new BAPI function module. That&#39;s one solution, and the other is to<br>
ensure that the new version is able to handle the old binding as well, so you<br>
can&#39;t introduce a new mandatory element.<br>
<br>
Onsdag 14. mars <a href="tel:2012%2012.38.36" value="+12012123836">2012 12.38.36</a> skrev Mike Pokraka:<br>
<div class="HOEnZb"><div class="h5">&gt; Hi Rick,<br>
&gt;<br>
&gt; That&#39;s how it would work. A subwf is a completely new instance of a WF.<br>
&gt;<br>
&gt; There may be a way to call a WF with a specific version, perhaps someone<br>
&gt; else has hacked this. But for incompatible changes to a subWF it&#39;s usually<br>
&gt; far easier to make a copy and include that in your new version of the main<br>
&gt; WF. For reporting purposes it&#39;s usually not a biggie.<br>
&gt;<br>
&gt; Regards,<br>
&gt; Mike<br>
&gt;<br>
&gt; On Wed, March 14, 2012 12:42 am, Rick Bakker wrote:<br>
&gt; &gt; Hello,<br>
&gt; &gt;<br>
&gt; &gt; Could someone confirm/deny:<br>
&gt; &gt;<br>
&gt; &gt; 1. Workflow A calls sub-workflow B.<br>
&gt; &gt; 2. If you change sub-workflow B then existing instances of A will call<br>
&gt; &gt;<br>
&gt; &gt;    the new version of B.<br>
&gt; &gt;<br>
&gt; &gt; I didn&#39;t expect this and it can cause some big problems, e.g. if you<br>
&gt; &gt; change<br>
&gt; &gt; the binding between A and B then A can even go into error when it tries<br>
&gt; &gt; to call B.<br>
&gt; &gt;<br>
&gt; &gt; Does anyone know a way to get A to call the version of B that was live<br>
&gt; &gt; when<br>
&gt; &gt; the instance of A was created?<br>
&gt; &gt;<br>
&gt; &gt; Be careful when changing sub-workflows!<br>
&gt; &gt;<br>
&gt; &gt; (I knew of this problem with Tasks but that&#39;s fair enough, they don&#39;t have<br>
&gt; &gt; versions)<br>
&gt; &gt;<br>
&gt; &gt; regards<br>
&gt; &gt; Rick Bakker<br>
&gt; &gt; hanabi technology<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Kjetil Kilhavn <a href="tel:%28%2B47%2040220607" value="+4740220607">(+47 40220607</a>) - Blue Consulting AS (<a href="http://www.bluec.no" target="_blank">http://www.bluec.no</a>)<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
SAP-WUG mailing list<br>
<a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><br>
</div></div></blockquote></div><br>