This section describes how to expose a JNDI-accessible JavaBean so that you can use its properties within any scenario expression. The example below shows how to configure a custom expression that exposes the standard Nucleus component /VMSystem. (This component provides access to global properties of the JVM such as the freeMemory bean property, which shows the amount of free memory exposed.)

You can then use that component in any scenario element, allowing you to create expressions such as the following:

Set variable foo to Virtual Machine's freeMemory
Virtual Machine's freeMemory is greater than 3000000

To expose a component for use in scenario elements, add it to the bean expression registry in the scenarioManager.xml file, located in your config path at /atg/scenario/scenarioManager.xml. The following code sample shows the bean expression registry entries you would make for the /VMSystem component.

The JNDI path of any Nucleus component is its path preceded by a “dynamo:” prefix.

 <?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE process-manager-configuration
        PUBLIC "-//Art Technology Group, Inc.//DTD Process Manager//EN"


Note this example uses the same file as the custom condition example to define the component’s name for display in the scenario editor. The relevant line is as follows:

vmSystem.displayName=Virtual Machine
loading table of contents...