functionName: name of the function
params: hashmap representing the parameters
appName
Sample Code
Map<String, Object> functionParameters = new LinkedHashMap<String, Object>();
Result result = FuncApi.executeFunction("FUNCTION_NAME", functionParameters);
Map<String, Object> functionParameters = new LinkedHashMap<String, Object>();
Result result = FuncApi.executeFunctionWithMethod("FUNCTION_NAME", "METHOD_NAME", functionParameters);
Returns
// Some code
executeSSH
Execute a remote ssh command on a server whose keys are known to the workbench. Generally the SSH server is a companion server of the workbench.
FuncApi.executeSSH(String hostName, String command)
or
FuncApi.executeSSH(String hostName, String command, boolean async)
or
FuncApi.executeSSH(String command, boolean async)
parameters:
hostName: the name of the companion server
command: the command needed to be executed
async: execute command immediately and wait or run it in the background
Returns:
the result of the ssh command
pingTask
Ping an asynchronous task by id and returns it's last time stamp
Map<String, Object> functionParameters = new LinkedHashMap<String, Object>();
Result result = FuncApi.createTaskBySourceUid("upsertTask", "CURD", "Job1123", "FUNCTION_NAME", functionParameters);