Difference between revisions of "Workflow getGlobal"
(Created page with "== Workflow_getGlobal== Get values for scripts invoked from workflow class ==Syntax== Workflow_getGlobal(string parameterName) == Return type == AnyType == Examples == <sourc...") |
(→Workflow_getGlobal) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Workflow_getGlobal== | == Workflow_getGlobal== | ||
− | Get values for scripts invoked from | + | Get values for scripts invoked from [[WorkflowScript_class]] |
+ | |||
==Syntax== | ==Syntax== | ||
Workflow_getGlobal(string parameterName) | Workflow_getGlobal(string parameterName) | ||
Line 8: | Line 9: | ||
<source lang="javascript"> | <source lang="javascript"> | ||
− | // | + | Workflow_setGlobal("x", 1000); |
+ | //Get global value on dynamic script | ||
string script = " | string script = " | ||
number a = 1; | number a = 1; | ||
return a + Workflow_getGlobal(\"x\"); | return a + Workflow_getGlobal(\"x\"); | ||
"; | "; | ||
− | WorkflowScript | + | WorkflowScript wfS = new WorkflowScript (script, false); |
− | + | wfS.Call();//1001 | |
− | + | //Get global value on existing wokflow | |
− | + | wfS = new WorkflowScript (wf); | |
− | + | wfS.Call();//1002 | |
− | |||
− | |||
− | / | ||
− | |||
− | |||
− | |||
− | / | + | /* |
− | number a = | + | script on the above wf: |
+ | number a = 2; | ||
return a + Workflow_getGlobal("x"); | return a + Workflow_getGlobal("x"); | ||
+ | */ | ||
</source> | </source> | ||
[[Category:General_Functions]] | [[Category:General_Functions]] |
Latest revision as of 04:16, 31 December 2024
Workflow_getGlobal
Get values for scripts invoked from WorkflowScript_class
Syntax
Workflow_getGlobal(string parameterName)
Return type
AnyType
Examples
Workflow_setGlobal("x", 1000);
//Get global value on dynamic script
string script = "
number a = 1;
return a + Workflow_getGlobal(\"x\");
";
WorkflowScript wfS = new WorkflowScript (script, false);
wfS.Call();//1001
//Get global value on existing wokflow
wfS = new WorkflowScript (wf);
wfS.Call();//1002
/*
script on the above wf:
number a = 2;
return a + Workflow_getGlobal("x");
*/