Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/26/2024 11:51 PM
Hi Team,
We are using the below query to update the CP60 as same as email by using few condition, but we see connection was successful, but updates were not pushed to the user.
"httpParams": "{\"username\":\"${user?.username}\",\"customproperty60\":\"${(user?.entity == 'WW SuccessFactors' && user?.customproperty60==null && user?.customproperty3==null && user?.email!=null) ? user?.email}\"}"
Please help us to resolve this issue.
Thanks,
Sai Meghana
08/27/2024 12:03 AM
Hi @saimeghana was the task picked..?
08/27/2024 12:07 AM
No, it didn't created the task.
08/27/2024 12:08 AM
Create a task via user update rule then only connection will come into picture.
08/27/2024 12:33 AM
Created the user update rule, to trigger the task when attribute is updated via API.
And created the job to run this sav to sav connection, it didn't created the task.
08/27/2024 12:34 AM
08/27/2024 08:18 AM
Hi
Now task got created and completed successful, but the query is not checking the condition which we gave the condition to filter the users to update the cp60.
"httpParams": "{\"username\":\"${user?.username}\",\"customproperty60\":\"${(user?.customproperty60==null && user?.customproperty3==null && user?.email!=null) ? user?.email}\"}"
Thanks,
Sai Meghana
08/27/2024 08:21 AM
08/27/2024 10:07 AM
Hi Rushikesh,
Thanks,
Sai Meghana
08/27/2024 10:08 AM
"httpParams": "{\"username\":\"${user?.username}\",\"customproperty60\":\"${(user?.customproperty60 == null && user?.customproperty3 == null && user?.email != null) ? user?.email : ''}\"}"
08/27/2024 11:05 AM
Tried with the above query still it's same not consider the condition updating for all users
08/27/2024 11:09 AM
Share logs during task processing
08/28/2024 06:30 AM
Hi Rushikesh,
We are using the detective job to run the user update rule, and it will create the task.
please find the below logs for reference
"2024-08-28T08:22:46.768+00:00","ecm","services.UsersService","http-nio-8080-exec-7-zn59q","DEBUG","saving params for report [controller:restfulv5, customproperty60:, action:updateUser, username:SAVTEST.SAPUT003]"
"2024-08-28T08:22:46.773+00:00","ecm","log.LogUserLoginsService","http-nio-8080-exec-7-zn59q","DEBUG","UserLogins login for loginkey=930014 userid=7152comment=token"
"2024-08-28T08:22:46.796+00:00","ecm","ws.Restfulv5Controller","http-nio-8080-exec-7-zn59q","DEBUG","allow inactive manager config: null"
"2024-08-28T08:22:46.796+00:00","ecm","ws.Restfulv5Controller","http-nio-8080-exec-7-zn59q","DEBUG","setting validateagainstpolicy to N"
"2024-08-28T08:22:46.805+00:00","ecm","utility.CustomPreprocessUtilityService","http-nio-8080-exec-7-zn59q","DEBUG","Process the Validation using Custom Jar Logic"
"2024-08-28T08:22:46.810+00:00","ecm","utility.CustomPreprocessUtilityService","http-nio-8080-exec-7-zn59q","DEBUG","Class Name: "
"2024-08-28T08:22:46.810+00:00","ecm","utility.CustomPreprocessUtilityService","http-nio-8080-exec-7-zn59q","DEBUG","Method Name: "
"2024-08-28T08:22:46.810+00:00","ecm","utility.CustomPreprocessUtilityService","http-nio-8080-exec-7-zn59q","DEBUG","Processed User Data after Custom Validation [isValid:true]"
"2024-08-28T08:22:46.824+00:00","ecm","changeaction.UserChangeActionService","http-nio-8080-exec-7-zn59q","DEBUG","Update Fields for User History Tabs : []"
"2024-08-28T08:22:46.844+00:00","ecm","changeaction.UserChangeActionService","http-nio-8080-exec-7-zn59q","DEBUG","inlineeval = true"
"2024-08-28T08:22:46.861+00:00","ecm","ws.Restfulv5Controller","http-nio-8080-exec-7-zn59q","DEBUG","User updated successfully"
"2024-08-28T08:22:46.861+00:00","ecm","services.SaviyntCommonUtilityService","http-nio-8080-exec-7-zn59q","DEBUG","contentType - text/json"
"2024-08-28T08:22:46.863+00:00","ecm","services.SaviyntCommonUtilityService","http-nio-8080-exec-7-zn59q","DEBUG","contentTypeFromConfig - application/json"
"2024-08-28T08:22:46.867+00:00","ecm","log.LogUserLoginsService","http-nio-8080-exec-7-zn59q","DEBUG","UserLogins logout for loginkey=930014"
Thanks,
Sai Meghana
08/28/2024 06:59 AM
Please share full json as logs shows
"2024-08-28T08:22:46.861+00:00","ecm","ws.Restfulv5Controller","http-nio-8080-exec-7-zn59q","DEBUG","User updated successfully"
08/28/2024 08:50 AM
Hi Rushikesh,
Issue: update user task created but updates are not pushed to user.
Pls find the attached logs and jsons
{
"actions": {
"Update Login": {
"call": [
{
"name": "updateusercp",
"connection": "userAuth",
"url": "https://abc-test.saviyntcloud.com/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${user?.username}\" ${if(user?.entity == 'abc' && user?.customproperty60 == null && user?.customproperty3 == null && user?.email != null && user?.statuskey == '1'){',\"customproperty60\":\"'+user?.email+'\"'} else {''}}}",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"successResponses":
{
"message": "User Updated Successfully",
"statusCode": "200,201"
}
}
]
}
}
}
08/28/2024 09:10 AM - edited 08/28/2024 09:11 AM
{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"connection": "userAuth",
"url": "https://abc-test.saviyntcloud.com/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${user?.username}\" ${if(user?.entity == 'abc' && user?.customproperty60 == null && user?.customproperty3 == null && user?.email != null && user?.statuskey == '1'){',\"customproperty60\":\"'+user?.email+'\"'} else {''}}}",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"successResponses": {
"message": "User Updated Successfully",
"statusCode": "200,201"
}
}
]
}
}
}
08/28/2024 11:55 PM
Tried with above json, tasks are not getting completed ran the advance query to complete 1 task but still task not completed.
{"Update Login":{"headers":null,"message":{"errorCode":"0","message":" User Updated Successfully"},"statusCode":200,"description":null,"status":"Failed"}}
Thanks,
Sai Meghana
08/29/2024 05:40 PM
Share latest logs
08/27/2024 12:30 AM
08/27/2024 12:36 AM
Yes, connection was successful.
tasks are not created.
08/27/2024 12:37 AM
Validate logs
08/29/2024 08:51 PM - edited 08/29/2024 08:52 PM
{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"connection": "userAuth",
"url": "https://abc-test.saviyntcloud.com/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${user?.username}\" ${if(user?.entity == 'abc' && user?.customproperty60 == null && user?.customproperty3 == null && user?.email != null && user?.statuskey == '1'){',\"customproperty60\":\"'+user?.email+'\"'} else {''}}}",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
500,
401,
400,
403,
404,
409,
502
]
}
}
]
}
}
}
Can you try the above Json.
Based on the error you are getting success response but unable to handle the response.
09/02/2024 02:58 AM
Hi Sam Talluri,
Tried the above json and it's same it's not updated in user identity. In logs we can see successfully updated and status as 200.
We are using the import user JSON in same connection, in import user Json if we map the values, it's updating correctly.
Please find the logs attached.
Thanks,
Sai Meghana
09/02/2024 02:59 AM
Is "propertytosearch" field is mandatory in the update user json?
09/02/2024 07:14 AM - edited 09/02/2024 07:15 AM
Yes its mandatory
This method updates a specific "user" record in SSM, based on the input parameter username of the relevant user.
All the input parameters it requires are attributes which could be updated for the relevant user record. The attributes which are supplied with valid values as input to the method, will get updated, if the operation is successfully executed.
The Authorization must have Bearer followed by Token.
Mandatory params:
username
OR
propertytosearch
Note - If both params are passed, propertytosearch will take precedence.
https://documenter.getpostman.com/view/36233838/2sA3XMi33N#22d037e9-1957-4aa3-b757-6124bab574fe
09/02/2024 07:17 AM
Okay, we don't have the 'propertytosearch' value is it required in this json?
"httpParams": "{\"username\":\"${user?.username}\" ${if(user?.entity == 'abc' && user?.customproperty60 == null && user?.customproperty3 == null && user?.email != null && user?.statuskey == '1'){',\"customproperty60\":\"'+user?.email+'\"'} else {''}}}",
Thanks,
Sai Meghana
09/02/2024 07:17 AM
Add and validate
09/02/2024 11:18 PM
It is not mandatory. Can you just update a cp with some hard coded value.
If that works then we know something wrong with conditions. If that also doesn't work means something outside httpparams