cancel
Showing results for 
Search instead for 
Did you mean: 

File to File interface Count

Former Member
0 Kudos

HI ALL,

I have a file to file scenario used to move 100 PDF files from System A to B . i give wildcard * in the sender communication and used ASMA to name the file in the receiver side.

the requirment is client is asking to send a e-mail aftre sending all the files successfully from A to B the content in the email needs to be the number of files sent and time of the last file sent ..

how can i achive this in PI..?

thanks

souz

Accepted Solutions (0)

Answers (4)

Answers (4)

stefan_grube
Active Contributor
0 Kudos

> the requirment is client is asking to send a e-mail aftre sending all the files successfully from A to B the content in the email needs to be the number of files sent and time of the last file sent ..

How can PI know, that the last file is processed?

In other words: When PI processes a file, how can it know, that this one is the last?

madhusudana_reddy2
Contributor
0 Kudos

Hi Dominic,

Sending the all these files very simple with out BPM. But if you need to send mail with last file name and count of files, it will become complex which needs BPM. Try to convince your customer. Still if you want to do this, proceed below steps...

In BPM collect(condition is 1=1) all the Files, while collecting them take the file name(using dynamic configuration) and put it in container variable. Put deadline step for Block with 10 minutes. Now your BPM will send all files after collecting them with in that 10 minutes. You add control step after send step to send mail, with in this mail use that container variable(which we have stored the file name).

thanks,

madhu

Former Member
0 Kudos

Hi ,

thanks for your reply ..

Can you pls explain the BPM steps in detail ..if possible can u pls send me as screenshot..?

thanks

Souz

0 Kudos

Hi Souz,

Definitely you would need a BPM here. As mentioned by madhu use the BPM collect pattern.

But for the email part, I guess the requirement is like you need to send an email after successfully placing the files in the SYSTEM B. for this purpose you need to use transport level acknowledgement in your BPM. Transport level acknowledgement gives you an ack at the OS level, if the file is successfull written to the target system or not.

BPM Collect Patterns:

/people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-1

/people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-2

Transport Level ack

/people/siva.maranani/blog/2005/03/01/usage-of-transport-level-acknowledgements

Thanks

Prasanna

Shabarish_Nair
Active Contributor
0 Kudos

one way would be to store the count using a JDBC or RFC call into a table.

Then after the end of the day or a specific time do a lookup and get the final count and send a mail out.

Former Member
0 Kudos

Hi Dominic,

you need to use BPM and counter variable to get the number of files coming in...and assign a increment in the container operation.

what about using OS command in the sender file adapter ?

.

A not so good idea below

What about putting a counter in the file name , is it allowed ,I think if you are allowed to add the counter and timestamps then you can see the file count and time of last processed in the file name itself. then you can design another interface to send a mail ...somehow

Regards,

Srinivas

Edited by: Srinivas on May 12, 2010 12:42 AM