SYSTEM.COORDINATION_OPERATION
This system variable works with its companion SYSTEM.MASTER_BLOCK to help an On-Clear-Details trigger determine what type of coordination-causing operation fired the trigger, and on which master block of a master/detail relation.
The values of the two system variables remain constant throughout the clearing phase of any block synchronization. SYSTEM.MASTER_BLOCK represents the name of the driving master block, and SYSTEM.COORDINATION_OPERATION represents the coordination-causing event that occurred on the master block.
The Clear_All_Master_Details procedure, which is automatically generated when a relation is created, checks the value of SYSTEM.COORDINATION_OPERATION to provide special handling for the CLEAR_RECORD and SYNCHRONIZE events, which may be different from the handling for other coordination-causing events. The Clear_All_Master_Details procedure also checks the value of SYSTEM.MASTER_BLOCK , to verify that while it is processing the master block of a relation coordination, it is searching only for blocks containing changes.
For example, given the relation hierarchy between blocks shown below, moving
to the next record using the [Next Record] key or the Record, Next menu command
while in Block C would cause blocks E, F, G, and H to be cleared (and perhaps
subsequently queried, depending on the Deferred_Coordination property of the
CE
and the C
F
relations).
When the On-Clear-Details trigger fires for block C, the result is:
:System.Cooordination_Operation = 'NEXT_RECORD'
:System.Master_Block = 'C'
The Clear_All_Master_Details procedure will clear all of block C's details, causing a "chain reaction" of Clear_Block operations. Consequently, block F is cleared.
Since F is a master for both G and H, and it is being cleared, an On-Clear-Details trigger will fire for block F as well. However, since the clearing of block F was driven (indirectly) by a coordination-causing event in block C, these remain the values in the On-Clear-Details trigger for block F:
:System.Cooordination_Operation = 'NEXT_RECORD'
:System.Master_Block = 'C'
Note: The values of these two system variables are well-defined only in the scope of an On-Clear-Details trigger, or any program unit called by that trigger. Outside this narrow context, the values of these two variables are undefined and should not be used.
The possible values of SYSTEM.COORDINATION_OPERATION, when it is appropriate to check that variable, are described in the following table.
Value |
Description |
Caused By |
---|---|---|
MOUSE |
Mouse to non-current record |
Mouse |
UP |
Move up a record |
Menu, key, PL/SQL |
DOWN |
Move down a record |
Menu, key, PL/SQL |
SCROLL_UP |
Scroll up records |
Menu, key, PL/SQL |
SCROLL_DOWN |
Scroll down records |
Mouse, key, PL/SQL |
CLEAR_BLOCK |
Clear current block |
Menu, key, PL/SQL |
CLEAR_RECORD |
Clear current record |
Menu, key, PL/SQL |
CREATE_RECORD |
Create new record |
Mouse, menu, key, PL/SQL |
DELETE_RECORD |
Delete current record |
Menu, key, PL/SQL |
DUPLICATE_RECORD |
Duplicate current record |
Menu, key, PL/SQL |
FIRST_RECORD |
Move to first record |
PL/SQL |
LAST_RECORD |
Move to last record |
PL/SQL |
NEXT_RECORD |
Move to next record |
Mouse, menu, key, PL/SQL |
PREVIOUS_RECORD |
Move to previous record |
Mouse, menu, key, PL/SQL |
GO_RECORD |
Jump to record by number |
PL/SQL |
ENTER_QUERY |
Enter Query mode |
Menu, key, PL/SQL |
EXECUTE_QUERY |
Execute query |
Menu, key, PL/SQL |
COUNT_QUERY |
Count queried records |
Menu, key, PL/SQL |
NEXT_SET |
Fetch next set of records |
Menu, key, PL/SQL |
SYNCHRONIZE_ BLOCKS |
Resume after commit error |
Internal only |