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.  Complex mapping

    Posted 09/10/09 03:14 PM

    Originally posted by: rmbhagat


    I have a complex object in the source with two date fields that maps to a complex object in the target. The target complex object has two related date fields but they are pointers to DateTime objects in the result.

    So in the mapping from source to target, I need to create two DateTime type objects in the target, get their respective ids and enter them in the date pointer fields in the target complex object.

    Can someone outline how I might go about doing this with the WTX maps?

    Thanks.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: Complex mapping

    Posted 09/10/09 05:41 PM

    Originally posted by: repanzer


    "The target complex object has two related date fields but they are pointers to DateTime objects in the result."

    Could you explain that?
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Complex mapping

    Posted 09/10/09 05:55 PM

    Originally posted by: rmbhagat


    The DateTime objects have an ID attribute, that uniquely identifies them within the container. The date fields in the target complex object contain this value. The latter is of type IDREF in XML.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 4.  Re: Complex mapping

    Posted 09/11/09 10:03 AM
      |   view attached

    Originally posted by: rmbhagat


    Maybe this explanation and snapshot (attached) in Design Studio will make it clearer:

    Fragments of the PLMXML type tree (source) on the left and the PLMContainer type tree (target) are shown in the attachment. I am trying to map the
    DateEffectivity object on the left to Effectivity and Date_time objects on the right.

    For the DateEffectivity object on the left, in the AttrList, there is a start XML attribute that contains a start date. I need to parse that to
    extract the date and time, and move that into the Date and Time attributes respectively of the Date_time object on the right. In the process of creating the Date_time object, I will populate the core~uid attribute with a unique id using INDEX($) CURRENTTIME(). Next, I need to create the Effectivity object on the right side, and add the core~uid attribute of the Date_time object to the Start_definition element.

    I then need to apply the same pattern to the "end" attribute of the DateEffectivity object on the left, but this time the core~uid attribute of the Date_time object created on the right, is added to the End_definition element of the same Effectivity object on the right.

    Hope this helps, otherwise I can post the schemas for the PLMXML source and PLMContainer target to this forum.

    Thanks.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 5.  Re: Complex mapping

    Posted 09/11/09 02:37 PM

    Originally posted by: repanzer


    Ok, so you have an XML date/time field ( DateEfficiency) on your input'

    <DateEfficiency start="090920091250" end="091220091250">

    First thing you do is pull the start date into a functional map (f_DateTimeItem_To(start date)).

    In the functinal map, you split up the date/time on the input and map the date to the date element on the output and the time into the time element on the output. While in the functional map, you populate the core~uid attribute with a unique id using;
    =INDEX($) + CURRENTTIME().

    Next, you need to create the Effectivity object on the right side, and add the core~uid attribute of the Date_time object to the Start_definition element.

    If by "add", you mean map, go to your rule for functional map F_dateEfficecy(), and drag the core~uid attribute of the Date_time output object into the rule, so it gets passed into the functional map; F_dateEfficecy(DateEfficency:input, core~uid:output).

    Now the core~uid you mapped into the date_time above, is available in F_dateEfficecy().

    If by "add" you meant add as in a mathmatical expression, I'm not sure what you mean. You said it's INDEX($) CURRENTTIME(), and if it were just CURRENTTIME(), you could ADDMINUTES().
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange