Defining Decision Table Relationships [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Self-Paced Training Guide
Defining Decision Table Relationships
Menu Path
To access the Decision Table Relationships
screen:
1. From the main menu, select the Logic option.
2. Select the Decision Tables option.
3. Choose Relationships.
Screen Description
This screen allows you to connect the various decision table components
together. It allows you to define the combinations of questions that
result in certain actions being executed.
It contains a series of Yes, No, or Don't Care responses to the questions
and an ordered list of the actions to be performed if those results
occur.
Decision Table Relationships Screen
To enter the field values:
1. Make the entries on the screen as shown in the table below:
Field Entry Explanation
---------------------------------------------------------------------------------------
Decision Table Name Press Return This field defaults to prod_opt_update, the
name used in the last decision table
screen.
Table 10-0. (cont.)
Field Entry Explanation
---------------------------------------------------------------------------------------
Column Number Accept the default. This is the number of the column or set of
relationships that you are about to define.
You can define up to 31 columns.
Amendment Mode Accept the default. The entry for this field allows you to
choose what you want to do with this
particular column, A = add or amend, and D
= delete.
Questions Make the entries The first column of fields (Number column)
listed below. refers to the questions defined on the
decision tables questions screen. They are
Number - Response numbered in the same order as they were
defined. The second column of fields
1...........Y (Response column) refers to the answers to
the questions. The responses default to -.
2...........- This means that the outcome of the question
has no bearing on the column.
3...........-
If you enter Y the question must be
4...........Y resolved as true for the column to be
valid. If you enter N the question must be
5...........- resolved as false for the column to be
valid. All eight criteria must be met for
6...........- the column to be valid.
7...........- This column is resolved as true when both
V-mode is equal to C-add and
8...........- V-current_record is equal to C-product.
This is effectively stating that a product
record must be added.
Field Entry Explanation
---------------------------------------------------------------------------------------
Actions Complete the column as listed. This column specifies the actions that are
to be performed, and the order in which
they are performed. A set of display
Action - Order of Exec. fields show the names of the actions you
have already defined.
F-add_product.......1
The column to the right (Order of
F-modify_product....0 Execution) initially defaults to all 0s.
The default (0) means don't do this action.
F-delete_product....0 The numbers specified next to the action
indicate which actions are executed if the
F-add_option........0 column resolves as true, and also indicate
the order in which the actions are
F-modify_option..... 0 performed if more than action one is
executed.
F-delete_option..... 0
The numbers you specify must be contiguous
..................... 0 and a number cannot occur more than once.
For example, 10204000 is not valid as the 3
......................0 is missing. It should read 10203000.
Similarly, the entry 00220104 is not valid
as the 2 appears twice. It should be
either 00230104 or 00320104.
This relationship executes the add_product
function if the column is resolved as true.
Column Add prod/base option This is a comment field that allows you to
Definition enter a description of what the column
does. It has no operational effect.
2. When you have entered all of the data, press the Commit Data
function key.
To complete the remaining columns for the decision table:
There are five more columns to be created for this decision table.
1. Complete the columns as shown.
a. Column 2
Question Response Action Order
1 Y F-add_product 0
2 - F-modify_product 0
3 - F-delete_product 0
4 - F-add_option 1
5 Y F-modify_option 0
6 - F-delete_option 0
7 - 0
8 - 0
Column Definition: Add the Option
b. Column 3
Question Response Action Order
1 - F-add_product 0
2 Y F-modify_product 1
3 - F-delete_product 0
4 Y F-add_option 0
5 - F-modify_option 0
6 - F-delete_option 0
7 - 0
8 - 0
Column Definition: Modify the Product
c. Column 4
Question Response Action Order
1 - F-add_product 0
2 Y F-modify_product 0
3 - F-delete_product 0
4 - F-add_option 0
5 Y F-modify_option 1
6 - F-delete_option 0
7 - 0
8 - 0
Column Definition: Modify the Option
d. Column 5
Question Response Action Order
1 - F-add_product 0
2 - F-modify_product 0
3 Y F-delete_product 1
4 Y F-add_option 0
5 - F-modify_option 0
6 - F-delete_option 0
7 - 0
8 - 0
Column Definition: Delete the Product
e. Column 6
Question Response Action Order
1 - F-add_product 0
2 - F-modify_product 0
3 Y F-delete_product 0
4 - F-add_option 0
5 Y F-modify_option 0
6 - F-delete_option 1
7 - 0
8 - 0
Column Definition Delete the Option
This completes the definition of the decision table.
2. Generate the decision table by pressing the Generate D.Table
function key on the decision table relationships screen.
You have now created most of the necessary dictionary items, data
screens, functions and processes to drive the application.
Testing the Modified Application
There are a number of further items that you need to create before the
application is complete. The remaining items are the file update
functions (the logic blocks that actually add, modify, and delete records
in the appropriate files), the scrolling functions, some messages, and a
report.
However, you can now test part of the application if you wish. You can
select any of the modes on the main menu and display the product screen.
Since you haven't created the file updating functions yet, you won't be
able to perform any valid operations on the files.
MPE/iX 5.0 Documentation