Difference between revisions of "Workflow setGlobal"
(→Examples) |
(→Examples) |
||
Line 14: | Line 14: | ||
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 | //Get global value on existing wokflow | ||
− | + | wfS = new WorkflowScript (wf); | |
− | + | wfS.Call();//1002 | |
/* | /* | ||
Line 25: | Line 25: | ||
return a + Workflow_getGlobal("x"); | return a + Workflow_getGlobal("x"); | ||
*/ | */ | ||
− | |||
</source> | </source> | ||
[[Category:General_Functions]] | [[Category:General_Functions]] |
Revision as of 04:13, 31 December 2024
Workflow_setGlobal
Set values for scripts invoked from workflow class
Syntax
Workflow_setGlobal(string parameterName, AnyType value)
Return type
Empty
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");
*/