/**
* Invokes a function on a script instance
*/
public Object invokeTarget(final Object payload) throws InvocationTargetException {
RhinoScriptInstance target = context.getTargetInstance();
return target.invokeFunction(functionName, (Object[]) payload, responseClass);
}