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