ILOG JRules User Guide > Creating Rule Projects > Tasks > Defining How Business Elements Map to the XOM > Accessing Ruleset Variables and Parameters from IRL Mapping Code

You can access ruleset variables and parameters from the IRL mapping code. Extender mapping does not allow you to do this.

To access ruleset variables or parameters:

  1. In the Outline view, click the member that contains the IRL mapping you want to edit.
  2. In the BOM Editor, open the BOM to XOM Mapping section, and go to the IRL statement in the Body field.
  3. Use the method IlrContext.getParameterValue to access the ruleset variable or parameter.
  4. Save the BOM.

In this example, there is a parameter business class customer b.Customer, and the business class b.Customer is being mapped to x.Customer. You can access the parameter in the IRL mapping by writing:

x.Customer customer = (x.Customer)getParameterValue("customer");

Related Concepts

Business Object Model (BOM)
Execution Object Model (XOM)
BOM and XOM

Related Tasks

Defining How Business Elements Map to the XOM
Managing XOM Changes in the BOM

Related Reference

BOM Editor
ILOG Rule Language

Related Samples and Tutorials

Tutorial: Defining a Vocabulary