Using Method Arguments for Top-Down and Bottom-Up Methods
Attribute implementation values being input, output or both, are listed as method arguments for a method. Additionally, related attributes (which are derived from the input arguments or used to calculate the output arguments are also available in hooks. This is specified in the next subsection.
The naming of attribute implementations as used in method hooks is comparable to the naming as used in attribute hooks (see section Guidelines on Using or Setting Attribute Implementation Values). In other words, the attribute implementation names are used, and a prefix (‘i.’, ‘o.’ or ‘io.’) indicates whether the value is input, output or both. However, for attribute hooks it is predefined which attributes are inputs, output or input/output, but for method hooks this depends on the settings of the method argument implementations.
Let’s assume a method exists having the following attribute implementations listed as method argument implementations:
- orderNumber, input: i.orderNumber
- businessPartner, input: i.businessPartner
- deliveryDate, input/output: io.deliveryDate
- orderStatus, output: o.orderStatus
- deliveryAddress, output: o.deliveryAddress
The following table shows what parameters for these attribute implementations can be used in before/on/after execute hooks for this method.
Hook | Arguments |
---|---|
before execute | Input and input/output arguments can be used, read-only:
i.orderNumber, i.businessPartner, i.deliveryDate
Output arguments cannot be used (technically, parameters i.orderStatus and i.deliveryAddress may be available, but they will not be filled) |
on execute | Input arguments can be used, read-only: i.orderNumber,
i.businessPartner
Input/output arguments can be used and set in the hook: io.deliveryDate Output arguments are set in the hook: o.orderStatus, o.deliveryAddress |
after execute | Input, input/output and output arguments can be used, all are read-only: i.orderNumber, i.deliveryDate, i.orderStatus, i.businessPartner, i.deliveryAddress |
In case attribute grouping is used, the attribute implementation names by default contain the path, using underscores. For example, if the following structure exists:
Component ‘Order’ -> group ‘Customer’ -> group ‘Address’ -> attribute ‘city’
then the attribute implementation name will be:
‘Customer_Address_city’.