Using Xquery Transformation wizard in OEPE we can create a Xquery transformation with multiple input source variable types.  But sometimes when we want to add an extra parameter to the source to an existing Xquery transformation do the below:
suppose we have an existing xquery transformation as below: (Removed the mappings to be clear)
========================================================================
declare function xf:sample($orcl2FoodlinVendorOutputCollection1 as element(ns0:Orcl2FoodlinVendorOutputCollection))
as element(ns1:VendorList) {
        
};
                              
declare variable $orcl2FoodlinVendorOutputCollection1 as element(ns0:Orcl2FoodlinVendorOutputCollection) external;
xf:sample($orcl2FoodlinVendorOutputCollection1)
        
suppose we have an existing xquery transformation as below: (Removed the mappings to be clear)
========================================================================
declare function xf:sample($orcl2FoodlinVendorOutputCollection1 as element(ns0:Orcl2FoodlinVendorOutputCollection))
as element(ns1:VendorList) {
};
declare variable $orcl2FoodlinVendorOutputCollection1 as element(ns0:Orcl2FoodlinVendorOutputCollection) external;
xf:sample($orcl2FoodlinVendorOutputCollection1)
 ========================================================================
And I would like to add another variable, "runId" which is a string as an input to the above Xquery Transformation:
declare function xf:sample($orcl2FoodlinVendorOutputCollection1 as element(ns0:Orcl2FoodlinVendorOutputCollection),$runId as xs:string)
    as element(ns1:VendorList) {
};
declare variable $orcl2FoodlinVendorOutputCollection1 as element(ns0:Orcl2FoodlinVendorOutputCollection) external;
declare variable $runId as xs:string external;
xf:sample($orcl2FoodlinVendorOutputCollection1, $runId)
========================================================================
The variable "runId" should be declared and assigned prior to this xquery transformation in the proxy service message flow (or in the split join flow)
 
No comments:
Post a Comment