External Automatic Entry Example

In this example, two applications, named INQUIRIES and RETRIEVALS, communicate with each other by means of external Automatic Entries.

The INQUIRIES application allows users to inquire on product details, using an <<ispec>> class called PINQ. PINQ has the following properties:

(Name)

PINQ

Alias

PINQ

Stereotype

Ispec

PresentationType

Fixed, Combo, or Graphic

IsExternal

False

Has persistent members

No (None of the attributes of the class are persistent)

Has keys

No (none of the attributes of the class is a key)

All product details are stored in the RETRIEVALS application, in the <<ispec>> class called PROD. PROD in RETRIEVALS has the following properties:

(Name)

PROD

Alias

PROD

Stereotype

Ispec

PresentationType

None

IsExternal

False

Has persistent members

Yes (the class owns persistent attributes)

Has keys

One (O-PRODN)

To enable INQUIRIES to perform the external Automatic Entries, it also has a matching <<external ispec>> class called PROD.

Note: NB: PROD records are not stored in the database of the INQUIRIES application.

PROD in INQUIRIES has the following properties:

(Name)

PROD

Alias

PROD

Stereotype

External Ispec

PresentationType

Not Applicable

IsExternal

True

Has persistent members

No (the class does not own persistent attributes)

Has keys

No

In this example, PINQ sends an inquiry to PROD, which extracts the required information from the RETRIEVALS database, and sends the results of the inquiry back to PINQ.

Conventions

The following naming conventions are used throughout this example:

Ispecs Attributes and Options

The PROD Ispec must have its AutomaticEntryCapable attribute set to True. The following attributes make up the PROD <<ispec>> class in the RETRIEVALS application:

Attribute

IO-PRODN

(Name)

IO-PRODN

IsKey

Yes

Direction

InOut

Persistence

Yes

Type

Number

Length

10

Decimals

0

Description

Product Name

Attribute

IO-PRICE

(Name)

IO-PRICE

IsKey

No

Direction

InOut

Persistence

Yes

Type

Number

Length

8

Decimals

2

Description

Selling Price

The Agile Business Suite requires that a server <<Ispec>> class in a destination application must have an exact counterpart in the client application. For this reason, the PROD <<Ispec>> class must also be defined in the INQUIRIES application, with identical attributes, so that the Automatic Entry Buffers match.

Attribute

IO-PRODN

(Name)

IOPRODN

IsKey

No

Direction

InOut

Persistence

No

Type

Number

Length

10

Decimals

0

Description

Product Name

Attribute

IO-PRICE

(Name)

IOPRICE

IsKey

No

Direction

InOut

Persistence

No

Type

Number

Length

8

Decimals

2

Description

Selling Price

The PROD <<ispec>> class in INQUIRIES must have the IsExternal property set to true. This enables you to define PROD in the INQUIRIES application with attributes that are not persistent, indicating that a database structure is not required. It must also have the AutomaticEntryCapable property set to True.

The PINQ <<ispec>> class performs the external Automatic Entry and exists only in the INQUIRIES application, with the following attributes:

Attribute

IN-MAINT

(Name)

IN-MAINT

IsKey

No

Direction

InOut

Persistence

No

Type

String

Length

3

Description

 

Attribute

IN-PRODN

(Name)

IN-PRODN

IsKey

No

Direction

InOut

Persistence

No

Type

Number

Length

10

Decimals

0

Description

Product Name

Attribute

IN-PRICE

(Name)

IN-PRICE

IsKey

No

Direction

InOut

Persistence

No

Type

Number

Length

8

Decimals

2

Description

Selling Price

Ispec Logic