cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error at Onboarding API

varunvichare57
Explorer
0 Likes
562

Hello Experts,

We are getting the below error at the Onboarding API configured in CPI system. We are using Onboarding SOAP API to get the new hire record from onboarding. Please let us know why we are getting this error and how to resolve it.

<GetNewhireRecordResult>
<NewhireRecord>00000000-0000-0000-0000-000000000000</NewhireRecord>
<Errors>
<Error>
<ErrorCode>500</ErrorCode>
<ErrorDescription>Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.</ErrorDescription>
</Error>
<Error>
<ErrorCode>500</ErrorCode>
<ErrorDescription>Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.</ErrorDescription>
</Error>
<Error>
<ErrorCode>500</ErrorCode>
<ErrorDescription>Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.</ErrorDescription>
</Error>
</Errors>
</GetNewhireRecordResult>

Accepted Solutions (1)

Accepted Solutions (1)

Manideep2
Discoverer

The error you're encountering, *"Concurrency violation: the Update Command affected 0 of the expected 1 records,"* typically occurs when there is a mismatch between the expected state of the data and the actual state during an update operation. This can happen in systems where concurrency control is enforced, such as when using optimistic concurrency mechanisms.

Here’s a breakdown of the issue and potential steps to resolve it:

---

### *Possible Causes*
1. *Data Conflict*:
- The record you're trying to update or retrieve may have been modified by another process or user after it was initially read, causing a mismatch in the expected state.

2. *Stale Data*:
- The system might be working with outdated or stale data, leading to a concurrency violation when attempting to update the record.

3. *API Configuration*:
- The Onboarding SOAP API might not be properly configured in your CPI (Cloud Platform Integration) system, leading to incorrect handling of the record.

4. *Database Locking*:
- If the database or system uses locking mechanisms, the record might be locked by another process, preventing the update.

5. *Empty or Invalid Record*:
- The NewhireRecord field in the response is 00000000-0000-0000-0000-000000000000, which suggests that the record might not exist or is invalid.

---

### *Example Debugging Steps*
1. *Check the Request Payload*:
- Ensure the request payload sent to the Onboarding API is correct and includes all required fields.

2. *Simulate the API Call*:
- Use a tool like  SOAPUI to manually test the API call and verify the response.

3. *Review API Documentation*:
- Refer to the Onboarding SOAP API documentation to ensure you're using the correct endpoints and parameters.

---



Answers (0)