[MNT-20165] REST API endpoint lookup failing in APS after recreating an endpoint with identical name Created: 12-Nov-18  Updated: 16-Mar-20  Resolved: 16-Mar-20

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: APS Identify Manager, APS Kickstart/Studio
Affects Version/s: 1.9.0.2
Fix Version/s: None

Type: Service Pack Request
Reporter: Ciju Joseph [X] (Inactive) Assignee: Closed Issues
Resolution: Won't Do Votes: 0
Labels: London, Modeler-Process
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to by MNT-20175 Cannot update Basic Auth Endpoint Det... In Progress
Bug Priority:
Category 2
ACT Numbers:

00981582

Premier Customer:
Yes

 Description   

When a REST endpoint in APS is deleted, the entries are not deleted from the DB. Instead they are marked as deleted and the entry is kept in the database. However it is removed from the endpoint UI in APS.

Since a deleted entry is not show in the UI, a user is not aware of the existence of an endpoint with that name! So, if another endpoint is created with the same name, APS processes are returning the exception "javax.persistence.NonUniqueResultException: result returns more than one elements" in the REST call and processes get stuck at the REST call task!

The code where this is failing is EndpointServiceImpl.java -> getConfigurationByName(name)

Steps to reproduce the issue 

  1. Create a simple process with a REST call task. 
  2. Configure the REST call task to use an endpoint defined under Identity Management -> Tenants -> Endpoints 
  3. Publish the app and run the process. Make sure that the process runs end-end 
  4. Now delete the endpoint by going to Identity Management -> Tenants -> Endpoints 
  5. Re-create the endpoint using the same name 
  6. Go back to the process and select the endpoint, save and republish the app 
  7. Run the process once more

Expected behaviour
Process runs to the end without any issues and errors in logs.

Current behaviour
Process is stuck at the REST call task with an error "javax.persistence.NonUniqueResultException: result returns more than one elements"

Workaround
Delete the entry that is marked as "deleted" from the database table ENDPOINT_CONFIGURATION so that the endpoint is unique in the database.



 Comments   
Comment by Mark Howarth [ 23-Aug-19 ]

Reassigning to Doug Gruber, the new PM for APS.

Comment by Mark Howarth [ 02-Dec-19 ]

Assigning to Mark Howarth as PM for APS.

Generated at Thu Jul 09 09:57:55 BST 2020 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.