Skip to Content
avatar image
Former Member

How to Solve Routed Output based on certain field.

Hi,

Please help me with this routing development...

We have an input strucutre something like this

<b><File>

<Customer>

<Name>John</Name>

<Company Info>

<Number>101</Number>

<Company>Coka Cola</Company>

</Company Info>

</Customer>

<Customer>

<Name>Ron</Name>

<Company Info>

<Number>102</Number>

<Company>Nestle</Company>

</Company Info>

</Customer>

<Customer>

<Name>Harry</Name>

<Company Info>

<Number>103</Number>

<Company>Pepsi</Company>

</Company Info>

</Customer>

<Customer>

<Name>Shrek</Name>

<Company Info>

<Number>104</Number>

<Company>Nestle</Company>

</Company Info>

</Customer>

</File></b>

And the Output has to be something like this...

<b><File>

<Customer>

<Name>John</Name>

<Number>101</Number>

<Company>Coka Cola</Company>

</Customer>

</File>

<File>

<Customer>

<Name>Ron</Name>

<Number>102</Number>

<Company>Nestle</Company>

</Customer>

<Customer>

<Name>Shrek</Name>

<Number>104</Number>

<Company>Nestle</Company>

</Customer>

</File>

<File>

<Customer>

<Name>Harry</Name>

<Number>103</Number>

<Company>Pepsi</Company>

</Customer>

</File></b>

The file has to be routed based on the Company Code and different file should have different file name again based on the company code.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 16, 2007 at 10:05 AM

    <b>>>>The file has to be routed based on the Company Code</b>

    check with xpaths.

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

    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

    <b>>>>different file should have different file name again based on the company code.</b>

    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2007 at 10:35 AM

    Hi Anupam,

    Different routing based on condition can be done in Receiver Determination. Just put the appropriate condition and target system.

    Different target interface & mapping based on condition can be done in interface determination.

    Different file name:

    for each file name create separate tergat file adapter. based on condition, use different target (interface or system)

    If u have further question, let me know.

    Peter

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 16, 2007 at 10:38 AM

    Hi ,

    Set the conext object for the required field and then use that field to send your data.This condition based thing will be set at Receiver Determination for your BS System. Use condition there and provide your conditions and you r done.

    regards

    Aashish Sinha

    Add comment
    10|10000 characters needed characters exceeded