I have a process that deletes records using the "Delete from Data Store Ent

I have a process that deletes records using the "Delete from Data Store Entities Smart Service". If I delete 1 record from the CDT there is no issue, but if I delete multiple records I get an error
Details: An error occurred while trying to delete data. No data was deleted. Details: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1. (APNX-1-4212-000)

It appears that record is deleted and then rolled back. But once the record is rolled back I can go back to the workflow and delete that record individually without an error.

Does anyone know why I am getting this behavior and how to fix it? Thanks...

OriginalPostID-124583

OriginalPostID-124583

  Discussion posts and replies are publicly visible

Parents
  • The way you have it now, is tasksToUnsuspend holding multiple SO_CA_suspendedTasks CDTs, each with their own value for suspendId? Or does it only hold one such CDT, and you are storing an array of IDs in suspendId?

    Either way, try to test by creating a new variable that is an array of Integers that only holds the list of IDs you want to remove. Pass that in as the value for identifiers
Reply
  • The way you have it now, is tasksToUnsuspend holding multiple SO_CA_suspendedTasks CDTs, each with their own value for suspendId? Or does it only hold one such CDT, and you are storing an array of IDs in suspendId?

    Either way, try to test by creating a new variable that is an array of Integers that only holds the list of IDs you want to remove. Pass that in as the value for identifiers
Children
No Data