PRDONE-170 - Adding support for passing in custom ScriptUtls for scripts.

This commit is contained in:
t-samples
2023-01-26 12:45:07 -06:00
parent ed5839aa0a
commit f0450ef621
2 changed files with 29 additions and 0 deletions

View File

@ -70,6 +70,12 @@ public class RunAssociatedScriptAction
{
executeCodeInput.getContext().put("output", input.getOutputObject());
}
if(input.getScriptUtils() != null)
{
executeCodeInput.getContext().put("scriptUtils", input.getScriptUtils());
}
executeCodeInput.setCodeReference(new QCodeReference().withInlineCode(scriptRevision.getContents()).withCodeType(QCodeType.JAVA_SCRIPT)); // todo - code type as attribute of script!!
/////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -40,6 +40,8 @@ public class RunAssociatedScriptInput extends AbstractTableActionInput
private Serializable outputObject;
private Serializable scriptUtils;
/*******************************************************************************
@ -152,6 +154,7 @@ public class RunAssociatedScriptInput extends AbstractTableActionInput
}
/*******************************************************************************
** Getter for logger
*******************************************************************************/
@ -182,4 +185,24 @@ public class RunAssociatedScriptInput extends AbstractTableActionInput
}
/*******************************************************************************
** Getter for scriptUtils
**
*******************************************************************************/
public Serializable getScriptUtils()
{
return scriptUtils;
}
/*******************************************************************************
** Setter for scriptUtils
**
*******************************************************************************/
public void setScriptUtils(Serializable scriptUtils)
{
this.scriptUtils = scriptUtils;
}
}