Previous Topic: Add Exception Logic to a CREATE Entity ActionNext Topic: Add READ Action


Add READ Entity Action

Adding a READ entity action consists of the following subordinate activities:

The READ entity action retrieves a single occurrence or multiple occurrences of one or more entity types that satisfy the selection criteria that you specify. The READ entity action makes one or more entity occurrences available for further action.

The READ action statement takes the following form:

READ entity-view-list
[WHERE selection-condition]
[WHEN successful
action-statement-list-1]
[WHEN not found
action-statement-list-2]

The first line indicates the READ action and the entity action view(s) being read. The second line indicates the selection criteria for the READ. The remaining lines indicate the two types of exception statements used in the READ and statement lists specifying actions to take if the exception occurs.

Downstream Effects: To reduce the use of cursors in the DBMS, CA Gen generates a standalone SQL SELECT statement for Action Diagram READ statements that: select only one row, are not referenced by UPDATE, ASSOCIATE, DISASSOCIATE, or DELETE statements, or do not read persistent views.

Note: For more information about the code generated for a READ statement, see the Toolset Help.

More information:

Creating Views