Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Stuck with Foreground and Background processing in Workflow

0 Kudos

Hi All,

I have a BDC that is acting as a method in the Business Object. The requirement is something like this: The scenario is in the Utilities System. When a customer pays a security deposit a PM (Plant Maintanence) Service Order has to get created automatically in the background. I have a BDC for creating the Service Order but the thing is that if I make that task which runs the BDC as foreground and give the agent assignment it works absolutely fine and the service order gets generated, but if I make the same task as background the Service Order does not get created. I am heavily stuck with this issue.

Has anybody encountered the same issue ?

Best Regards,

Sudhi

6 REPLIES 6

former_member214131
Active Contributor
0 Kudos

Hello,

Please give some more details like transaction code, table control etc., mode of data upload... which will give me some idea.

Also check whether the field CTU_PARAMS-DEF_SIZ = 'X' in your BDC.

Best Regards, Murugesh AS

0 Kudos

Hi Murugesh,

The transaction code is IW31 which is to create Service Order in Plant Maintanence.

Best Regards,

Sudhi

Former Member
0 Kudos

Did you check for any dumps generated ?

what's the Xn ST22/ST02? My 15 days holiday is taking its toll now...

Also check the workflow log.

Is the task getting completed in background?

And check the input paameters of the task as shown in the log as well.

Cheers,

Ram

Message was edited by: Ram Manohar Tiwari

0 Kudos

Also, are you able to execute any other background item ?

If not then check the workflow config through SWU3.

It might happen if the user WF-BATCH ( Background user of WF ) is locked due to some reason.

Re-execute auto customizing.

see the log of auto -customizing.

Cheers,

Ram

0 Kudos

Hi Ram,

Thanks for the leads.. I have checked the dump data and there are no dumps.

I have checked with transactioin SWIA and the task gets created in the background and it gets executed and it is all green but still the Service Order does not get generated. The container elements are fine and are the way I need them to pass them on to the method. It is a problem with me scheduling as background. If it is foreground and I double click on the workitem manually it works absolutely fine (even without having to see the screens i.e in BDC you have no screens displaying). Also other background tasks do get executed.

Anything else I need to check ?

Regards,

Sudhi

0 Kudos

Sudhindra,

Are you checking for errors after the BDC Call Transaction? What I normally do is to use the Messages into option of the BDC call and return the messages to the Task Container in case of errors.

Reasons why the method does not work in background is possibly due to authorizations or the WF-BATCH user being not known to the PM system. For instance when I create PM notifications in WF in background, I have to translate the WF initiator's user id to their Personnel Number for the Resp. Person field. If in your workflow the prior step to creating order is a dialog step, you can also try the Advance with dialog option on the background step.

Cheers,

Ramki Maley.