Import a Library File
You can import a .zip
, .jar
, or
.js
library file into Oracle Integration. The ZIP file must contain
only the library JAR and metadata XML file.
Write JavaScript
JavaScript provides an alternative to using the mapper and assign action to enrich data, but not to develop application logic.
Refer to your JavaScript document when writing or copying JavaScript code to run in a development (sandbox) environment. See JavaScript. This documentation provides basic syntax and available constructs. Because the script runs in a development environment, network, file, and Java APIs are not available.
Code Format
Name function return parameters as shown in the following example. You
must configure the return
parameter type in the metadata user
interface only if the return
parameters are named. Consider the
following code:
function add ( param1, param2 )
{ return param1 + param2;
}
return
parameter
does not appear in the metadata user interface for configuration. For that to occur,
the code must return a named parameter. Create a new variable and assign return
values before the variable is returned. For example:
function add ( param1, param2 ) {
var retValue = param1 + param2;
return retValue;
}
Function Within Another Function
Functions defined within another function do not appear in the metadata user interface for configuration. You may need to refactor the code if you need to access the function from the callout or mapper.
foo
is defined within
parseDate
and does not appear in the metadata user interface
for
configuration.function parseDate(d) {
function foo(d) {
if(typeof d === 'string') { return Date.parse(d.replace(/-/g,'/'));}
if(!(d instanceof Array)) { throw new Error("parseDate: parameter must be arrays of strings"); }
var ret = [],k;
for(k=0;k<d.length;k++) { ret[k] = foo(d[k]); }
return ret;
}
var retVal = foo(d);
return retVal;
}
Extensions
Oracle Integration provides a set of extension functions organized under the following namespace:
Function | Example |
---|---|
uuid functions:
|
|
checksum functions:
|
|
base64
functions:
|
|
crypto functions:
|
|