LCA Error for Batch of Entities or Relations

Enhancements have been added to handle error associated with a batch of entities or relations.

While creating a batch of relations or entities for any relationType or entityType, multiple relations or entities requests are sent in one POST call. If one of the relations or entities has an issue with the associated LCA Hook, the response returns an error for the entire batch of relations or entities. The error message doesn't accurately convey the issue for the particular relation or entity and the entire batch is not persisted.

An enhancement has resolved this issue and the response now shows the proper error message for incorrect relation or entity only. The details for the other records in the batch are also displayed.

Note: If multiple LCAs are configured with the same entity or relation, the response displays errors collected from all the LCAs.
Table 1. Sample Request
Request Description
[	{"type":"configuration/entityTypes/HCP","attributes":{"FirstName":[{"value":"AAA2"}],"LastName":[{"value":"BBB2"}],"MiddleName":[{"value":"MMM2"}]},"Name":[{"value":""}],"Gender":[{"value":"F"}]},	{"type":"configuration/entityTypes/HCP","attributes":{"FirstName":[{"value":"AA#A3"}],"LastName":[{"value":"BBB3"}],"MiddleName":[{"value":"MMM3"}]},"Name":[{"value":""}],"Gender":[{"value":"M"}]},	{"type":"configuration/entityTypes/HCP","attributes":{"FirstName":[{"value":"AAA4"}],"LastName":[{"value":"BBB4"}],"MiddleName":[{"value":"MMM4"}]},"Name":[{"value":""}],"Gender":[{"value":"F"}]}
]
This request example consists of three entities. As per the configured LCA in this example, the FirstName of an entity cannot have any special character. However, in this example, entity A3 has the special character hash (#) in the FirstName (#A3).

Note that out of the three entities in the batch, only entity A3 has incorrect value as per the configured LCA.

Table 2. Sample Response
Behavior Response Description
Old Behavior Status Code: 200

Response:


Response
Status Code: 200
Response:
[
  {
    "index": 0,
    "errors": {
      "severity": "Error",
      "errorMessage": "Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}",
      "errorCode": 1004,
      "errorDetailMessage": "Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}"
    },
    "successful": false
  },
  {
    "index": 1,
    "errors": {
      "severity": "Error",
      "errorMessage": "Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some spacial characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}",
      "errorCode": 1004,
      "errorDetailMessage": "Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}"
    },
    "successful": false
  },
  {
    "index": 2,
    "errors": {
      "severity": "Error",
      "errorMessage": "Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}",
      "errorCode": 1004,
      "errorDetailMessage": "Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}"
    },
    "successful": false
  }
]
The response returns an error for the complete batch of entities. The status code 200 with the detailed error message, does not identify the actual issue for entity A3. Instead, throws the error for the complete batch of entities without persisting them.
New Behavior Status Code: 200

Response:

[
  {
    "index": 0,
    "object": {
      "uri": "entities/09Owxbk",
      "type": "configuration/entityTypes/HCP",
      "createdBy": "thirupathi.reddy@reltio.com",
      "createdTime": 1574831965997,
      "updatedBy": "thirupathi.reddy@reltio.com",
      "updatedTime": 1574831965997,
      "attributes": {
        "FirstName": [
          {
            "type": "configuration/entityTypes/HCP/attributes/FirstName",
            "ov": true,
            "value": "AAA2",
            "uri": "entities/09Owxbk/attributes/FirstName/1BkE09Cq"
          }
        ],
        . . .
      },
      "isFavorite": false,
      "crosswalks": [
        {
          "uri": "entities/09Owxbk/crosswalks/1BkE0ppQ",
          "type": "configuration/sources/Reltio",
          "value": "09Owxbk",
          . . .
        }
      ],
      "analyticsAttributes": {},
      "label": "AAA2 BBB2",
      "secondaryLabel": ""
    },
    "successful": true
  },
   {
    "index": 1,
    "errors": {
      "severity": "Error",
      "errorMessage": "1 errors occurred during Life Cycle Action execution: Code: LIFE_CYCLE_OPERATION_ERROR; Message parameters: [errorNameLCA/beforeSave, {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}]. Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}. Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}",
      "errorCode": 1005,
      "errorDetailMessage": "1 errors occurred during Life Cycle Action execution: Code: LIFE_CYCLE_OPERATION_ERROR; Message parameters: [errorNameLCA/beforeSave, {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}]. Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}. Error occurred in Life Cycle Action errorNameLCA/beforeSave: {severity=Error, errorMessage=The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~, errorCode=-1, innerErrorData={exception=java.lang.RuntimeException:The attribute configuration/entityTypes/HCP/attributes/FirstName has some special characters. The unsupported characters are: !$^*~}}"
    },
    "successful": false
  },
  {
    "index": 2,
    "object": {
      "uri": "entities/09Ox68G",
      "type": "configuration/entityTypes/HCP",
      "createdBy": "thirupathi.reddy@reltio.com",
      "createdTime": 1574831965997,
      "updatedBy": "thirupathi.reddy@reltio.com",
      "updatedTime": 1574831965997,
      "attributes": {
        "FirstName": [
          {
            "type": "configuration/entityTypes/HCP/attributes/FirstName",
            "ov": true,
            "value": "AAA4",
            "uri": "entities/09Ox68G/attributes/FirstName/1BkE0YmO"
          }
        ],
        . . .
      },
      "isFavorite": false,
      "crosswalks": [
        {
          "uri": "entities/09Ox68G/crosswalks/1BkE0yLw",
          "type": "configuration/sources/Reltio",
          "value": "09Ox68G",
          . . .
        }
      ],
      "analyticsAttributes": {},
      "label": "AAA4 BBB4",
      "secondaryLabel": ""
    },
    "successful": true
  }
]
The response returns the details of the two persisted entities and an error message only for the incorrect entity.