Variables and bindings

Variables determine how information is passed into or received from a script. You can configure the variables for the script in the Automation Scripts application instead of declaring variables in the source code. By using variables, you reduce the complexity of the source code and make it easier to reuse the source code for different purposes.

Scripts use variables to interact with IBM® Maximo® Manage. Variables are either IN, INOUT, or OUT. IN is pass-by-value, and INOUT and OUT are pass-by-reference.

Variables can be bound to an artifact including a Maximo business object (MBO) attribute, a MAXVAR, and a system property. Or, variables can be bound to a literal value that is not related to any artifact. Variables that are bound to a MAXVAR or a system property are always IN variables as the script cannot modify them. Variable data type for MBO attributes is driven by the MBO attribute data type. For example, a variable that is bound to the Purchase Order MBO totalcost attribute inherits its type. Variables that are bound to MAXVAR and system properties are always string variables. You can define the data type of variables that are bound to literal values by specifying the literaldatatype attribute in the AUTOSCRIPTVARS table. The supported literal data types are ALN, INTEGER, SMALLINT, DECIMAL, YORN, DATETIME, and FLOAT. You can define variable bindings at the script level or the launch point level if the definition at the script level allows override of that value at the launch point level. Another important aspect of the OUT and INOUT variables is how their values can be set back to the MBOs. You can set MBO attributes with the NOACTION flag, which determines whether modifying the value of the MBO attribute calls the field action routine. You can also set MBO attributes with the NOVALIDATION flag, which determines whether modifying the value of the MBO attribute calls the field validate routine. You can use MBO attributes to set the NOACCESSCHECK flags, which might trigger the Action or Validation routine of the MBO attribute. You can set an MBO attribute with any combination of these flags. You can enable these settings from the script or launch point creation wizards and Automation Script application.

The following table explains the usage of these flags.
Table 1.
Binding metadata Type Description Applicability
Suppress validation Boolean MBO attributes are set with the NOVALIDATION flag. This flag determines whether modifying the value of the MBO attribute calls the field validations validate routine (false) or not call the field validations validate routine (true). For attribute bindings
Suppress action Boolean MBO attributes are set with the NOACTION flag, which determines whether modifying the value of the MBO attribute calls the field validations validate routine (false) or not call the field validations validate routine (true). For attribute bindings
Suppress Access Control Boolean MBO attributes are set with the NOACCESSCHECK flag, which determines whether the MBO attribute value can be modified irrespective of whether the attribute is readonly (true) or not (true or false). For attribute bindings