How to use a GlobalVariable in TERR scripts

How to use a GlobalVariable in TERR scripts

book

Article ID: KB0082839

calendar_today

Updated On: 02-27-2017

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.4.0

Description

How to use a GlobalVariable in TERR scripts

Issue/Introduction

How to use a GlobalVariable in TERR scripts

Environment

All Operating Systems

Resolution

You cannot access GlobalVariables defined in TIBCO BusinessEvents (BE) in TERR scripts, but it is possible to set a TERR variable in your BE code and use that variable in TERR script.

eg:
GlobalVariable: TERR/BE_VARIABLE1    

BE Code:
String sVariableFromBE = System.getGlobalVariableAsString("TERR/BE_VARIABLE1","teste");
Analytics.Engine.setVariable("TerrEngine","GVvariableInTerr",sVariableFromBE);
Analytics.Engine.engineExecute("TerrEngine",rscript,true)

TERR Script:
GV_BEvariable=GVvariableInTerr

 

Additional Information

TERR, GlobalVariables