cancel
Showing results for 
Search instead for 
Did you mean: 

File adapter archive on error?

xinjiang_li
Active Participant
0 Kudos

Hello,

I have a flat file scenario: flat -> XI -> flat.

I have configured the sender channel for archiving messages after processing and it work fine.

But what i want to do is :

if the message is processed succesfully i want to archive the send file in the directory "c:/sucess" and if the message is processed on error (for example due to a mapping error) i want to archive the send file in the directory "c:/error". For the moment i don't see if it's possible, all the file successfull and on error are archived in the same directory.... Is it possible to use 2 directories for archiving ? One for success, second for error ?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

dharamveer_gaur2
Active Contributor
0 Kudos

Answers (3)

Answers (3)

former_member192295
Active Contributor
0 Kudos

Hi,

We can do through UDF. If mapping is success automatically file will be move to archive, this option is available in channel. In mapping check field level condition if condition is success pass value to receiver side else generate error file from UDF and pass to corresponding folder directly from mapping. Once of my requirement i have done like that, with this configuration we can get success and error files also.

former_member208856
Active Contributor
0 Kudos

for Archive mode, please check these things in Sender Communication Channel :

1. Processing Mode is Archive

2. Archive Directory path is correct.

3. In Advance Tab : Set Adapter-Sepcific Message Attribute is Checked.

Filename, direcotry, filetype are also Checked.

You have one option on Processing Tab : Archive Faulty Source File, Please use the same.

Sandeep

xinjiang_li
Active Participant
0 Kudos

Hi,Sandeep:

The parameter " Archive Faulty Source File" is not what I want.

Shabarish_Nair
Active Contributor
0 Kudos

it is not possible via the standard way in XI to archive a file if it encounters a mapping error.

The only way is Archive Source Files with Errors i.e during the processing of the file at the Adapter level.