Context dictionary

Classic Function Function code GESACTX

A context code is the description of a variable that will be present in the context class. This class identifies the context execution of a version 7 session and includes the definition of the current folder, the current user, and other useful information including general parameter values.

More information about the use of context is available in the Developer Guide Context.

When creating or updating a context code, it is necessary to enter the following information:

Header Main information Description Format Sizing formula Initialization

Additional information:

Validation Errors list

Header information

This section contains information that identifies the context code:

  • The code that will be the property name in the structure.
  • A label describing the variable.

Main information

The first section defines the main characteristics of the context code:

  • The context chapters are defined in miscellaneous table 96 and used to organize the context codes. Except for some context codes defined by the Supervisor, all the context codes must have a specified chapter, and new chapters can be created if needed. The naming rules for chapters are the same as the rules defined for naming properties, tables, and classes.
  • The rank defines in what order the properties of the WMACONTEXT class will be defined.
  • The activity code is used if the code is optional (it will not be created if the value associated with the activity code is 0 or false). If it is a specific code, the code will begin with X,Y, or Z.
  • The Public check box is selected if the context code is documented and used by the development partner's community. If not, it is used internally.

Description

The second section contains a documentation text explaining the purpose of this context code. It is usually filled when the Public check box is selected.

Format

The third section defines the characteristics of the property in the context code:

  • The data type (input) or internal type (display only).
  • Optionally, the length.

Sizing formula

The fourth section defines a dimension formula used if the code is an array with a dimension. This dimension can be computed through a formula (the value associated with an activity code), while the formula can be a constant.

Initialization

This section describes how this context code is initialized. Except for some special context codes defined by the Supervisor, each context code must specify how it will be initialized using a parameter, a formula, or a piece of code.

  • The parameter is used if the code corresponds to a global parameter value.
  • The formula can be used to assign a computed value.
  • The initialization program defines lines of code that will be stored in the WMACONTEXT class and run during initialization. Make sure the piece of code compiles; otherwise, the validation of context will fail.
  • The Load on demand check box defines how the initialization is performed.
    • If cleared, the initialization will occur when the class is instantiated.
    • if selected, the initialization will occur the first time the class value is accessed (by using an accessor attached to the class property). Selecting the Load on demand check box is recommended because it decreases the time spent for the initialization of a context. In version 6, a significant connection time is spent by filling the global variable. Thus, the connection time will be much shorter if this check box is cleared only for few codes.

Validation

A newly created context code will be taken into account only after a successful context validation. If the validation fails, the last validated version is applied. The validation generates a context class named WMACONTEXT. This context class includes the following:

  • Directly attached properties such as the user code, login code, language code, and so forth.
  • Instances of classes attached to every group code. The classes are called WMACONTEXT GROUP, where GROUP is the code of the group.
  • Additional technical information such as a cache that manages the parameter values.

Error list

The following are error messages that appear when saving a context code:

Please enter a value for the context chapter.
Please provide a parameter, a formula or an initialization processing.
The description must be entered for a published variable.