Pair of Attribute Values Bind

Business rules can use the Pair of Attribute Values bind to compare attribute values, using the Data Container survivorship rules to determine whether the data container instances on the source records are the same as on the data container instances on the golden records.

If a check of individual attributes between the source and golden records is required to determine when the source record data container should overwrite the golden record data container, the Pair of Attribute Variables bind can be created for each attribute to be compared.

This bind is in the Public API under com.stibo.core.domain.value.simplevaluepair.

The selected attribute is bound to the variable.

The bind can be found within the 'Binds to' dropdown as shown below.

Configuration

To use any bind:

  1. Create a business rule as defined in the Creating a Business Rule, Function, or Library topic.

  2. Edit the business rule as defined in the Editing a Business Rule or Function topic.

  3. In the Edit Operation dialog, add the bind to a business rule, as defined in the Adding a Bind topic in the Resource Materials online help documentation.

  4. In the Edit Operation dialog, optionally add Messages, as defined in the Localized Messages for JavaScript Business Rules topic.

  5. In the Edit Operation dialog, add JavaScript to call the bind.

Important: The example scripts should not be used as-is without thorough testing, including updating the script to match object and link types that exist on your system.

In this example, the Variable Name is 'email', the Binds to field is Pair of Attribute values, and the Parameters field displays the Email attribute used on a Data Container. The following JavaScript is used in a JavaScript Business Condition on the Data Containers Trusted Source or Most Recent Survivorship Rules, and compares the attribute values on the source object and golden record:

Copy
var s1 = email.getValue1();
var s2 = email.getValue2();
if(s1==s2){
return true;
}
 else{
return "Error"
}   

For more information on survivorship rules for data containers, refer to the Golden Record Survivorship Rule Types topic in the Matching, Linking, and Merging documentation.