Problem
The primary address flag was not updated in the HCA as requested through DCR.
{
"uri": "changeRequests/1CkKScm4",
"createdBy": "dcr_integration_user",
"createdTime": 1595274027955,
"updatedBy": "<user>",
"updatedTime": 1595332646460,
"changes": {
"entities/0P6lKQw": [
{
"id": "1CkKSYVo",
"refObjectURI": "relations/0VJ2Mvu",
"type": "UPDATE_ATTRIBUTE",
"createdTime": 1595274027955,
"createdBy": "dcr_integration_user",
"attributePath": "PrimaryAddressIndicator/p4fDLSQ",
"oldValue": {
"value": "false"
},
"newValue": {
"value": "true"
},
"crosswalk": {
"type": "configuration/sources/Reltio",
"value": "0VJ2Mvu",
"dataProvider": true
},
"newPinOrIgnoreValue": false,
"attributeType": "configuration/relationTypes/HasAddress/attributes/PrimaryAddressIndicator",
"refAttributeType": "configuration/entityTypes/HCA/attributes/Address/attributes/PrimaryAddressIndicator"
},
{
"id": "1CkKSUFY",
"refObjectURI": "relations/0VJ2Mvu",
"type": "UPDATE_ATTRIBUTE",
"createdTime": 1595274027955,
"createdBy": "dcr_integration_user",
"attributePath": "Status/p4fDHCA",
"oldValue": {
"value": "Active",
"lookupCode": "ACTI",
"lookupRawValue": "ACTI"
},
"newValue": {
"value": "Active",
"lookupCode": "ACTI",
"lookupRawValue": "Active"
},
"crosswalk": {
"type": "configuration/sources/Reltio",
"value": "0VJ2Mvu",
"dataProvider": true
},
"newPinOrIgnoreValue": false,
"attributeType": "configuration/relationTypes/HasAddress/attributes/Status",
"refAttributeType": "configuration/entityTypes/HCA/attributes/Address/attributes/Status"
}
]
},
"type": "configuration/changeRequestTypes/default",
"state": "APPLIED"
}Troubleshooting
Review the activities for the entityID in question.
GET https://<environment>.reltio.com/reltio/api/<tenantid>/entities/<entityId>/_activities
Find the change request defined in the DCR
"timestamp":,
"items": [
{
"id": "2l7sFgD1",
"user": "<user>",
"method": "POST",
"url": "/reltio/api/<tenantId>/changeRequests/1CkKScm4/_apply",
.......
{
"type": "ATTRIBUTE_CHANGED",
"attributeType": "configuration/relationTypes/HasAddress/attributes/PrimaryAddressIndicator",
"newValue": {
"value": "true",
"ov": true,
"id": "p4fDLSQ",
"sources": [
"IDLHCM2016"
]
},
"oldValue": {
"value": "false",
"ov": false,
"id": "p4fDLSQ",
"sources": [
"IDLHCM2016",
"Reltio"
]
}
Determine if there are any other activities that occurred after or at the same time as the DCR.
{
"uri": "activities/e7a9259b-e732-41a2-87d3-1d8ba78e5244",
"user": "<user>",
"label": "",
"description": "",
"timestamp": 1595332652942,
"items": [
{
"id": "2l7sFTQF",
"user": "<user>",
"url": "/reltio/api/<tenant>/relations/0VJ2Mvu/attributes/PrimaryAddressIndicator/22KPgnE9v",
"clientType": "Life Cycle Action",
.....
"delta": [
{
"type": "ATTRIBUTE_CHANGED",
"attributeType": "configuration/relationTypes/HasAddress/attributes/PrimaryAddressIndicator",
"newValue": {
"value": "true",
"ov": true,
"id": "p4fDLSQ",
"sources": [
"IDLHCM2016",
"Reltio"
]
},
"oldValue": {
"value": "false",
"ov": false,
"id": "p4fDLSQ",
"sources": [
"IDLHCM2016"
]
}
}In a review of the entity activities, initially, the customer made a change to the primary address which turned the flag to true. Next, the next LCA hook was called and change the flag to false
The LCA has an "afterReferenceAttributeAdded" hook.
IAttributes attributes = object.getAttributes();
ICrosswalks crossWalks = object.getCrosswalks();
defaultAttributeValueService.defaultValueForReferenceAttribute(object, reltioAPI, "Address", "Status", "ACTI");
List<IAttributeValue> primaryFlagAttrValues = null;
List<IAttributeValue> attributeValues = object.getAttributes().getAttributeValues("Address");
//Verify the PrimaryFlag state
if (primaryFlagVerificationService.verifyReferenceAttributePrimaryFlag(attributeValues, "PrimaryAddressIndicator", primaryFlagAttrValues, "Status", "ACTI")) {
PrimaryFlagActionUtil.generatePrimaryFlagAttribute(object, reltioAPI, attributeValues, primaryFlagAttrValues, "PrimaryAddressIndicator", true, "Status", "ACTI");
} else {
defaultAttributeValueService.defaultValueForReferenceAttribute(object, reltioAPI, "Address", "PrimaryAddressIndicator", "false");
}
So, before saving the entity, the value of the primary flag was changed to default.
Solution
For testing, you can try to update this entity by disabling LCA and API call used
POST- {{tenant_url}}entities/<entityId>/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk&executeLCA=false
body-[
{
"type": "UPDATE_ATTRIBUTE",
"uri": "entities/<entityId>/attributes/Address/eTtwOKz/PrimaryAddressIndicator/1cYpEyJCX",
"newValue": {
"value": "true"
},
"crosswalk": {
"type": "configuration/sources/Reltio",
"value": "eTtwOKz"
}
}
]
Comments
Please sign in to leave a comment.