cancel
Showing results for 
Search instead for 
Did you mean: 

Worklflow displays '00000000000' in the mail

Former Member
0 Kudos

Hi all ,

I'm working on Travel management workflow .I m facing a strange problem .

Sometimes when i create a travel request , the worklfow sends a mail to approver but it does not show any value .It just displays '0000000' .And it does not happen every time but only for odd times.

Also sometimes we get a simple mail plus a workflow item in the INBOX. This is also a strage problem .I couldnt find out the reason behind it .

Could anyone help me out ..

Thanks ,

Sonu M.

Accepted Solutions (1)

Accepted Solutions (1)

pokrakam
Active Contributor
0 Kudos

Hi Sonu,

What value are you expecting? Is it a custom attribute?

How is your WF triggered? Sounds like you are using something custom which is starting the step before the database has completed saving the TReq. One way to verify this is to check the container in the WF log to see if the attribute has a value - if it has then it probably was too quick and didn't manage to read it at the time it created the WI.

The lazy way out is to insert a delay (e.g. 1 minute requested start), alternatively look at how it's triggered.

Cheers

Mike

Former Member
0 Kudos

Hi Mike ,

Yes , we are using custom event to start the workflow .I feel what you are saying is correct . Before updating the database the workflow is getting triggered.

Now I have set START_WITH_DELAY flag , so that it will delay the triggering of workflow . But I dont know where to set the time delay .

Can you help me out ?

Thanks ,

Sonu M.

pokrakam
Active Contributor
0 Kudos

Hi Sonu,

The delay option is from SWE_EVENT_CREATE, and is a fixed 10 minutes. You should really be using SAP_WAPI_* function modules unless you have a specific reason not to.

You only mention 'custom' .... how? Obviously the custom bit is the problem - make sure your call to raise the event happens when the DB is updated - either by explicit COMMITS, reading it back from the DB, change documents. Perhaps a WAIT UP TO 5 SECONDS in your code will do the trick before your event. If you are sending your DB write into an update task then your event raising should also occur in the same update task.

Cheers,

Mike

Answers (1)

Answers (1)

Former Member
0 Kudos

Are you using commit work after the event trigger code?

if not you have to use Commit work.