cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Integration Flow reuse Javascript functions across Script Blocks

jlaba
Explorer
0 Kudos
156

I have several javascript blocks in my iFlow and want to share some functions between them, as they are used on all of them. To achieve that, I created a javascript file like below and uploaded it to the local references of the iFLow as shared_function_file.js.

 

export function shared_function(variable) {
return "cool";
}

In the script, where I want to use this function, I tried to import it with

import { shared_function} from "shared_function_file.js";

which results in the error:

javax.script.ScriptException: identifier is a reserved word: import

Is it somehow possible to share functions between script blocks and if yes, how it is working?

Accepted Solutions (0)

Answers (0)