<div>G'day Alon,</div>
<div>&nbsp;</div>
<div>I didn't think FLOWITEM was going to cause me a problem as _WORKITEM has the instance of the overall workflow. Raising the event works fine however it seems that timing is an issue. It fails to create an entry in SWEINST and therefore the event goes without reaction. I guess at the point when it's adding the SWEINST entry it must not yet have assigned an instance value to FLOWITEM, which I can understand. A pity though, it could have been a thing of beauty.
</div>
<div>&nbsp;</div>
<div>Still, does anyone know if you can use local events?</div>
<div>&nbsp;</div>
<div>I've since found another post from Jocelyn in 2003 that suggets that adding an event to the primary object of the flow is the way forward. This does work, but just doesn't seem as clean as it could be.</div>
<div>&nbsp;</div>
<div>Have fun,</div>
<div>Mark<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 6/8/06, <b class="gmail_sendername">Alon Raskin</b> &lt;<a href="mailto:araskin@3i-consulting.com">araskin@3i-consulting.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Mark,</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I like your idea about adding the event to the FLOWITEM type. The only issue I can see with that is that you need the work item ID for the dialog task (or workflow) which 
<i><span style="FONT-STYLE: italic">may</span></i> be difficult to obtain. Might be easier just to add it to the Business Object type. Though there could be an issue if you have multiple workflow instances for that business object. How do you know which instance that event was intended for?
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">As far as local events, etc. I am sorry but I don't have access to ECC 5.0 &nbsp;&nbsp;&nbsp;</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;</span></font></p>
<p><font face="Wingdings" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Wingdings">J</span></font><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;</span></font></p>
<div>
<p><strong><b><font face="Times New Roman" color="navy" size="3"><span style="FONT-SIZE: 12pt; COLOR: navy">Alon Raskin</span></font></b></strong><font color="navy"><span style="COLOR: navy"></span></font></p>
<p><strong><b><font face="Times New Roman" color="navy" size="3"><span style="FONT-SIZE: 12pt; COLOR: navy">e: </span></font></b></strong><font color="navy"><span style="COLOR: navy"><a title="mailto:araskin@3i-consulting.com" onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:araskin@3i-consulting.com" target="_blank">
<strong><b><font face="Times New Roman" color="navy"><span style="COLOR: navy; TEXT-DECORATION: none">araskin@3i-consulting.com</span></font></b></strong></a></span></font></p>
<p><strong><b><font face="Times New Roman" color="navy" size="3"><span style="FONT-SIZE: 12pt; COLOR: navy">p: +1 207 409 4983</span></font></b></strong><font color="navy"><span style="COLOR: navy"></span></font></p>
<p><strong><b><font face="Times New Roman" color="navy" size="3"><span style="FONT-SIZE: 12pt; COLOR: navy">f:&nbsp; +61 3 8610 1239 </span></font></b></strong><font color="navy"><span style="COLOR: navy"></span></font></p>
<p><font face="Times New Roman" color="navy" size="3"><span style="FONT-SIZE: 12pt; COLOR: navy">&nbsp;</span></font></p>
<p><strong><b><font face="Times New Roman" color="navy" size="3"><span style="FONT-SIZE: 12pt; COLOR: navy">The easiest way to integrate SAP with any mobile device</span></font></b></strong><font color="navy"><span style="COLOR: navy">
</span></font></p>
<p><strong><b><font face="Times New Roman" color="navy" size="3"><span style="FONT-SIZE: 12pt; COLOR: navy"><a title="http://www.themobileworkplace.com/" onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.themobileworkplace.com/" target="_blank">
http://www.themobileworkplace.com</a></span></font></b></strong><font color="navy"><span style="COLOR: navy"></span></font></p>
<p><font face="Times New Roman" color="navy" size="3"><span style="FONT-SIZE: 12pt; COLOR: navy">&nbsp;</span></font></p></div>
<div>
<div style="TEXT-ALIGN: center" align="center"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">
<hr align="center" width="100%" size="2">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</span></font></b><font face="Tahoma" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sap-wug-bounces@mit.edu" target="_blank">
sap-wug-bounces@mit.edu</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sap-wug-bounces@mit.edu" target="_blank">sap-wug-bounces@mit.edu</a>] <b><span style="FONT-WEIGHT: bold">On Behalf Of 
</span></b>Mark Pyc<br><b><span style="FONT-WEIGHT: bold">Sent:</span></b> 08 June 2006 06:30<br><b><span style="FONT-WEIGHT: bold">To:</span></b> WUG<br><b><span style="FONT-WEIGHT: bold">Subject:</span></b> Recalc of agents at deadline - use of local events
</span></font></p></div></div>
<div><span class="e" id="q_10bb3bc524679262_1">
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">G'day all,</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Below is an extract from one of Jocelyn's posts last year recommending the use of header events with re-evaluation of agents as a way of making metric info more accurate. A wonderful idea. 
</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Can anyone comment if it's possible to use local events for this purpose. In ECC 5.0 it seems not, but this seems crazy. I think this would be a perfect use for local events.
</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Is it necessary to define&nbsp;an 'updateagents' type&nbsp;event on&nbsp;each object where you want to do this? Or maybe an alternative is to create the event on the FLOWITEM object.
</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Happy for any and all opinions.</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Have fun,</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Mark</span></font></p></div>
<div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p></div>
<div>
<p><font face="Arial" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">But if you are on a Basis 6.20 (e.g. R/3 4.7 or above) then there's an even easier/better way:</span></font></p>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p>
<p><font face="Arial" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">* In the basic data (look for the &quot;hat&quot; icon in the workflow builder) you can set up an event for the whole workflow, 
e.g. &quot;updateagents&quot; - mark it as having the effect &quot;re-evaluate rules on active work items&quot; </span></font></p>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p>
<p><font face="Arial" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">* Before your step, save the original agent into a multiline container element of type wfsyst-agent (or similar)</span>
</font></p>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p>
<p><font face="Arial" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">* In your step, assign the agents of your step as an expression pointing to your multiline container element</span>
</font></p>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p>
<p><font face="Arial" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">* When the deadline occurs, raise a deadline event, e.g. &quot;Latest end reached&quot; and in the deadline path, add your new agent to the multiline container element, then fire off your &quot;update agents&quot; event. 
</span></font></p>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">&nbsp;</span></font></p>
<p><font face="Arial" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Very, very effective, quite easy, and has exactly the affect you are after - plus you keep a more accurate record of the time taken to action the work item because you still have the original work item and therefore the original work item creation date/time.&nbsp; 
</span></font></p></div></span></div>
<div></div></div></div><br>_______________________________________________<br>SAP-WUG mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">
http://mailman.mit.edu/mailman/listinfo/sap-wug</a><br><br><br></blockquote></div><br>