Hi,
 
I am trying to embed the Rhino JavaScript engine into a workflow engine.

This workflow engine will use JavaScript function definitions (amongst
others) as part of its expression language.
What I want to be able to do is compile JS functions declared in the
workflow and then call them later during the workflow execution.
 
I can compile the function using the code:
Function compiledFunction = cx.compileFunction(scope,
myFunctionCode.toString(), myFunctionName.getName(), 1, null);
and I can call this function using the code:
Object result = compiledFunction .call(cx, scope, compiledFunction,
parameters.toArray());
 
The problem is I can't find a way to extract the function signature from
the compiled function.  I need this so I know how many arguments to call
with and can then bind it into the workflow.  Looking though the source
there seems to be an arity function but this always seems to return 0.

Is there anyway to do this?

Regards,
Gavin
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to