and more in a single search tool across platforms. Read the announcement here. |
02/22/2024 07:25 AM
Hi Team,
Below Error is observed while SIGA parses disableAccount JSON from Rest Connector:
2024-02-22/14:13:33.119 [{}] [quartzScheduler_Worker-3] ERROR rest.RestProvisioningService - Error in processWebservicecom.fasterxml.jackson.core.JsonParseException: Unexpected character ('y' (code 121)): was expecting comma to separate Object entries
at [Source: {"mainIMDLAccount":"${user.customproperty4}","azureCorporateADAccountName":"${user.customproperty49}","azureIQOSAccountName":"${user.customproperty50}","azureIQOSAccountId":"${user.customproperty52}","domainAccount":"${user.customproperty60}","employeeId":"${user.employeeid}","endDate":"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")} else {null}}","firstName":"${user.firstname}","lastName":"${user.lastname}","status":"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}","initials":"${user.customproperty7}","isActive":"${user.enabled}","groupId":"${entitlementValue.id}","groupName":"${entitlementValue.entitlement_value}"}; line: 1, column: 407]
2024-02-22/14:13:33.120 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: [1;31m| Error [22;39mcom.fasterxml.jackson.core.JsonParseException: Unexpected character ('y' (code 121)): was expecting comma to separate Object entries
at [Source: {"mainIMDLAccount":"${user.customproperty4}","azureCorporateADAccountName":"${user.customproperty49}","azureIQOSAccountName":"${user.customproperty50}","azureIQOSAccountId":"${user.customproperty52}","domainAccount":"${user.customproperty60}","employeeId":"${user.employeeid}","endDate":"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")} else {null}}","firstName":"${user.firstname}","lastName":"${user.lastname}","status":"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}","initials":"${user.customproperty7}","isActive":"${user.enabled}","groupId":"${entitlementValue.id}","groupName":"${entitlementValue.entitlement_value}"}; line: 1, column: 407][m
2024-02-22/14:13:33.120 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: [1;31m| Error [22;39m at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1702)[m
2024-02-22/14:13:33.120 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: [1;31m| Error [22;39m at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:558)[m
2024-02-22/14:13:33.120 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: [1;31m| E
Given below is my DisableAccountJSON:
{
"accountIdPath": "accountName",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "*****/${arsTasks?.endpoint}/accounts/${account?.name}/status?username=${user?.customproperty61+'@pmintl.dev'}&email=${user?.customproperty61+'@pmintl.dev'}&employeeId=${user?.employeeid}&mainIMDLAccount=${user?.customproperty4}&azureCorporateADAccountName=${user?.customproperty49}&azureIQOSAccountId=${user?.customproperty52}&azureIQOSAccountName=${user?.customproperty50}",
"httpMethod": "PATCH",
"httpParams": "{\"mainIMDLAccount\":\"${user.customproperty4}\",\"azureCorporateADAccountName\":\"${user.customproperty49}\",\"azureIQOSAccountName\":\"${user.customproperty50}\",\"azureIQOSAccountId\":\"${user.customproperty52}\",\"domainAccount\":\"${user.customproperty60}\",\"employeeId\":\"${user.employeeid}\",\"endDate\":\"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\")} else {null}}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"status\":\"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}\",\"initials\":\"${user.customproperty7}\",\"isActive\":\"${user.enabled}\",\"groupId\":\"${entitlementValue.id}\",\"groupName\":\"${entitlementValue.entitlement_value}\"}",
"httpHeaders":
{
"client_id": "*******",
"client_secret": "*******",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
204,
201,
202,
203,
205
]
},
"unsuccessResponses":
{
"statusCode":
[
400,
404
]
}
}
]
}
could you please help me identifying the error.
02/22/2024 07:59 AM
@vinitamulchanda can you try the below JSON?
{
"accountIdPath": "accountName",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "*****/${arsTasks?.endpoint}/accounts/${account?.name}/status?username=${user?.customproperty61+'@pmintl.dev'}&email=${user?.customproperty61+'@pmintl.dev'}&employeeId=${user?.employeeid}&mainIMDLAccount=${user?.customproperty4}&azureCorporateADAccountName=${user?.customproperty49}&azureIQOSAccountId=${user?.customproperty52}&azureIQOSAccountName=${user?.customproperty50}",
"httpMethod": "PATCH",
"httpParams": "{\"mainIMDLAccount\":\"${user.customproperty4}\",\"azureCorporateADAccountName\":\"${user.customproperty49}\",\"azureIQOSAccountName\":\"${user.customproperty50}\",\"azureIQOSAccountId\":\"${user.customproperty52}\",\"domainAccount\":\"${user.customproperty60}\",\"employeeId\":\"${user.employeeid}\",\"endDate\":\"${if(user.enddate!=null){user.enddate.format(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\")}else{null}}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"status\":\"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}\",\"initials\":\"${user.customproperty7}\",\"isActive\":\"${user.enabled}\",\"groupId\":\"${entitlementValue.id}\",\"groupName\":\"${entitlementValue.entitlement_value}\"}",
"httpHeaders": {
"client_id": "*******",
"client_secret": "*******",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
204,
201,
202,
203,
205
]
},
"unsuccessResponses": {
"statusCode": [
400,
404
]
}
}
]
}
02/22/2024 08:52 PM
Hi Naveen,
No luck, am still facing the same error.
02/22/2024 08:57 PM
In the "httpParams" section, notice that I've escaped the double quotes " within the format() method as \\\". This ensures that the JSON string remains valid when it's parsed.
{
"accountIdPath": "accountName",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "*****/${arsTasks?.endpoint}/accounts/${account?.name}/status?username=${user?.customproperty61+'@pmintl.dev'}&email=${user?.customproperty61+'@pmintl.dev'}&employeeId=${user?.employeeid}&mainIMDLAccount=${user?.customproperty4}&azureCorporateADAccountName=${user?.customproperty49}&azureIQOSAccountId=${user?.customproperty52}&azureIQOSAccountName=${user?.customproperty50}",
"httpMethod": "PATCH",
"httpParams": "{\"mainIMDLAccount\":\"${user.customproperty4}\",\"azureCorporateADAccountName\":\"${user.customproperty49}\",\"azureIQOSAccountName\":\"${user.customproperty50}\",\"azureIQOSAccountId\":\"${user.customproperty52}\",\"domainAccount\":\"${user.customproperty60}\",\"employeeId\":\"${user.employeeid}\",\"endDate\":\"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format(\\\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\\\")} else {null}}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"status\":\"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}\",\"initials\":\"${user.customproperty7}\",\"isActive\":\"${user.enabled}\",\"groupId\":\"${entitlementValue.id}\",\"groupName\":\"${entitlementValue.entitlement_value}\"}",
"httpHeaders": {
"client_id": "*******",
"client_secret": "*******",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
204,
201,
202,
203,
205
]
},
"unsuccessResponses": {
"statusCode": [
400,
404
]
}
}
]
}
02/23/2024 02:44 AM - edited 02/23/2024 05:06 AM
Hi Rushikesh,
Thanks for your response, I could see the error I was seeing in logs did got resolved. But the other values that are part of httpparams are not getting evaluated, as you can see the API call logs pasted below:
DEBUG rest.RestProvisioningService - Calling Webservice Url - *****/sprinklrtest31@pmintl.dev/status?username=test31@pmintl.dev&email=test31@abc.dev&employeeId=50... with httpParams - [mainIMDLAccount:${user.customproperty4}, azureCorporateADAccountName:${user.customproperty49}, azureIQOSAccountName:${user.customproperty50}, azureIQOSAccountId:${user.customproperty52}, domainAccount:${user.customproperty60}, employeeId:${user.employeeid}, endDate:${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")} else {null}}, firstName:${user.firstname}, lastName:${user.lastname}, status:inactive}, initials:${user.customproperty7}, isActive:false, groupId:${entitlementValue.id}, groupName:${entitlementValue.entitlement_value}]
Like - employeeid : <here user's employee ID value should be evaluated > correct but we see ${user.employeeid}
could you please help why this could be occuring
02/25/2024 07:07 PM
As per above logs its getting populated
02/25/2024 09:22 PM
No, that is query params, I could not see httpParams being resolved .
Below the URL and http param config from my JSON:
"url": ********/accounts/${account?.name}/status?username=${user?.customproperty61+'@pmintl.dev'}&email=${user?.customproperty61+'@pmintl.dev'}&employeeId=${user?.employeeid}&mainIMDLAccount=${user?.customproperty4}&azureCorporateADAccountName=${user?.customproperty49}&azureIQOSAccountId=${user?.customproperty52}&azureIQOSAccountName=${user?.customproperty50}",
"httpMethod": "PATCH",
"httpParams": "{\"mainIMDLAccount\":\"${user.customproperty4}\",\"azureCorporateADAccountName\":\"${user.customproperty49}\",\"azureIQOSAccountName\":\"${user.customproperty50}\",\"azureIQOSAccountId\":\"${user.customproperty52}\",\"domainAccount\":\"${user.customproperty60}\",\"employeeId\":\"${user.employeeid}\",\"endDate\":\"${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format(\\\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\\\")} else {null}}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"status\":\"${user.statuskey==null?'':user.statuskey==1?'active':user.statuskey==0?'inactive':''}\",\"initials\":\"${user.customproperty7}\",\"isActive\":\"${user.enabled}\",\"groupId\":\"${entitlementValue.id}\",\"groupName\":\"${entitlementValue.entitlement_value}\"}",
02/25/2024 09:24 PM
change ${entitlementValue.id} to ${entitlementValue.entitlementID}
02/25/2024 10:11 PM
No luck, this did not helped.
024-02-26/06:09:17.617 [{}] [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Calling Webservice Url - ********/accounts/test31@pmintl.dev/status?username=test31@pmintl.dev&email=test31@pmintl.dev&employeeId=50400448&mainIMDLAccount=0000000000&azureCorporateADAccountName=null&azureIQOSAccountId=null&azureIQOSAccountName=null with httpParams - [mainIMDLAccount:${user.customproperty4}, azureCorporateADAccountName:${user.customproperty49}, azureIQOSAccountName:${user.customproperty50}, azureIQOSAccountId:${user.customproperty52}, domainAccount:${user.customproperty60}, employeeId:${user.employeeid}, endDate:${if (user.enddate!=null) {Calendar today=Calendar.getInstance();today.setTime(user.enddate);today.getTime().format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")} else {null}}, firstName:${user.firstname}, lastName:${user.lastname}, status:${user.statuskey=******?'':user.statuskey=******?'active':user.statuskey=******?'inactive':''}, initials:${user.customproperty7}, isActive:false, groupId:${entitlementValue.entitlementID}, groupName:${entitlementValue.entitlement_value}]