NextGen Knowledge Center

Global Map

This map is available across your entire server, across all channels and all messages. That means you can store a value during message processing in one channel, and use that value from a different channel, or somewhere else like an Alert. You can also store global map values in the global scripts.

Like the global channel map, this map is useful for storing stateful, non-serializable objects like a database Connection. It is in-memory only, meaning that if Mirth® Connect is restarted, the entries in this map are not preserved anywhere. It is also a concurrent map, which means that "null" values cannot be stored in it.

  • Get global map value:
    • var value = globalMap.get('key');
    • var value = $g('key');
  • Put global map value:
    • globalMap.put('key', 'value');
    • $g('key', 'value');