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.  Need Help on XML-EIMS(XML) mapping in WTX

    Posted 10/16/07 07:26 AM

    Originally posted by: SystemAdmin


    Hello,
    I am new to WTX and we are dng XML to XML mapping.I have an issue.
    When I try to map from a tag(i/p) to tag(o/p), other tags in the same level, gets greyed out(i.e deactivated) and could nt continue further mapping..

    Pls tell me where I had gone wrong..I would appreciate ur help.

    Thanks in advance

    Priya
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Need Help on XML-EIMS(XML) mapping in WTX

    Posted 10/16/07 07:28 AM

    Originally posted by: janhess


    You're probably mapping the output to the wrong place. You're mapping to a choice object so the other choices are greyed out.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 3.  Re: Need Help on XML-EIMS(XML) mapping in WTX

    Posted 10/16/07 08:15 AM

    Originally posted by: TarunB


    Yes it sounds like you're mapping into a Choice group here, which is a very common group in imported XML type trees.

    A Choice group is a mutually exclusive collection of data groups/elements, i.e. only one is available for mapping at each iteration.

    You work out which one to map to by looking at your input data and writing a rule to map to the appropriate output Choice group segment. Typically you would use an IF statement with functional maps to map to each segment. This way you don't actually map anything in the top level map, only in the functional maps. Each segment within the Choice group will have its own functional map.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 4.  Re: Need Help on XML-EIMS(XML) mapping in WTX

    Posted 11/29/07 07:38 PM

    Originally posted by: SystemAdmin


    I'm trying to map into a choice group (not a generated top-level group, but a real, intentionally-defined choice group), and I can't figure out how to do it. I can set up functional maps for each of the elements easily enough, but if I put an IF statement as the rule to map one element of the choice, the rest of the elements in the choice are grayed out. How can I define the rules to map the others?

    For completeness, I want to choose which element of the choice to create based on the value of a particular input element (input is EDI).

    Thanks,

    Shawn (swillden@us.ibm.com)
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 5.  Re: Need Help on XML-EIMS(XML) mapping in WTX

    Posted 10/17/07 02:05 AM

    Originally posted by: SystemAdmin


    Thanks a lot for the suggestion...

    But why does it come as choice when importing type trees from XML?

    there are so many fields i need to map and so writing functions will be tedious..

    is there any work around way....? like can we change choice to sequence?
    Regards,
    PriJag
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 6.  Re: Need Help on XML-EIMS(XML) mapping in WTX

    Posted 10/17/07 04:07 AM

    Originally posted by: janhess


    When you import xml schema or dtd it creates a type tree with a choice group Global. This contains all the groups that make up the xml. If you want to simplify your type tree, delete all the groups from Global except the top level group that contains all the others. That way you won't map to the wrong group.
    Otherwise identify the top level group and start your output mapping there. All the sub groups will be greyed out in Global and mapping should then be easy.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 7.  Re: Need Help on XML-EIMS(XML) mapping in WTX

    Posted 10/17/07 05:00 AM

    Originally posted by: TarunB


    Most likely you are importing the XML structure from a XSD. You can open up the XSD in any editor and you will see that it contains Choice groups. In it simplest form you will find something like this:-

    <xs:choice minOccurs="0">
    <xs:element name="StockOption1" type="FixedRate"/>
    <xs:element name="StockOption2" type="indexfixing"/>
    </xs:choice>

    These translate, usually quite naturally, into TX Choice groups in your type trees. So that would explain why you have Choice groups.

    As for changing the Choice group to a Sequence - yes it's possible but not something I would recommend. Consider maintenance of the application, certainly in the longer term. What if there is a change request and a new XSD is issued for the interface? Then you would need to re-import the XSD and re-edit the type tree to include all of the amendments you made to it. This can get quite messy and will require a lot of documentation and re-work each time.

    It's hard to tell the best way forward without us knowing your exact requirements, but the Choice group is there for a reason and you're best off trying to use it rather than removing it.

    Good luck.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 8.  Re: Need Help on XML-EIMS(XML) mapping in WTX

    Posted 10/17/07 05:03 AM

    Originally posted by: janhess


    I don't think the problem is with legitimate choice groups but with all the junk that's set up in the Global choice group.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 9.  Re: Need Help on XML-EIMS(XML) mapping in WTX

    Posted 11/30/07 03:30 AM

    Originally posted by: SystemAdmin


    When you have for example this situation:
    MyChoice
    o choice1
    o choice2

    You have to put a rule like this on the level "MyChoice" and not lower:
    if(a=1,
    F_map_choice1 (some:thing1),
    F_map_choice2 (some:thing2))

    In your functional map F_map_choice1 you will see your output appearing like this:
    MyChoice
    o choice1
    o choice2

    and at this level you start the mapping of your element or group "choice1".
    You will see that choice2 will then be grayed out, which is correct, as you will do choice2 in the other functional map.

    Then you do the same for choice2, in F_map_choice2.

    I hope this is understandable :)
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender