trigger preRequest
System trigger for handling any global pre-processing, such as verifying the environment or user permissions.
Declaration: |
|
Applies to: |
|
Activation: |
Activated before the preActivate trigger and activation of the requested operation |
Default behavior: |
Executes done |
Behavior upon completion: |
If the trigger returns a positive value in $status, the preActivate trigger is activated, followed by the requested operation. Otherwise:
|
Description
The preRequest trigger allows global pre-processing to be centralized in a single trigger. Generic ProcScript should be placed in this trigger, rather than duplicated in each component. Typical uses of this trigger include environment verification, such as checking user rights or permissions, log file or audit file record keeping.
This trigger is fired as part of every web request made by the Web Request Dispatcher (WRD). The SOAp Request Dispacher (SRd) and other types of call-in do not fire this trigger.
The activation sequence of the preRequest, postRequest, preActivateand postActivate triggers in a web environment is shown in the following table:
preRequest return status | preActivate return status | exec or other operation | postActivate | postRequest | WRD status |
---|---|---|---|---|---|
$status = -21 | Not executed | Not executed | Not executed | Not executed | -21 |
$status < 0 | Not executed | Not executed | Not executed | Not executed | 0 |
$status >= 0 | $status = -21 | Not executed | Not executed | Executed | -21 |
$status >= 0 | $status < 0 | Not executed | Not executed | Executed | 0 |
$status >= 0 | $status >= 0 | Executed | Executed | Executed | 0 |
Triggers and operations are activated from left to right, depending on the $status returned by previous triggers.