cancel
Showing results for 
Search instead for 
Did you mean: 

Workflows : Regarding a Background task.

Former Member
0 Kudos

Hi ,

I have created a method which call SWX_GET_MANAGER to my BUSINESS OBJECT. It's a synchronous method, but NON-DIALOG method. I have created a user task which runs in BACKGROUND and attached it to a ACTIVITY Step in my workflow.

Well, sometimes the workflow runs perfectly. But sometimes, the control stops at this step in IN PROCESS Status mode. And from there, the flow never proceeds any further...

But sometimes, the same step runs perfectly..

why is it so?

Is there any solution for this?

Regards,

Raja sekhar

Accepted Solutions (1)

Accepted Solutions (1)

ramki_maley
Active Contributor
0 Kudos

Hi,

When a background step stays in IN PROCESS mode after execution, it means the step did not complete. It could be due to Authorization failure or some other errors in your code. It is possible that you are not checking for the exceptions from FM? Check for any short dumps (Txn ST22) or RFC errors (Txn SM58).

Cheers,

Ramki Maley.

Former Member
0 Kudos

Yes Ramki,

I didnt catch any EXCEPTIONS. May be the FUNCTION MODULE might throw some exceptions which are not captured. I will check that out.

Well, BTW... Why does it run PERFECT sometimes, and why not sometimes.

Regards,

Raja Sekhar.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

the problem is with the method - the workflow activity step halts because the synchronous method does not return. The step can complete only when the method is completed.

Have you checked in the cases the workflow halts that the values binded to the step work when testing the method outside workflow?

-MIkko

Former Member
0 Kudos

Hello,

I have used SYNCHORNOUS METHOD which returns VALUES and CONTROL after the execution of the method. I am not using ASYNCHRONOUS method. The control should return properly.

But why does it run successfully sometimes? and Why not sometimes?

Raja Sekhar.

Former Member
0 Kudos

Hi,

Yes, this is true. If it's synchronous as in your case, the synchronous task can complete only when the synchronous method contained in it has completed.

Have you tested the method thoroughly? Does the processing halt only for some specific values or is the halting completely random?

-Mikko

Former Member
0 Kudos

You said "I have created a user task which runs in BACKGROUND and attached it to a ACTIVITY Step in my workflow."

When you schedule a BACKGROUND JOB in SM36.There you give this value.

If you are not scheduling BACKGROUND JOB from SM36, then please ignore my suggestion, let someone else answer your question.

I am not much into Workflow.

Former Member
0 Kudos

Thanks yaar,

In Workflows, if you set some activity step is set as Background step, then no work item will be created. The control flows without user intervention. There is no need of Scheduling of a BACKGROUND TASK in WF's.

Anyhow's thanks for RESPONSE.

Regards,

Raja Sekhar

Former Member
0 Kudos

What is Job class of this background task.

I suggest assign it A.

Former Member
0 Kudos

I am sorry. I didn't understand what you said.

Can you tell my what JOB CLASS means for BACKGROUND TASK?

And where should we set this JOB CLASS?

Regards,

Raja Sekhar.