Referencing a Form Model

Form models can be accessed by rules and scripts within workflows or forms within workflows using the $() parsing tokens, for example, $(identityModel.name). When variables are referenced with this syntax, the ScriptPreParser expands the short hand path references into the proper MapUtil.get() reference. This notation can be used in scripts run from fields, variables, steps, transitions or step actions. The script can explicitly specify the full path to the variable in the model, for example, $(identityModel.name), or it can reference the variable directly when a modelBasePath has been defined, for example $(name).

Note: In order to set a basePath in a form, an argument named modelBasePath (defined as Rule.MODEL_BASE_PATH) must be set declaring the path to be used for all the expanded variables in the form. For example, <Arg name='modelBasePath' value='identityModel'/>. The modelBasePath does not have to be specified at the top level; for example, it can point to a list or map within the top-level map such as <Arg name='modelBasePath' value='identityModel.links[AD]'/> (this is the map representing the user's AD account link).

Note: This $() notation can only be used for retrieving values from the model; it cannot be used to set or change values in the model.