REQUEST operator
The REQUEST
operator creates an action that requests a value.
Syntax
REQUEST requestAction
DO doAction [ELSE elseAction]
Description
The REQUEST
operator creates an action that allows the separation of a request for a value from its handling.
Parameters
-
requestAction
A context-dependent action operator that requests a value.
-
doAction
A context-dependent action operator that is executed if the input was completed successfully.
-
elseAction
A context-dependent action operator that is executed if the input was cancelled.
Examples
requestCustomer (Order o) {
LOCAL resultValue = STRING[100] ();
REQUEST {
ASK 'Choose from list?' DO
DIALOG customers OBJECTS c = resultValue() CHANGE;
ELSE
INPUT = resultValue() CHANGE;
} DO
customer(o) <- resultValue();
}
FORM request
OBJECTS o = Order
PROPERTIES(o) customer ON CHANGE requestCustomer(o) // for example, group change will be performed
;