How is a Scorecard object different from GlobalVariables? What are the Pros and Cons between them?

How is a Scorecard object different from GlobalVariables? What are the Pros and Cons between them?

book

Article ID: KB0091967

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
Globalvariables
-------------------
Created during design time and loaded at run time has a flexibility of assigning a value through TRA files. At startup each engine (application) reads the TRA file and if it is overridden then it loads the value to the application memory (only one I/O operation during startup), if not it just gets the value from the project files and loads into the memory (again only one I/O operation). Subsequent API calls to reterive these values, are operations on the application memory (no more re-reading of TRA/project files). At runtime, each instance of an application maintains a value of a given global variable (i.e. a global variable named ObjectKount can have a value 100 in engine A, and a value 120 in Engine B).

With Global Variables,  you cannot update the value of the Global variables at runtime.


Scorecard
-------------

Created during design time, and loaded at run time. One Scorecard can have multiple variables (like actnumber, balance in one scorecard object) and you need to assign a value to in startup rulefunctions (fired only at engine startup). Once this is in the engine (process) memory, you can access this variables directly (like xx = customer.actnumber), no I/O calls while accessing these values. Scorecards are  also unique to each agent. Even if you have cache based OM, each instance of the scorecard object is associated with a AgentKey so it is unique across multiple agents.

With scorecards you can update the values at runtime using rules/rulefunctions (which in turn gets propogated to Cache/backend datastore.


Conclusion
--------------

In both approach, the loading of values into the variable happens only one time (during startup), after that subsequent access to these variables are in memory calls (no I/O done). And the choice depends on your exact needs, and if you wanted it to be persisted into cache and backingstore functionality in Business Events.

Issue/Introduction

How is a Scorecard object different from GlobalVariables? What are the Pros and Cons between them?