Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/10/2023 07:45 AM - last edited on 10/10/2023 08:18 AM by Dave
Hi,
We have configured createTicketJSON in the REST connection object and are using this as the ServiceDesk connection for disconnected applications. I am attaching the JSON here for your reference.
Request gets submitted in Service Now and a provisioning task is getting successfully generated in Saviynt. However, when we run the provisioning job, following error gets displayed in the logs :
quartzScheduler_Worker-3] ERROR rest.RestProvisioningService - Error in createNewServiceTicketcom.fasterxml.jackson.core.JsonParseException: Unexpected character ('c' (code 99)): was expecting comma to separate Object entries"
"2023-10-10T13:32:05.745+00:00","ecm-worker","","","","2023-10-10T13:32:04.779841137Z stdout F at
I have validated the JSON in JSON validator and the validation is successful. Additionally, the payload is also getting printed with all the correct values as shown below :
{"variables":"{"comments":"Complete this request to create account for ABC in TestDisconnectedApplicationEp", "trm":"1234","env":"development"}","requestDetails":"{"requested_for":"1111","requested_by":"1111","request_id":"12345","existing_request":"YES"}"}
What might be the issue here ?
Best Regards,
Varun
10/10/2023 10:35 AM
What is the status of pending task?
10/10/2023 12:53 PM
Hello @Saathvik,
When we view the task, we see this :
Best Regards,
Varun
10/11/2023 03:45 AM
Hi,
Any inputs please, for this issue ?
Best Regards,
Varun
12/06/2023 09:12 PM
Please share postman response
Logo
{
"call": [
{
"name": "call1",
"connection": "SNOW",
"url": "https://URL.service-now.com/api/x_saviy_iga/sav_api",
"httpMethod": "POST",
"httpParams": "{\"variables\":\"{\"comments\":\"${if((task.tasktype==1 || task.tasktype==3) && (allEntitlementsValues!=null && !allEntitlementsValues.isEmpty() && allEntitlementsValues!='')){'Complete this request to create account for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName +' application along with access '+allEntitlementsValues}else if((task.tasktype==1 || task.tasktype==3) && (allEntitlementsValues==null || allEntitlementsValues.isEmpty() || allEntitlementsValues=='')){'Complete this request to create account for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName}else if(task.tasktype==2 && (allEntitlementsValues==null || allEntitlementsValues.isEmpty() || allEntitlementsValues=='')){'Complete this request to remove account for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName}else if(task.tasktype==2 && task.source=='REQUEST'){'Complete this request to remove access for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName +' application. Following accesses need to be removed : '+allEntitlementsValues}}\", \"trm\":\"${task.endpoint?.customproperty1}\",\"env\":\"development\"}\",\"requestDetails\":\"{\"requested_for\":\"${user.username}\",\"requested_by\":\"${requestor}\",\"request_id\":\"${if(task.requestKey!=null){task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}else if(task.requestKey==null){'NO_REQUEST_AVAILABLE'}}\",\"existing_request\":\"YES\"}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"ticketidPath": "result.number",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
12/06/2023 08:33 PM
@varunpuri were you able to resolve it?
12/06/2023 08:58 PM
@09 , yes, we were able to resolve it. Attaching the correct payload.
Best Regards,
Varun
12/06/2023 10:09 PM
12/06/2023 10:13 PM - last edited on 12/06/2023 11:11 PM by Sunil
just for testing purpose am using below json in createticketJson. am getting the same error message(ticket Null).
JSON:
{ "call": [ { "name": "call1", "connection": "login", "url": "https://removed/api/users/3 ", "httpMethod": "POST", "httpHeaders": { "Authorization": "${access_token}" }, "httpContentType": "application/json", "ticketidPath": "responseText.id" , "successResponses": {
"statusCode": [
200,
201
]
}} ] }
i have tried below as well
"ticketidPath": "responseText.id"
"ticketidPath": "id"
"ticketidPath": "response.id"
API RESPONSE:
12/08/2023 01:45 AM
12/08/2023 04:15 AM
Try
"ticketidPath": "result.id"
Also check your connection name in JSON it should match with connection name used in connectionJSON