cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug a background task that takes a lot of time to execute

Former Member
0 Kudos

My workflow consists of a background task which takes a significant amount of time to execute completely. I have executed the BO method from SWO1 and it works fine.. takes just few secs to execute.

But when this method is executed through workflow as a background task, it takes more than 20 mins to execute.

What can be the possible causes and how do I debug this.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186746
Active Contributor
0 Kudos

To debug any background workflow issues do the following.

First change the WF-BATCH user to dialog in SU01

Then change the external debugging user to WF-BATCH (utilities-->settings in se38)

Now place an external break-point in the code and see what is causing all this.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Hi Rob,

Do you want me to change the task to dialog from background and execute it with a breakpoint?

former_member554978
Active Contributor
0 Kudos

Chnage the background task to dialog and in agent assignment givw wf_initiator, then set a a break point in method.

Execute the WF from swus, then the dialog task will come to your inbox...execute that...then you will be in debugging mode.

Former Member
0 Kudos

Dear Tiyasha,

You can debug your task even if it is a back ground task.

The process is as follows :

The place where want to place your break point put an infinite while loop just before your actual code.Now execute your workflow , now go to sm54 there u will find your entry and from here you can go to the debugger .In the debugger make the value of the while loop to be true so that u can proceed.

Here u will able to debug it properly.

Regards,

Geet

former_member186746
Active Contributor
0 Kudos

no there's no need. Just channge the WF-BATCH user from system to dialog (temporary)

SU01, change, tab Logon Data and there change the User Type to Dialog.

Now you can place external break-points in your code for the WF-batch user, not session break-points.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Thanks Rob.

Your reply was very helpful and I could debug the task.

Former Member
0 Kudos

Hi Experts,

I am also facing the same issue in incoming invoice through workflow please provide me the solution.

Regards

Sreenath

former_member185167
Active Contributor
0 Kudos

Hello,

Please open a new thread with the details of your problem and what you've done so far to fix it.

regards

Rick Bakker

hanabi technology

Answers (1)

Answers (1)

former_member554978
Active Contributor
0 Kudos

Have you incorporated any deadline monitoring ?

Please check the job intervals of jobs specified in swu3.