Skip to content

runnerty/executor-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script executor for Runnerty:

Configuration sample:

{
  "id": "script_default",
  "type": "@runnerty-executor-script"
}

Plan sample:

{
  "id": "script_default",
  "script": "return('hello');"
}
{
  "id": "script_default",
  "script_file": "my_script.js",
  "args": { "my_const": "Y", "my_key": "@GV(MY_KEY)" }
}
{
  "id": "script_default",
  "script": "let res=''; if(args.my_const === 'Y'){res=args.my_key} return(res);",
  "args": { "my_const": "Y", "my_key": "@GV(MY_KEY)" }
}

if you create a function that returns string, integer or boolean it will be automatically saved in PROCESS_EXEC_DATA_OUTPUT.

if you create a function that returns an object or array it will be automatically (JSON.stringify) saved in PROCESS_EXEC_[KEY_NAME]:

return { KEY_ONE: "VAL_ONE", KEY_TWO: "VAL_TWO" };
{
  "output_share": [
    { "key": "VALUE", "name": "ONE", "value": "@GV(PROCESS_EXEC_KEY_ONE)" },
    { "key": "VALUE", "name": "TWO", "value": "@GV(PROCESS_EXEC_KEY_TWO)" }
  ]
}

About

Runnerty module: Script executor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published