Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/17/2024 06:06 AM
Hi,
I am calling analytics in first call and fetching the attributes and updating customproperty34 from first call to the specified username. This is the update user Json.
{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"connection": "userAuth",
"url": "url/ECM/api/v5/FetchRuntimeControlsData",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"980\",\"attributes\":{\"username\":\"${user.username}\", \"customproperty34\":\"${user.customproperty34}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
},
{
"name": "Update Login",
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpParams": "{\"username\":\"${response.'Update Login'.message.result.USERNAME}\",\"customproperty34\":\"${response.'Update Login'.message.result.CUSTOMPROPERTY34}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"message": "User Updated Successfully",
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
500,
403,
409,
412
]
}
}
]
}
}
}
but the task was not getting completed and this is what I found in logs:
"Calling REST method with Connection - Sav4Sav TrainingStatus Setup and tasklist - [01010401:[com.saviynt.ecm.task.ArsTasks : 375695], C100664:[com.saviynt.ecm.task.ArsTasks : 375725]]"
"2024-10-17T12:39:06.067+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","Processing User Update Task for REST" i get this error
"2024-10-17T12:39:06.069+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","initializing Provisioning connection"
"2024-10-17T12:39:06.071+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","updateUserJSON: [actions:[Update Login:[call:[[name:Update Login, connection:userAuth, url:abc/ECM/api/v5/FetchRuntimeControlsData, httpMethod:POST, httpContentType:application/json, httpParams:{"analyticsid":"980","attributes":{"username":"${user.username}", "customproperty34":"${user.customproperty34}"}}, httpHeaders:[Authorization:${access_token}], successResponses:[statusCode:[200, 201]]], [name:Update Login, connection:userAuth, url:abc/ECM/api/v5/updateUser, httpMethod:POST, httpParams:{"username":"${response.'Update Login'.message.result.USERNAME}","customproperty34":"${response.'Update Login'.message.result.CUSTOMPROPERTY34}"}, httpHeaders:[Authorization:${access_token}], httpContentType:application/json, successResponses:[message:User Updated Successfully, statusCode:[200, 201]], unsuccessResponses:[statusCode:[500, 403, 409, 412]]]]]]]"
"2024-10-17T12:39:06.071+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","User for which the loop is running:01010401"
"2024-10-17T12:39:06.071+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","Tasks to work on = 1"
"2024-10-17T12:39:06.071+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","Action to be performed =Update Login"
"2024-10-17T12:39:06.071+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","query to get the account data=select a.ACCOUNTKEY as id from user_accounts ua inner join accounts a on a.ACCOUNTKEY=ua.ACCOUNTKEY where ua.USERKEY = 7825 and a.SYSTEMID=208 order by a.UPDATEDATE desc limit 1"
"2024-10-17T12:39:06.073+00:00","ecm-worker","services.SaviyntCommonUtilityService","quartzScheduler_Worker-7-fstpm","DEBUG","Enter getStandardBindingVariable"
"2024-10-17T12:39:06.079+00:00","ecm-worker","services.SaviyntCommonUtilityService","quartzScheduler_Worker-7-fstpm","DEBUG","arsTasks.requestAccessKey: null"
"2024-10-17T12:39:06.079+00:00","ecm-worker","services.SaviyntCommonUtilityService","quartzScheduler_Worker-7-fstpm","DEBUG","Exit getStandardBindingVariable"
"2024-10-17T12:39:06.079+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","Total Call: 2"
"2024-10-17T12:39:06.100+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","pastResponse: null"
"2024-10-17T12:39:06.111+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","connection: userAuth"
"2024-10-17T12:39:06.133+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","pastResponse: null"
"2024-10-17T12:39:06.143+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","connection: userAuth"
"2024-10-17T12:39:06.143+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","Task Response: null"
"2024-10-17T12:39:06.143+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","Result: false"
"2024-10-17T12:39:06.146+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","User for which the loop is running:C100664"
"2024-10-17T12:39:06.146+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","Tasks to work on = 1"
"2024-10-17T12:39:06.146+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","Action to be performed =Update Login"
"2024-10-17T12:39:06.146+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-fstpm","DEBUG","query to get the account data=select a.ACCOUNTKEY as id from user_accounts ua inner join accounts a on a.ACCOUNTKEY=ua.ACCOUNTKEY where ua.USERKEY = 517297 and a.SYSTEMID=208 order by a.UPDATEDATE desc limit 1"
"2024-10-17T12:39:06.148+00:00","ecm-worker","services.SaviyntCommonUtilityService","quartzScheduler_Worker-7-fstpm","DEBUG","Enter getStandardBindingVariable"
"2024-10-17T12:39:06.152+00:00","ecm-worker","services.SaviyntCommonUtilityService","quartzScheduler_Worker-7-fstpm","DEBUG","arsTasks.requestAccessKey: null"
It looks like its returning null value. Can anyone please check my Json and confirm where I'm going wrong?
10/17/2024 06:12 AM - edited 10/17/2024 06:21 AM
Use below JSON
{
"actions": {
"Update Login": {
"call": [{
"name": "Update Login",
"connection": "userAuth",
"url": "url/ECM/api/v5/FetchRuntimeControlsData",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"980\",\"attributes\":{\"username\":\"${user.username}\", \"customproperty34\":\"${user.customproperty34}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
}, {
"name": "Update Login",
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpParams": "{\"username\":\"${response.'Update Login'.message.result[0].USERNAME}\",\"customproperty34\":\"${response.'Update Login'.message.result[0].CUSTOMPROPERTY34}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"message": "User Updated Successfully",
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
500,
403,
409,
412
]
}
}
]
}
}
}
10/17/2024 06:18 AM
Hi @rushikeshvartak ,
Could you please tell me why we are using customproperty 28 here. Also, I tried the same it the task doesnt get completed.
10/17/2024 06:21 AM
Typo updated to 34
10/17/2024 06:23 AM
Tried the same, but the task doesn't get provisioned.
10/17/2024 06:24 AM
Refer Solved: Re: UpdateUserJSON (REST) - Update user attributes... - Saviynt Forums - 82453
10/17/2024 06:56 AM
Hi @rushikeshvartak ,
I followed the above thread but the update user task just doesn't get completed. I have even put tasktype in advanced parameter in job
Thanks,
Vidhya
10/17/2024 08:20 AM
Please share logs