cancel
Showing results for 
Search instead for 
Did you mean: 

Routing Message based on FileName

Former Member
0 Kudos

Hi all,

I hav a scenario where I need to route the file based on the file name.

for eg: if the 10th char of the filename is 'A' then it has to be placed in Location 1

if the 10th char of the filename is 'B' then it has to be placed in location 2.

Both sender and receiver are file adapters.

I thought of using condition in Intrface Determination (Context object) , but got stuck since I have to comapare only the 10th char not all the characters since other characters are dynamic.

Note: This is a pass through Interface and no mapping is involved.

Thanks,

Siva

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member181985
Active Contributor
0 Kudos

Since mapping is not involved you might have to use a custom module in sender adapter to determine the 10 th character and to set the location dynamically.

Shabarish_Nair
Active Contributor
0 Kudos

did you try to use the context object and XPATH functions to help you out.

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

Former Member
0 Kudos

Hi,

I am using Context Object functionality for routing purpose.

In XPath we can use SubString Function but we can not use the same Function in Context Object.

Is there any workaround for this.

Thanks,

Siva

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Yes we dont have flexibility like XPath in context object. I'm sure you are not using ESR objects for your scenario. Just suggestions. Write some unix script to do this and Run as os command in the file adapter. That might be feasible.

Former Member
0 Kudos

Hi,

writing ur own adapter module will solve the purpose(as suggested above also)....

Thanks

Amit