<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Courier New";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Kjetil,<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Thank you for the reply.&nbsp; You wrote below:<o:p></o:p></span></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText>One possible scenario is that the starting of the workflow failed, causing an<o:p></o:p></p><p class=MsoPlainText>SM58 entry for a hanging RFC call, and then this was executed by someone while <o:p></o:p></p><p class=MsoPlainText>the event was also being reprocessed by the event queue processing?<o:p></o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>I am not familiar with SM58 (and do not have access to it in production).&nbsp; When you say &#8220;this was executed by someone&#8221;, does that imply that there is a function in SM58 that will allow us to manually reprocess a failed RFC call?<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Also, thank you for the information on the event queue background job.&nbsp; That was a mystery that was puzzling myself and our Basis team!</span><o:p></o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Loren </span><o:p></o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText>-----Original Message-----<br>From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On Behalf Of Kjetil Kilhavn<br>Sent: Tuesday, December 10, 2013 5:59 AM<br>To: SAP Workflow Users' Group<br>Subject: Re: Duplicate Workflows Being Triggered from Single Event</p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText>Tirsdag 3. desember 2013 11.28.11 skrev Bratzler, Loren:<o:p></o:p></p><p class=MsoPlainText>&gt; Hello,<o:p></o:p></p><p class=MsoPlainText>&gt; <o:p></o:p></p><p class=MsoPlainText>&gt; Need some help here!&nbsp; We had some users complain that they were <o:p></o:p></p><p class=MsoPlainText>&gt; receiving duplicate approval tasks in their inbox for a single item.&nbsp; <o:p></o:p></p><p class=MsoPlainText>&gt; Upon investigating, I discovered that there were two workflows being <o:p></o:p></p><p class=MsoPlainText>&gt; triggered for the item.&nbsp; I turned on the event trace for the <o:p></o:p></p><p class=MsoPlainText>&gt; triggering event and found that the event was only being raised once, <o:p></o:p></p><p class=MsoPlainText>&gt; but the workflow was being created twice from that event.<o:p></o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText>One possible scenario is that the starting of the workflow failed, causing an<o:p></o:p></p><p class=MsoPlainText>SM58 entry for a hanging RFC call, and then this was executed by someone while the event was also being reprocessed by the event queue processing?<o:p></o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText>&gt; Below is a screen-shot of the trace.<o:p></o:p></p><p class=MsoPlainText>&gt; <o:p></o:p></p><p class=MsoPlainText>&gt; <a href="mailto:[cid:image001.png@01CEF019.FA0E68A0]"><span style='color:windowtext;text-decoration:none'>[cid:image001.png@01CEF019.FA0E68A0]</span></a><o:p></o:p></p><p class=MsoPlainText>&gt; <o:p></o:p></p><p class=MsoPlainText>&gt; The hi-lighted lines in the screen-shot show that the triggering event<o:p></o:p></p><p class=MsoPlainText>&gt; (BUS2042 - TO_BE_APPROVED) occurred at 14:55:04.&nbsp; A workflow was then<o:p></o:p></p><p class=MsoPlainText>&gt; triggered at 14:55:11 and another workflow at 14:56:32.&nbsp; The problem does<o:p></o:p></p><p class=MsoPlainText>&gt; not occur every time this event is raised.&nbsp; Note that the entries before<o:p></o:p></p><p class=MsoPlainText>&gt; and after the hi-lighted entry worked fine.&nbsp; Only one workflow was<o:p></o:p></p><p class=MsoPlainText>&gt; triggered and the events were all raised by the same user.<o:p></o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText>&gt; The event linkage in SWE2 only has this one event associated to the<o:p></o:p></p><p class=MsoPlainText>&gt; WS20000139 receiver.<o:p></o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText>&gt; This particular event uses the Event Queue.&nbsp; Our event queue background job<o:p></o:p></p><p class=MsoPlainText>&gt; is configured to operate dynamically with a maximum of 100 events per read<o:p></o:p></p><p class=MsoPlainText>&gt; access.&nbsp; Time interval between read accesses is 1 minute and interval<o:p></o:p></p><p class=MsoPlainText>&gt; between queue checks is 5 minutes.&nbsp; So the background job will run every 5<o:p></o:p></p><p class=MsoPlainText>&gt; minutes unless there are more than 100 events to process.&nbsp; Then it would<o:p></o:p></p><p class=MsoPlainText>&gt; run every 1 minute.<o:p></o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText>&gt; I am wondering if the problem might be related to the background job?&nbsp; Could<o:p></o:p></p><p class=MsoPlainText>&gt; it be running in the 1 minute mode (due to event queue load) causing it to<o:p></o:p></p><p class=MsoPlainText>&gt; somehow process the event twice?&nbsp; I have tried to look at the execution<o:p></o:p></p><p class=MsoPlainText>&gt; history of the background job in SM37 but for some reason, SM37 will only<o:p></o:p></p><p class=MsoPlainText>&gt; show the latest execution of the job.&nbsp; That is another question I have as<o:p></o:p></p><p class=MsoPlainText>&gt; well.&nbsp; Does anyone know why the event queue background job (SWEQSRV) would<o:p></o:p></p><p class=MsoPlainText>&gt; not show the execution history in SM37?&nbsp; <o:p></o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText>The RSWEQSRV report deletes old job entries to avoid filling up the system. <o:p></o:p></p><p class=MsoPlainText>Look at the code, there is a call to function module SWE_BATCHJOB_DELETE. You <o:p></o:p></p><p class=MsoPlainText>could implement an enhancement to prevent that (temporarily) if you need to.<o:p></o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText><o:p>&nbsp;</o:p></p><p class=MsoPlainText>&gt; All of the other workflow<o:p></o:p></p><p class=MsoPlainText>&gt; background jobs are showing their execution history but SWEQSRV does not.<o:p></o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText>&gt; <a href="mailto:[cid:image002.png@01CEF01A.BF4A5A20]"><span style='color:windowtext;text-decoration:none'>[cid:image002.png@01CEF01A.BF4A5A20]</span></a><o:p></o:p></p><p class=MsoPlainText>&gt; <o:p></o:p></p><p class=MsoPlainText>&gt; Loren Bratzler<o:p></o:p></p><p class=MsoPlainText>&gt; Norfolk Southern Corporation<o:p></o:p></p><p class=MsoPlainText>&gt; 110 Franklin Road SE<o:p></o:p></p><p class=MsoPlainText>&gt; Roanoke, VA&nbsp; 24042-0060<o:p></o:p></p><p class=MsoPlainText>&gt; <o:p></o:p></p><p class=MsoPlainText>&gt; Phone: 540-524-3072<o:p></o:p></p><p class=MsoPlainText>&gt; Email: <a href="mailto:loren.bratzler@nscorp.com%3cmailto:loren.bratzler@nscorp.com"><span style='color:windowtext;text-decoration:none'>loren.bratzler@nscorp.com&lt;mailto:loren.bratzler@nscorp.com</span></a>&gt;<o:p></o:p></p><p class=MsoPlainText>-- <o:p></o:p></p><p class=MsoPlainText>Kjetil Kilhavn / Vettug AS (<a href="http://www.vettug.no"><span style='color:windowtext;text-decoration:none'>http://www.vettug.no</span></a>)<o:p></o:p></p><p class=MsoPlainText>_______________________________________________<o:p></o:p></p><p class=MsoPlainText>SAP-WUG mailing list<o:p></o:p></p><p class=MsoPlainText><a href="mailto:SAP-WUG@mit.edu"><span style='color:windowtext;text-decoration:none'>SAP-WUG@mit.edu</span></a><o:p></o:p></p><p class=MsoPlainText><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug"><span style='color:windowtext;text-decoration:none'>http://mailman.mit.edu/mailman/listinfo/sap-wug</span></a><o:p></o:p></p></div></body></html>