Pass Rule Objects in Preference to Passing IDs

When you use the create expression to create an internal rule object, you can pass data to the new rule object by use of the initialization block and/or specify elements.

If the data you are passing includes a reference to external data that has an identifier (e.g. a case, identified by a caseID), consider designing the rule class for the created rule object so that it is initialized with a rule object that represents that data rather than being initialized by an ID value.

The use of such a rule object for initialization can increase the "type safety" of your data - it may help prevent another rules designer from creating their own internal rule objects for the same rule class but accidentally passing an ID that represents a different kind of external data.

It is likely that passing the wrong kind of ID will cause rules to fail at run time (e.g. because an attempt to convert a rule object for that ID will not find the underlying data); whereas passing a rule object for type safety will allow the CER rule set validator to detect the problem at design time.