Execution Environment

The Data Relationship Management engine is a multithreaded, multimachine environment and scripts may execute simultaneously on multiple threads and across machines. While you can create values and store them in the global scope, you should not rely on this behavior because when your script executes on another thread that global value will not be present. Similarly, global values are not updated across Data Relationship Management engine instances or machines. In addition, becauseData Relationship Management supports multiple live versions, if you rely on calculating a value for a node and storing that value in the global scope, you may produce incorrect values if a different script accesses the property for another node.

Note:

For the same reason that you should not store variables in the global scope, you should also avoid modifying the built-in Data Relationship Management object prototypes, because you cannot be sure that your modifications have been made across all engine instances and threads.