Difference between revisions of "Workflow getGlobal"

From Catglobe Wiki
Jump to: navigation, search
(Examples)
(Examples)
Line 14: Line 14:
 
return a + Workflow_getGlobal(\"x\");
 
return a + Workflow_getGlobal(\"x\");
 
";
 
";
WorkflowScript wf = new WorkflowScript (script, false);
+
WorkflowScript wfS = new WorkflowScript (script, false);
print(wf.Call());//1001
+
wfS.Call();//1001
 
//Get global value on existing wokflow
 
//Get global value on existing wokflow
wf = new WorkflowScript (wf);
+
wfS = new WorkflowScript (wf);
print(wf.Call());//1002
+
wfS.Call();//1002
  
 
/*
 
/*

Revision as of 04:12, 31 December 2024

Workflow_getGlobal

Get values for scripts invoked from workflow 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");
*/