Example
For top-level and child components the input and output method arguments for the method hooks are described here using examples.
In these examples we assume that the following structure exists:
- Component Order
- Attribute orderNumber
- Group Customer
- Attribute name
- Component Line
- Attribute lineNumber
- Attribute item
Let's furthermore assume that the orderNumber is a calculated attribute and internally two attribute implementations exist: orno1 and orno2
The following attribute implementations are listed as method argument implementations:
| Component | List | Show |
|---|---|---|
| Order | Input: none
Output: orderNumber, Customer_name |
Input/output: orderNumber
Output: Customer_name |
| Line | Input: orno1, orno2 (*) Output: lineNumber, item | Input: orno1, orno2 (*)
Output: lineNumber, item |
(*) Do not use orderNumber here!
If two orders exist, where the first one has two lines and the second one has no lines, the hooks will be invoked as follows:
| Component - Hook | Notes | |
|---|---|---|
| Order - Before execute | ||
| Order - On execute | Fetches first order | |
| Line - Before execute | ||
| Line - On execute | Fetches first line | |
| Line - After execute | ||
| Line - Before execute | ||
| Line - On execute | Fetches second line | |
| Line - After execute | ||
| Line - Before execute | ||
| Line - On execute | Fetches nothing | |
| Line - After execute | ||
| Order - After execute | ||
| Order - Before execute | ||
| Order - On execute | Fetches second order | |
| Line - Before execute | ||
| Line - On execute | Fetches nothing | |
| Line - After execute | ||
| Order - After execute | ||
| Order - Before execute | ||
| Order - On execute | Fetches nothing | |
| Order - After execute | ||
The 'after execute' hook is invoked even though nothing is fetched, to enable cleaning up any data or state that was initialized in the 'before execute' or 'on execute' hook.