The Survivorship Rule Source Objects bind can be used from business actions referenced from a 'business action survivorship rule' to access the source object for a golden record. For the 'merge approach', this is the only way to access source records from a survivorship rule business action.
The bind can be found within the 'Binds to' dropdown, as shown below.
Configuration
To use any bind:
Example
The following is example JavaScript that uses this 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.
var attr = golden.getManager().getAttributeHome().getAttributeByID('YOUR_OWN_ATTRIBUTE_ID_HERE');var goldenValue = golden.getValue(attr.getID()).getSimpleValue();
var hasGoldenValue = (goldenValue != null);println("golden value ".valueOf() + goldenValue + " has gv: " + hasGoldenValue);for (var it = srcObjs.iterator(); it.hasNext();) {var src = it.next();
var value = src.getValue(attr.getID());
var srcValue = value.getSimpleValue();
var hasSrcValue = (srcValue != null);
println("src value: ".valueOf() + srcValue); if (hasSrcValue) { if (!hasGoldenValue || java.lang.Integer.parseInt(goldenValue) < java.lang.Integer.parseInt(srcValue)) { println("updating golden value to: " + srcValue);golden.setSimpleValue(attr, srcValue);
goldenValue = srcValue;
}
}
}
2019, Stibo Systems – Confidential