Background tasks and deadlines

Sample, Rick Rick.Sample at graybar.com
Fri Feb 3 11:45:31 EST 2012


Hi Margaret,

Never used it before, but I just tried it. Nope! Does not stop the task or the BOR-Method process. 
When I Logically Delete the WF task, the program still continues to run, until I kill it in SM50. 

I am looking for the config for time outs. I believe there is an SWU3 setting. Forces long running "Oops loops" into error if they take longer than 'X' time. As Mike stated, supposed to be 30 mins default. (as I recall anyway). I have been away from SAP for 6+ months, so little rusty and doing the hunt & peck method of finding this setting.

Thanks - and if you know where these settings are to set WF tasks or 'stuck in loop' processes to error, please forward. 
Rick



-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Hilsbos, Margaret A
Sent: Friday, February 03, 2012 10:19 AM
To: SAP Workflow Users' Group
Subject: RE: Background tasks and deadlines

Rick,

I don't know if this was mentioned yet ... in the workflow step definition, scroll far to the right, on the Miscellaneous tab, there is a setting labeled "Time from Creation of Work Item Until Timeout". The help for this field says, "Time interval between the creation of the background work item and the occurrence of the timeout."

Have you tried this?

Margaret Hilsbos
Day & Zimmermann



-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Sample, Rick
Sent: Friday, February 03, 2012 10:18 AM
To: SAP Workflow Users' Group
Subject: RE: Background tasks and deadlines

Thanks for assistance all.

No success. And one more question. 

Mike, on your point on the 30 minute error rule. That is obviously not working here. These looped task will run for days if I let them. So would you be so kind as to remind me where that setting is located? I recall a setting, but can't recall what / where. 

First, until I can figure out why code that has been working correctly for 6 yrs is now 'sometimes' getting stuck in loop, I would like to stop the bleeding. 

Tests:
I created a simple test WF with BG task and simple DO forever loop. 
I tried everything that I can think of (and suggestions from list) to stop this task and running process in SM50. 
Parallel fork suggestion, continues the flow, but does not stop the said BG Looped task. Async with term event, nada. Deadline, nope! 


-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Mike Pokraka
Sent: Friday, February 03, 2012 7:07 AM
To: SAP Workflow Users' Group
Subject: Re: Background tasks and deadlines

Persn'ly I'd consider the wrong approach.

Deadlines aren't meant for this level of control. The timing resolution is a 5 minutes accuracy at best, and background tasks error after 30 minutes by default (at least last time I looked). If a background task takes that long it should probably be asynch anyway.

Best off doing this in code - add a timer to whatever the task method does
- e.g. in a loop. Use SELECT ... PACKAGE SIZE nnn to break up a long-running query - it would even improve DB performance if it means you can stop a query gracefully whever it takes too long.

Otherwise I suppose one could create a 'Meta method' that submits a task and monitors it in a WAIT UP TO... loop. Not pretty but an option.

Regards,
Mike


On Thu, February 2, 2012 5:52 pm, Sample, Rick wrote:
> Hey Wug'ers
>
> I have someone trying to use a deadline on a background task.
> Just complete the task if it takes too long.
>
> Been a while, so don't recall if this is possible.
> I thought of using CALL FUNCTION 'C160_HOLD_FOR_DEBUG'.
> but that won't work in WF-BATCH. (Unless someone knows how to take 
> over a WF-BATCH via SM50?)
>
> Any way to set the task to complete in background task would be 
> appreciated.
>
> Rick
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>


_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug



More information about the SAP-WUG mailing list