Пример #1
0
 /**
  * Mediation implementation when the script to be executed should be loaded from the registry
  *
  * @param synCtx the message context
  * @return script result
  * @throws ScriptException For any errors , when compile, run the script
  * @throws NoSuchMethodException If the function is not defined in the script
  */
 private Object mediateWithExternalScript(MessageContext synCtx)
     throws ScriptException, NoSuchMethodException {
   prepareExternalScript(synCtx);
   ScriptMessageContext scriptMC = new ScriptMessageContext(synCtx, xmlHelper);
   processJSONPayload(synCtx, scriptMC);
   return invocableScript.invokeFunction(function, new Object[] {scriptMC});
 }