cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion Problem of not generating empty file

Former Member
0 Kudos

Hi All,

i have 3 input text files for my BPM to process.

if any of the text file is empty, i need to generate an alert message that the file is empty........but the problem is file adapter does not generate a XML message for the empty text file..........

<b>Can anybody suggest how to generate the alert if any of the 3 text files is empty.</b>

Thanks,

Rajeev Gupta

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please can you read File adapter SAP Note: 821267.

It has Q-31 on Blank File.

Empty File Processing

Q: How does the File Adapter handle empty files and messages with a zero-sized payload?

A: Empty files in the sender adapter will not trigger the creation of a message. If an empty message is sent to a receiver channel, no output file will be created.

One thing you can try, is check if the file is empty does the file adapter shows error or it just does not pick the file.

Regards

Vijaya

Former Member
0 Kudos

Rajeev,

You can also modify the outbound interface structure with a control pointer which you can check within a BPM and trigger a Alert message. Control pointer can be just part of the payload and can be filled using a module in the sender adapter.Module should will check if incoming payload is empty and appropriately fill in the Control pointer with an identifier.

Some thing like

<Outbound>

<Checkpoint>EMPTY</Checkpoint>

.

."Regular Payload"

.

Checkpoint can be filled in your Sender module and can be skipped during mapping in case of regular payloads.Now do a conditional check in BPM and appropriately send a alert message.

Former Member
0 Kudos

Hi Sriram,

Could you please suggest on how to write a module for filling your Control pointer............

Moreover, how BPM is going to generate alert message by checking for Control pointer...please suggest.

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Rajeev~

I dont find ur mail Id in ur Business card.Post the same..I will send you across a PDF with steps to write a adapter module.You would need to extend the same to check the payload for empty data and accordingly create a XML payload with checkpointer.

For validating this value in a BPM use the FORK step and check the payload in the condition editor.

Refer to this url for the same.

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/bb/e1283f2bbad036e10000000a114084/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/bb/e1283f2bbad036e10000000a114084/content.htm</a>

Former Member
0 Kudos

Hi

Check if adapter throws error if the file is empty. Try to setup alert rule for ur interface with adapter as the point of error.

With this u could raise alert if the file is empty.

Regards

Rajeev

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

take a look at this document for Developing Adpater Modules,

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a">How to create Modules for the J2EE Adapter Engine</a>

Regards,

Bhavesh

Former Member
0 Kudos

Hi Vasudevan,

my email-id is raj.gupta@tcs.com

please send the adapter module PDF.

Thanks,

Rajeev Gupta

Former Member
0 Kudos

its been sent.Do let me know how you have done it..

Former Member
0 Kudos

Hi All,

Now see i have input 3 different files in BPM..........I am taking them in a fork.............i have put the fork end condition as assigning of each variable to 1 in each of the 3 steps...........................to incorporate the time for which BPM should wait for the 3 messages, i have included an extra step for waiting for 2 minutes......................So if BPM receives all the 3 files within 2 minutes, it completes the BPM process.............But if BPM does not receive all the 3 files within 2 minutes, then i have put a control step to end the BPM process, so then BPM process ends.....................This BPM is working fine......................

<b>Now tell me if a create a module in JAVA, to include a control pointer in XML payload.............then where i will put the control step for alert if file is empty in BPM.......please tell this thing.</b>

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Have mailed u the snapshots for the configuration..Let me know if u still have issues

Former Member
0 Kudos

Hi Sriram,

i have taken an alternative way for the empty file problem by BPM...........anyways your suggestion by module adapter was nice......

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

Just a quick query

1. Did u manage to solve the problem of empty file by adapter?..My question is that possible at all as the file adapter does not trigger anything if the file is empty. Just my doubt??

2. How did u solve this with BPM?

Regards

Vijaya

Former Member
0 Kudos

Hi Vijaya,

my replies:

1. it is not possible to solve empty file problem by adapter as nothing is triggered for empty file.

2. in BPM, when i am collecting the messages, i have put a wait time for each message and if within that time, i do not get a message i generate a alert for it that the file is empty.

Regards,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

Thanks for the reply. Just wanted to confirm on the first query as the same is written in the SAP FAQ file adapter note.

Regards

Vijaya

Former Member
0 Kudos

Hi Vijaya,

You are always welcome...........

Regards,

Rajeev Gupta

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you can check it in the java proxy which will check that for example

or you can write your own adapter if you wish

to have more sophisticated solution

file adapter per standard does not send empty files

to the integration engine

Regards,

michal

Former Member
0 Kudos

Hi Michal,

can you suggest me some reference on how to check for empty file in java proxy, which you are saying.....

i don't have an idea of how to write my own adapter...could you please suggest me how to do it....

Thanks,

Rajeev Gupta