IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  How does X-Tension get the data?

    Posted 03/22/02 01:13 AM

    Hello:
    I want to write a X-Tension to calculate some data in the same Doctype.My Doctype is follow

    <ino:doctype ino:name=“SalaryTax” ino:key=“ID_SalaryTax” ino:options=“READ INSERT UPDATE DELETE” ino:structure-index=“CONDENSED”>

    <ino:node ino:name=“SalaryTax” ino:key=“id0000000194” ino:obj-type=“SEQ” ino:parent=“ID_SalaryTax” ino:search-type=“no”
    ino:data-type=“Integer” ino:map-type=“InfoField”/>

    <ino:node ino:name=“SalaryBegin” ino:key=“id0000000195” ino:obj-type=“CDATA”
    ino:parent=“id0000000194” ino:search-type=“standard” ino:data-type=“Integer” ino:map-type=“InfoField”/>

    <ino:node ino:name=“SalaryEnd” ino:key=“id0000000196” ino:obj-type=“CDATA”
    ino:parent=“id0000000194” ino:search-type=“standard” ino:data-type=“WCHAR”
    ino:map-type=“InfoField”/>

    <ino:node ino:name=“Rate” ino:key=“id0000000196” ino:obj-type=“CDATA”
    ino:parent=“id0000000194” ino:search-type=“standard” ino:data-type=“WCHAR”
    ino:map-type=“InfoField”/>
    </ino:doctype>

    <ino:doctype ino:name=“Salary” ino:key=“ID_Salary” ino:options=“READ INSERT UPDATE DELETE” ino:structure-index=“CONDENSED”>

    <ino:node ino:name=“Salary” ino:key=“id0000000209” ino:obj-type=“SEQ”
    ino:parent=“ID_Salary” ino:search-type=“no”
    ino:data-type=“Integer” ino:map-type=“InfoField”/>

    <ino:node ino:name=“BaseSalary” ino:key=“id0000000210” ino:obj-type=“CDATA”
    ino:parent=“id0000000209” ino:search-type=“standard” ino:data-type=“Integer” ino:map-type=“InfoField”/>

    <ino:node ino:name=“Allowance” ino:key=“id0000000211” ino:obj-type=“CDATA”
    ino:parent=“id0000000209” ino:search-type=“standard” ino:data-type=“Integer” ino:map-type=“InfoField”/>

    <ino:node ino:name=“Major” ino:key=“id0000000212”
    ino:obj-type=“PCDATA” ino:parent=“id0000000209”
    ino:search-type=“no” ino:data-type=“Integer” ino:map-type=“InfoField”/>

    </ino:doctype>

    I want to write a X-Tension in Doctype Salary. It’ll calculate the Salary Tax. The Salary is BaseSalary + Allwance + Major. The Salary between SalaryBegin and SalaryEnd decide the Salary Tax Rate. I want to retrive the Salary to trigger the X-Tension to calculate the Salary , Tax Rate and SalaryTax. How could I define this SXSFun Element in Salary ? :confused:


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: How does X-Tension get the data?

    Posted 06/13/02 02:52 PM

    How about writing a Query Server Extension function ?
    Try these parameters:
    * the XPATH epression to “Salary” as only Input parameter (XML-OBJ) and
    * the result being the “Tax” (numeric or char-str).

    You receive a fragment of a the salary doctype having as root node.
    Parse it and collect “Base”, “Allowance” and “Major” to compute “Salary” from these.
    Now use the “SxsXMLXql” Call-back (see documentation) to query
    for the appropriate Rate in doc-type “SalaryTax”. Calculate the Tax by computing “Salary”+“Rate”.

    Other solutions may be possible and better, too.

    Use Mapping Server Extension only to store and retrieve (sub-)trees handled but Your own programme.
    Regards, Michael

    NB.: You chose to give the nodes “SalaryEnd” and “Rate” the same ino:key=“id0000000196”


    #API-Management
    #Tamino
    #webMethods