cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering Interface based on a trigger file

Former Member
0 Kudos

Hello PI Folks,

I have a Scenario(File to File) where I have to pick up a bunch of files with a single trigger file. But presently with the ideas so far , as discussed in http://http://scn.sap.com/thread/3157678 , I am able to pick only one file per trigger file.

Can you all suggest a solution for this ?

Embedding the Pic of Configuration along.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Mark !! But no luck

I have configured the Channel a bit different this time.

Now with this I'm a able to pick all the 'xml' files placed in the directory after placing the trigger file.But Only Trigger file is getting processed. Rest of the additional files are not. Also PayloadSwapBean is not working. Please refer my configuration of that in the screenshot attached.

Can you suggest what changes could be done so that all the files are processed ?

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

The module configuration is not correct. It should be swap.keyName followed by swap.keyValue.

Adding PayloadSwapBean in the Module Processor - Adding Modules to the Module Processor - SAP Librar...

Hope this helps,

Mark

former_member184681
Active Contributor
0 Kudos

Hi,

Personally I would do it exactly the opposite way:

File Name = bib*.trg

Additional Files File List: MainFile

MainFile.namePart: ".trg"=".xml"

MainFile.optional: NO

This config should allow you to process all the files triggered by one trigger file as one message. You might also need to additionally use PayloadSwapBean.

With your current config, each file will always be processed separately, with an additional trigger file check, and the trigger file will disappear after processing a first file of each "package".

Regards,

Grzegorz

Former Member
0 Kudos

Thanks Grzegorz for your reply ,

I have checked your configuration too before posting this. But the result is same.

Maybe it cannot be achieved without PayloadSwapBean as you said earlier.

But Can PayloadSwapBean be used for File Scenarios because I saw that it was used on 'Mail' Adapters ? Correct me if i'm wrong.

Can you throw some light on how it can be done here ?

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Sachin,

PayloadSwapBean can be used on any java-based adapter. Of course for this to work you should have an attachment for it to swap to. In your case, the attachment is coming from the Additional Files option in the file sender cc.

Regards,

Mark