<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Mike,<BR>
&nbsp;<BR>
I think you're referring to the setting&nbsp;of field SWP_ADMIN-MAX_NODES which is set to a default of 10,000 and can be adjusted in SPRO?:<BR>
&nbsp;<BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr>
&nbsp;SAP NetWeaver=&gt;Application Server=&gt;SAP Business Workflow=&gt;Basic Settings (Workflow System)=&gt;Maintain Administration Data for Workflow Runtime System<BR>
&nbsp;<BR>
(aka Transation SWPA)<BR></BLOCKQUOTE>
<P dir=ltr>&nbsp;</P>
<P dir=ltr>This isn't a hard cap and can be adjusted if clients choose, although why they would is beyond me.</P>
<P dir=ltr>&nbsp;</P>
<P dir=ltr>Prior to ECC 6&nbsp;I think was defaulted to '9999' if memory serves,&nbsp;but it appears these days you can be daft and put bigger numbers (INT4:Length 10).</P>
<P dir=ltr>&nbsp;</P>
<P dir=ltr>I've seen a few infinite loops like this before and the telltale sign is the node number buried in the SWWWIHEAD-WI_CREATOR field skyrocketing if you dig down (depending on the WF definition and whether the steps end up creationg entries there).</P>
<P dir=ltr>&nbsp;</P>
<P dir=ltr>With regards to the original problem (which I admit I've only skimmed), have you considered switching to a qRFC approach and using SMQR to deregister the specific Queue to catch the RFC manually?</P>
<P dir=ltr>&nbsp;</P>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr>
<P dir=ltr><A href="http://help.sap.com/saphelp_nw04/helpdata/en/8f/53b67ad30be445b0ccc968d69bc6ff/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/8f/53b67ad30be445b0ccc968d69bc6ff/content.htm</A></P></BLOCKQUOTE>
<P dir=ltr>&nbsp;</P>
<P dir=ltr>Mike GT<BR>&nbsp;</P>
<DIV id=SkyDrivePlaceholder></DIV>
<DIV>&gt; Date: Tue, 7 Feb 2012 10:09:23 +0000<BR>&gt; Subject: RE: Background tasks and deadlines<BR>&gt; From: wug@workflowconnections.com<BR>&gt; To: sap-wug@mit.edu<BR>&gt; <BR>&gt; Hi Rick,<BR>&gt; <BR>&gt; Florin is absolutely correct that this should not work that way. As I<BR>&gt; suggested, this would probably be better off in an asynch task or have<BR>&gt; approriate controls in the code.<BR>&gt; <BR>&gt; Regarding the 30 minutes, Margaret already pointed you to the<BR>&gt; Miscellaneous tab. It used to be hardcoded somewhere (no time to search<BR>&gt; whether it still exists), but has since been parameterised. HOWEVER, the<BR>&gt; timeout is only meant for tasks that have died. I would have been very<BR>&gt; surprised if it had been able to kill a running program.<BR>&gt; <BR>&gt; The config you mention is to abort a _workflow_ in an endless loop after<BR>&gt; 10,000 steps, which is not the case since you're stuck on a single task.<BR>&gt; It's hiding in TX SWPA if you want to have a look anyway.<BR>&gt; <BR>&gt; Addressing this in WF is just a sticky plaster for badly behaving code.<BR>&gt; <BR>&gt; Regards,<BR>&gt; Mike<BR>&gt; <BR>&gt; <BR>&gt; On Mon, February 6, 2012 2:13 pm, Sample, Rick wrote:<BR>&gt; &gt; First, this is low priority issue. I found something I did not think was<BR>&gt; &gt; allowed and testing.<BR>&gt; &gt;<BR>&gt; &gt; Org issue, in prod with very large PO lines a FM call in a background task<BR>&gt; &gt; gets stuck. Working on the issue, but I tried to just abort the call and<BR>&gt; &gt; move to next user until I have time to work on it. Nothing I tried is<BR>&gt; &gt; working.<BR>&gt; &gt;<BR>&gt; &gt; Test:<BR>&gt; &gt; I created a very simple test WF that I put into an endless loop to attempt<BR>&gt; &gt; a quick fix using an End Deadline. Doing this, I found when it gets stuck<BR>&gt; &gt; in loop, it gets "STUCK" in loop. Never errors, never ends, etc. I have to<BR>&gt; &gt; logically delete the task and kill the process from SM50. I have been away<BR>&gt; &gt; from SAP for 6+ months, but as I recall, the system should never allow<BR>&gt; &gt; these run away loops. I am reviewing my notes for config to abort on these<BR>&gt; &gt; endless loops. I know there config, just don't recall where. I believe<BR>&gt; &gt; there is a BASIS level and a WF System level config to abort after x times<BR>&gt; &gt; or time.<BR>&gt; &gt;<BR>&gt; &gt; Thanks,<BR>&gt; &gt; Rick<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; -----Original Message-----<BR>&gt; &gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On Behalf<BR>&gt; &gt; Of Kjetil Kilhavn<BR>&gt; &gt; Sent: Monday, February 06, 2012 2:21 AM<BR>&gt; &gt; To: SAP Workflow Users' Group<BR>&gt; &gt; Subject: Re: Background tasks and deadlines<BR>&gt; &gt;<BR>&gt; &gt; Fredag 3. februar 2012 10.45.31 skrev Sample, Rick:<BR>&gt; &gt;&gt; Hi Margaret,<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Never used it before, but I just tried it. Nope! Does not stop the<BR>&gt; &gt;&gt; task or the BOR-Method process. When I Logically Delete the WF task,<BR>&gt; &gt;&gt; the program still continues to run, until I kill it in SM50.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; I am looking for the config for time outs. I believe there is an SWU3<BR>&gt; &gt;&gt; setting. Forces long running "Oops loops" into error if they take<BR>&gt; &gt;&gt; longer than 'X' time. As Mike stated, supposed to be 30 mins default.<BR>&gt; &gt;&gt; (as I recall anyway). I have been away from SAP for 6+ months, so<BR>&gt; &gt;&gt; little rusty and doing the hunt &amp; peck method of finding this setting.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Thanks - and if you know where these settings are to set WF tasks or<BR>&gt; &gt;&gt; 'stuck in loop' processes to error, please forward. Rick<BR>&gt; &gt;<BR>&gt; &gt; I would try to fix the ABAP instead (unless I have misunderstood and the<BR>&gt; &gt; looping is in the workflow definition).<BR>&gt; &gt; I guess this is just stating the obvious, but if the background step runs<BR>&gt; &gt; into an endless loop you need to add conditions to prevent that. If the<BR>&gt; &gt; database selection takes too long there's a need for either a slight<BR>&gt; &gt; rewrite to use better indexes or the creation of a new index. Perhaps<BR>&gt; &gt; you'll find that the endless loop is in SAP's code and can report an error<BR>&gt; &gt; - in which case your problem will be solved (eventually) and the rest of<BR>&gt; &gt; us won't have to suffer the same problem.<BR>&gt; &gt; You wouldn't happen to have fallen into the "FOR ALL ENTRIES" on an empty<BR>&gt; &gt; table trap? I've been there, and I'm sure most of the readers here have<BR>&gt; &gt; too.<BR>&gt; &gt;<BR>&gt; &gt;&gt; -----Original Message-----<BR>&gt; &gt;&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On<BR>&gt; &gt;&gt; Behalf Of Hilsbos, Margaret A Sent: Friday, February 03, 2012 10:19 AM<BR>&gt; &gt;&gt; To: SAP Workflow Users' Group<BR>&gt; &gt;&gt; Subject: RE: Background tasks and deadlines<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Rick,<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; I don't know if this was mentioned yet ... in the workflow step<BR>&gt; &gt;&gt; definition, scroll far to the right, on the Miscellaneous tab, there<BR>&gt; &gt;&gt; is a setting labeled "Time from Creation of Work Item Until Timeout".<BR>&gt; &gt;&gt; The help for this field says, "Time interval between the creation of<BR>&gt; &gt;&gt; the background work item and the occurrence of the timeout."<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Have you tried this?<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Margaret Hilsbos<BR>&gt; &gt;&gt; Day &amp; Zimmermann<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; -----Original Message-----<BR>&gt; &gt;&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On<BR>&gt; &gt;&gt; Behalf Of Sample, Rick Sent: Friday, February 03, 2012 10:18 AM<BR>&gt; &gt;&gt; To: SAP Workflow Users' Group<BR>&gt; &gt;&gt; Subject: RE: Background tasks and deadlines<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Thanks for assistance all.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; No success. And one more question.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Mike, on your point on the 30 minute error rule. That is obviously not<BR>&gt; &gt;&gt; working here. These looped task will run for days if I let them. So<BR>&gt; &gt;&gt; would you be so kind as to remind me where that setting is located? I<BR>&gt; &gt;&gt; recall a setting, but can't recall what / where.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; First, until I can figure out why code that has been working correctly<BR>&gt; &gt;&gt; for 6 yrs is now 'sometimes' getting stuck in loop, I would like to<BR>&gt; &gt;&gt; stop the bleeding.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Tests:<BR>&gt; &gt;&gt; I created a simple test WF with BG task and simple DO forever loop.<BR>&gt; &gt;&gt; I tried everything that I can think of (and suggestions from list) to<BR>&gt; &gt;&gt; stop this task and running process in SM50. Parallel fork suggestion,<BR>&gt; &gt;&gt; continues the flow, but does not stop the said BG Looped task. Async<BR>&gt; &gt;&gt; with term event, nada. Deadline, nope!<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; -----Original Message-----<BR>&gt; &gt;&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On<BR>&gt; &gt;&gt; Behalf Of Mike Pokraka Sent: Friday, February 03, 2012 7:07 AM<BR>&gt; &gt;&gt; To: SAP Workflow Users' Group<BR>&gt; &gt;&gt; Subject: Re: Background tasks and deadlines<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Persn'ly I'd consider the wrong approach.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Deadlines aren't meant for this level of control. The timing<BR>&gt; &gt;&gt; resolution is a<BR>&gt; &gt;&gt; 5 minutes accuracy at best, and background tasks error after 30<BR>&gt; &gt;&gt; minutes by default (at least last time I looked). If a background task<BR>&gt; &gt;&gt; takes that long it should probably be asynch anyway.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Best off doing this in code - add a timer to whatever the task method<BR>&gt; &gt;&gt; does<BR>&gt; &gt;&gt; - e.g. in a loop. Use SELECT ... PACKAGE SIZE nnn to break up a<BR>&gt; &gt;&gt; long-running query - it would even improve DB performance if it means<BR>&gt; &gt;&gt; you can stop a query gracefully whever it takes too long.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Otherwise I suppose one could create a 'Meta method' that submits a<BR>&gt; &gt;&gt; task and monitors it in a WAIT UP TO... loop. Not pretty but an option.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Regards,<BR>&gt; &gt;&gt; Mike<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; On Thu, February 2, 2012 5:52 pm, Sample, Rick wrote:<BR>&gt; &gt;&gt; &gt; Hey Wug'ers<BR>&gt; &gt;&gt; &gt;<BR>&gt; &gt;&gt; &gt; I have someone trying to use a deadline on a background task.<BR>&gt; &gt;&gt; &gt; Just complete the task if it takes too long.<BR>&gt; &gt;&gt; &gt;<BR>&gt; &gt;&gt; &gt; Been a while, so don't recall if this is possible.<BR>&gt; &gt;&gt; &gt; I thought of using CALL FUNCTION 'C160_HOLD_FOR_DEBUG'.<BR>&gt; &gt;&gt; &gt; but that won't work in WF-BATCH. (Unless someone knows how to take<BR>&gt; &gt;&gt; &gt; over a WF-BATCH via SM50?)<BR>&gt; &gt;&gt; &gt;<BR>&gt; &gt;&gt; &gt; Any way to set the task to complete in background task would be<BR>&gt; &gt;&gt; &gt; appreciated.<BR>&gt; &gt;&gt; &gt;<BR>&gt; &gt;&gt; &gt; Rick<BR>&gt; &gt;&gt; &gt; _______________________________________________<BR>&gt; &gt;&gt; &gt; SAP-WUG mailing list<BR>&gt; &gt;&gt; &gt; SAP-WUG@mit.edu<BR>&gt; &gt;&gt; &gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; _______________________________________________<BR>&gt; &gt;&gt; SAP-WUG mailing list<BR>&gt; &gt;&gt; SAP-WUG@mit.edu<BR>&gt; &gt;&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; _______________________________________________<BR>&gt; &gt;&gt; SAP-WUG mailing list<BR>&gt; &gt;&gt; SAP-WUG@mit.edu<BR>&gt; &gt;&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; _______________________________________________<BR>&gt; &gt;&gt; SAP-WUG mailing list<BR>&gt; &gt;&gt; SAP-WUG@mit.edu<BR>&gt; &gt;&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; _______________________________________________<BR>&gt; &gt;&gt; SAP-WUG mailing list<BR>&gt; &gt;&gt; SAP-WUG@mit.edu<BR>&gt; &gt;&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>&gt; &gt; --<BR>&gt; &gt; Kjetil Kilhavn (+47 40220607) - Blue Consulting AS (http://www.bluec.no)<BR>&gt; &gt; _______________________________________________<BR>&gt; &gt; SAP-WUG mailing list<BR>&gt; &gt; SAP-WUG@mit.edu<BR>&gt; &gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>&gt; &gt;<BR>&gt; &gt; _______________________________________________<BR>&gt; &gt; SAP-WUG mailing list<BR>&gt; &gt; SAP-WUG@mit.edu<BR>&gt; &gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>&gt; &gt;<BR>&gt; <BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; SAP-WUG mailing list<BR>&gt; SAP-WUG@mit.edu<BR>&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<BR></DIV>                                               </div></body>
</html>