Workflow setGlobal

From Catglobe Wiki
Revision as of 04:09, 31 December 2024 by Administrator (talk | contribs) (Examples)
Jump to: navigation, search

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 wf = new WorkflowScript (script, false);
print(wf.Call());//1001
//Get global value on existing wokflow
wf = new WorkflowScript (wf);
print(wf.Call());//1002

/*
script on the above wf:
number a = 2;
return a + Workflow_getGlobal("x");
*/

</source>