Execution class mapping
To map a business class to an execution class, you must specify the name of the execution class in the BOM Editor.
You define the execution class in the Execution name field of the BOM to XOM Mapping section of the BOM Editor. For complex mapping, you can use a tester to test the instances of the execution class by using rule language mapping.
When you run the rules, the execution class is used instead of the business class whenever needed.
-
When the business class is a utility class, map it to void.
-
When the business class is an enumerated class, do not provide a tester.
-
When you do provide a tester, write it carefully so that it filters out all non-matching class instances, by returning false.
For example, you can map the business class RichCustomer
to
an execution class Customer
: In the BOM Editor, in
the BOM to XOM Mapping section, type a rule language statement that
returns a Boolean value in the Tester field. Use this to represent
the current object. For example:
return this.money > 100000;
If members of the business class are not explicitly mapped, the BOM-to-XOM mechanism assumes that they are the same as the members of the execution class. The following table describes how the BOM-to-XOM mechanism uses these members:
Member of business class BusinessClass | Case | Mapping to execution member of class ExecutionClass |
---|---|---|
Constructor BusinessClass(MyBizClassB, MyBizClassC) | Call by new | Constructor ExecutionClass(MyClassB, MyClassC) |
Attribute MyBizClassA attr |
Assignment | Attribute attr (not read-only) |
Access | Attribute attr (not write-only) |
|
Method MyBizClassA myBizMethod(MyBizClassB, MyBizClassC) |
Invocation | Method MyClassA myMethod(MyClassB, MyClassC) |
BusinessClass is used | Use of operator InstanceOf , or cast, or classification
in conditions |
ExecutionClass |