Making a function traceable
Because functions use Java code, there are no referencing rules, so you lose traceability when you call a function. To accommodate this restriction, you can map one or more of your input parameters to key parts of a specific rule type. Defining these associations supports traceability by updating the referencing rules for each collection that calls your function.
Example
The following example defines a reference between the CodeID function parameter and a Rule-PendCode rule instance, and instanciates it at run time:
- Create the AddPendCode function with an input parameter that is named CodeID.
- Map the CodeID parameter to the name key part of the Rule-PendCode class.
- Create the ProcessPendCodes collection that calls the AddPendCode function and passes 17 as the CodeID value.
- Open the tracer and process the collection. The tracer shows a reference between the ProcessPendCodes collection and the instance of Rule-PendCode named 17.
To map an input parameter to a rule type (step 2 in the example above), complete the following steps: