As far as I know the XSLT mapper do not accept parameters of simple type as source.
You need to create a complex dataobject, even with one element only, but need to be a complexType to be included as a parameter.
If you add the two sources from the complex dataObjects, one will be considered a parameter and can be used in xpath expressions as $variableName to refer to it.
Luis Fernando Heckler
Thanks for the idea Luis, but that didn't exactly work. Here's why... I created a business object that contains nothing but an integer id value as you suggested, let's call it SearchParams. I then created two different instances of the business object as process data objects, let's call them search1 and search2. I changed the XSLT to accept this business object SearchParams as an input. In the input Data Associations for the activity, I added the data object search1 to be passed. But JDeveloper complains it doesn't match the XSLT inputs.
I believe that's because the input param must be named searchParams (the generated param name from the type SearchParams). Now I suppose I could create another process data object named searchParams of type SearchParams, and then copy search1 to searchParams, and pass that instead. Just seems a little round-about. Anyone have a more direct technique?
If I understood your scenario, the point is: you always have to pass the same dataObjects as parameters to the XSL, but you can change the values of them in an association step before the transformation.
Lets see if the following can fit your needs:
1) your project has three BusinessObjects: "SearchParam", "CommonData" and "Result"; and five process dataObjects:
- "search1", "search2" and "search" of type "SearchParam";
- "commonData" of type "CommonData";
- "result" of type "Result"
2) your XSL has "result" as target and two sources: "search" and "commonData"
3) In some part of the process flow you have a scriptTask with:
- a data association from "search1" to "search";
- a transformation with "search" and "commonData" as parameters
4) In other part of the process flow you can use the same transformation, but using the data from "search2" as parameter, adding a scriptTask with:
- a data association from "search2" to "search";
- the same transformation with "search" and "commonData" as parameters
In this scenario you are reusing the same XSL file only changing the values for one parameter.