Workflow getGlobal

From Catglobe Wiki
Revision as of 11:27, 30 December 2024 by Administrator (talk | contribs) (Created page with "== Workflow_getGlobal== Get values for scripts invoked from workflow class ==Syntax== Workflow_getGlobal(string parameterName) == Return type == AnyType == Examples == <sourc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Workflow_getGlobal

Get values for scripts invoked from workflow class

Syntax

Workflow_getGlobal(string parameterName)

Return type

AnyType

Examples

//Use on dynamic script 
string script = "
	number a = 1;
	return a + Workflow_getGlobal(\"x\");
";
WorkflowScript wf = new WorkflowScript (script, false);
Workflow_setGlobal("x", 10);
wf.Call();//11


//Use on existing wokflow
WorkflowScript wf = new WorkflowScript (wf);
Workflow_setGlobal("x", 10);
print(wf.Call());//11

// script get global value on the above wf:
number a = 1;
return a + Workflow_getGlobal("x");