Ispecs (ispec-stereotyped classes) represent an entity in the business world, such as a customer, product, or vendor.
Ispecs have inherent behavior related to:
Control of the ispec processing cycle and error handling, which includes:
Initializing non-interface and non-persistent variables.
Performing appropriate validation of input variables, including automatic look-ups, value-checking logic, numeric validation, date validation, and ascertaining the presence of required variables.
Invoking the Prepare method.
Invoking the Main method.
Assembling error and/or output messages for transmission to the application user.
All ispecs have the following inherent members:
Built-in Construct, Prepare, and Main ispec methods.
In a Standard mode model, for an Ispec, the standard methods that can be added using the Add menu are Construct, Prepare, and Main. However, if you want to add a user-defined method, you could do so by using the Add New Item dialog box.
Also note that, in a Standard mode model, if an Ispec does not have a presentation defined (PresentationType=None) then it is not valid to use the standard methods of Construct, Prepare, and Main, and therefore these methods will not appear on the Add menu.
Persistent ispecs with at least one attribute that has the Is Key property set to true also have an inherent Maint built-in attribute.
The default window is Members.
Ispec Usage
Ispecs can belong to one of the following categories:
Input
These ispecs have a user interface (PresentationType property set to a value other than None), but no persistent attributes (IsPersistent property set to false).
Input ispecs do not perform an implicit automatic update of the database at the end of their Main method.
Output
These ispecs have no user interface (PresentationType property set to a value other than None), but they do have persistent attributes (IsPersistent property set to true).
Output usage ispecs do not have any inherent behavior, as they are used solely to define database tables. However, they can have explicitly defined methods, which can be invoked independently of the Agile Business Suite processing cycles.
Any attribute within the Segment class with IsPersistent=True, retains their value across ispec transactions within one session.
Example with the SAMPLE application:
Declare the MENU class with multiplicity=1 and Ispersistent=True In the “Construct Menu” Me attention MENU.ACTION2 In the “Prepare Menu” My ACTION2 MENU.ACTION2
With this construct, when we execute the MENU ispec for the first time, the value for MENU.ACTION2 does not get displayed, but when the system displays the last value entered in the ACTION2 field this value “MENU.ACTION2” is stored as session attribute and each user can have a different value.
I/O (input-output)
These ispecs have both a user interface (PresentationType property set to a value other than None) and persistent attributes (IsPersistent property set to true).
Ispecs perform an automatic update of the database, provided Glb.Error has not been set to "*****".
Depending upon usage type, ispecs might also have additional inherent characteristics. These characteristics vary accordingly with the addition and removal of persistent attributes and/or user interfaces.
Refer to Ispec Properties for properties applicable to ispecs.
Persistence
Database Persistence
The typical usage of this property is to define columns in a database table. When you set IsPersistent on one or more attributes within an Ispec or a Class with no stereotype to True, it would mean that a database table is created representing the class and that all IsPersistent attributes will become columns within that database table. For example,
Ispec: Customer
Customer_Id IsPersistent = True
Name IsPersistent = True
Address IsPersistent = True
This example results in a database table called “Customer” with columns “Customer_Id”, “Name” and “Address” being created. Note that the Customer element itself does NOT have IsPersistent = True.
Session Persistence
For attributes that are members of a Segment class, setting IsPersistent to True would mean that they are session persistent. This means that these values are retained for the duration of a user session. They will not be initialized during the ispec runtime cycle, but will retain any values assigned to them. These can be used to pass data from one ispec transaction to another within a single user session.
This can apply to both primitive and non-primitive attributes. Typically, these attributes will retain the values for the duration of a single user session. When the user signs off and later starts a new session these attributes are initialized at the start of the new session. However, if you set the “Preserve Session Data” Windows configuration property, then the value of these session persistent attributes carries over from one session to the next (by the same user).
The following table shows the session persistence support information for MCP and Windows® Runtime:
Session Attribute Type | MCP Runtime |
Windows® Runtime | |
---|---|---|---|
Primitive | Supported | Supported | |
<Group> Stereotyped Class | Supported | Supported | |
All Other Classes | Unsupported | Supported |