<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> </o:p></span></p><p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Thank you for the reply. You wrote below:<o:p></o:p></span></p><p class=MsoPlainText><o:p> </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> </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). When you say “this was executed by someone”, 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> </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. That was a mystery that was puzzling myself and our Basis team!</span><o:p></o:p></p><p class=MsoPlainText><o:p> </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> </o:p></p><p class=MsoPlainText><o:p> </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> </o:p></p><p class=MsoPlainText>Tirsdag 3. desember 2013 11.28.11 skrev Bratzler, Loren:<o:p></o:p></p><p class=MsoPlainText>> Hello,<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Need some help here! We had some users complain that they were <o:p></o:p></p><p class=MsoPlainText>> receiving duplicate approval tasks in their inbox for a single item. <o:p></o:p></p><p class=MsoPlainText>> Upon investigating, I discovered that there were two workflows being <o:p></o:p></p><p class=MsoPlainText>> triggered for the item. I turned on the event trace for the <o:p></o:p></p><p class=MsoPlainText>> triggering event and found that the event was only being raised once, <o:p></o:p></p><p class=MsoPlainText>> but the workflow was being created twice from that event.<o:p></o:p></p><p class=MsoPlainText><o:p> </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> </o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText>> Below is a screen-shot of the trace.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <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>> <o:p></o:p></p><p class=MsoPlainText>> The hi-lighted lines in the screen-shot show that the triggering event<o:p></o:p></p><p class=MsoPlainText>> (BUS2042 - TO_BE_APPROVED) occurred at 14:55:04. A workflow was then<o:p></o:p></p><p class=MsoPlainText>> triggered at 14:55:11 and another workflow at 14:56:32. The problem does<o:p></o:p></p><p class=MsoPlainText>> not occur every time this event is raised. Note that the entries before<o:p></o:p></p><p class=MsoPlainText>> and after the hi-lighted entry worked fine. Only one workflow was<o:p></o:p></p><p class=MsoPlainText>> 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>> The event linkage in SWE2 only has this one event associated to the<o:p></o:p></p><p class=MsoPlainText>> WS20000139 receiver.<o:p></o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText>> This particular event uses the Event Queue. Our event queue background job<o:p></o:p></p><p class=MsoPlainText>> is configured to operate dynamically with a maximum of 100 events per read<o:p></o:p></p><p class=MsoPlainText>> access. Time interval between read accesses is 1 minute and interval<o:p></o:p></p><p class=MsoPlainText>> between queue checks is 5 minutes. So the background job will run every 5<o:p></o:p></p><p class=MsoPlainText>> minutes unless there are more than 100 events to process. Then it would<o:p></o:p></p><p class=MsoPlainText>> run every 1 minute.<o:p></o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText>> I am wondering if the problem might be related to the background job? Could<o:p></o:p></p><p class=MsoPlainText>> it be running in the 1 minute mode (due to event queue load) causing it to<o:p></o:p></p><p class=MsoPlainText>> somehow process the event twice? I have tried to look at the execution<o:p></o:p></p><p class=MsoPlainText>> history of the background job in SM37 but for some reason, SM37 will only<o:p></o:p></p><p class=MsoPlainText>> show the latest execution of the job. That is another question I have as<o:p></o:p></p><p class=MsoPlainText>> well. Does anyone know why the event queue background job (SWEQSRV) would<o:p></o:p></p><p class=MsoPlainText>> not show the execution history in SM37? <o:p></o:p></p><p class=MsoPlainText><o:p> </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> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>> All of the other workflow<o:p></o:p></p><p class=MsoPlainText>> 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>> <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>> <o:p></o:p></p><p class=MsoPlainText>> Loren Bratzler<o:p></o:p></p><p class=MsoPlainText>> Norfolk Southern Corporation<o:p></o:p></p><p class=MsoPlainText>> 110 Franklin Road SE<o:p></o:p></p><p class=MsoPlainText>> Roanoke, VA 24042-0060<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Phone: 540-524-3072<o:p></o:p></p><p class=MsoPlainText>> Email: <a href="mailto:loren.bratzler@nscorp.com%3cmailto:loren.bratzler@nscorp.com"><span style='color:windowtext;text-decoration:none'>loren.bratzler@nscorp.com<mailto:loren.bratzler@nscorp.com</span></a>><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>