IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  WTX One input xml to multiple XML request

    Posted 03/17/11 06:27 PM

    Originally posted by: MUWB


    Hi, I need help in processing 1 input xml request into multiple XML request using WTX. Pls. note that in the example below, the ACTIONTIMESTAMP AND ACTION are in pairs and can occur 1 to n times:
    e.g. Input:
    <REQUEST>
    <VERSION>1.0</VERSION>
    <TIMESTAMP>2001-03-17-15:00:30PM</TIMESTAMP>
    <ACTIONTIMESTAMP>2001-03-17-15:00:30PM</ACTIONTIMESTAMP>
    <ACTION>SALESREPORT</ACTION>
    <ACTIONTIMESTAMP>2001-03-17-15:00:30PM</ACTIONTIMESTAMP>
    <ACTIONREQUEST>SALESDISCOUNTREPORT</ACTIONREQUEST>
    </REQUEST>

    TRANSFORMED OUTPUT REQUEST:
    <REQUEST>
    <VERSION>1.0</VERSION>
    <TIMESTAMP>2001-03-17-15:00:30PM</TIMESTAMP>
    <ACTIONTIMESTAMP>2001-03-17-15:00:30PM</ACTIONTIMESTAMP>
    <ACTIONREQUEST>SALESREPORT</ACTIONREQUEST>
    </REQUEST>

    <REQUEST>
    <VERSION>1.0</VERSION>
    <TIMESTAMP>2001-03-17-15:00:30PM</TIMESTAMP>
    <ACTIONTIMESTAMP>2001-03-17-15:00:30PM</ACTIONTIMESTAMP>
    <ACTIONREQUEST>SALESDISCOUNTREPORT</ACTIONREQUEST>
    </REQUEST>

    Any help is highly appreciated. Pls. give example of MAP files and the related type trees on how to do this. Thanks.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: WTX One input xml to multiple XML request

    Posted 03/18/11 05:57 AM

    Originally posted by: vijji_WTX


    Hi,
    you can use Clone function in WTX in order to achieve this.

    group (s)= Clone(request, 3) , Here request is your data/Request and 3 is number of messages you want make/sent/generate.

    When you clone function make sure your output group should be a (s) range.

    Hope this helps you out.

    reg,
    vijji
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: WTX One input xml to multiple XML request

    Posted 03/18/11 12:48 PM

    Originally posted by: MUWB


    The issue here is the number of desired request is not fixed, it can be 1, 2, 3 or more, depending on the original request. Also when you clone it, it is just repeating the original request, correct ? Going back to the repeating item in the request, we need to make 1 request for each repeating item which has a different value:

    Original request:
    <REQUEST>
    <VERSION>1.0</VERSION>
    <TIMESTAMP>2001-03-17-15:00:30PM</TIMESTAMP>
    <ACTIONTIMESTAMP>2001-03-17-15:00:30PM</ACTIONTIMESTAMP>
    <ACTIONREQUEST>SALESREPORT</ACTIONREQUEST>
    <ACTIONTIMESTAMP>2001-03-17-15:00:30PM</ACTIONTIMESTAMP>
    <ACTIONREQUEST>SALESDISCOUNTREPORT</ACTIONREQUEST>
    </REQUEST>

    Desired output:
    <REQUEST>
    <VERSION>1.0</VERSION>
    <TIMESTAMP>2001-03-17-15:00:30PM</TIMESTAMP>
    <ACTIONTIMESTAMP>2001-03-17-15:00:30PM</ACTIONTIMESTAMP>
    <ACTIONREQUEST*>SALESREPORT</ACTIONREQUEST>
    </REQUEST>

    <REQUEST>
    <VERSION>1.0</VERSION>
    <TIMESTAMP>2001-03-17-15:00:30PM</TIMESTAMP>
    <ACTIONTIMESTAMP>2001-03-17-15:00:30PM</ACTIONTIMESTAMP>
    <ACTIONREQUEST>SALESDISCOUNTREPORT</ACTIONREQUEST>
    </REQUEST>

    Also, regarding your solution group (s)= Clone(request, 3), where do I put this, in the output typetree, or in the outputcard ? I will try that solution as well for now. Thanks.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender