Global Channel Map
This map is isolated to a specific channel, but across multiple messages. That means you can store a value during a message processing lifecycle, and it will be available during the lifecycle of the next message. You can also store global channel map values in the channel scripts.
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 channel map value:
- var value = globalChannelMap.get('key');
- var value = $gc('key');
- Put global channel map value:
- globalChannelMap.put('key', 'value');
- $gc('key', 'value');