Use Case
Accounts are not getting provisioned for REST based applications. Once the job gets executed the task for the new account stays in a new state and it never gets completed.Different error’s seen on Logs:
- 022-04-11/09:15:23.261 [{}] [quartzScheduler_Worker-3] ERROR rest.RestProvisioningService - Error in createNewUsercom.fasterxml.jackson.core.JsonParseException: Unexpected character ('}' (code 125)): was expecting double-quote to start field name at [Source: {"User":{"tenantId":"${if(users.country.toString()=='CH') 'pmineuchateltest' else 'pmisingaporetest'}}","userid": "${user.CustomProperty60}","userName": "${user?.getFirstname()}{user?.getLastname()}","userEmail": "${user.email!=null?user.email:''}","sqcRole": "Analyst","labRole": "Analyst","active": "ACTIVE",}}; line: 1, column: 312]
- "httpParams": "{\"username\": \"${arsTasks.accountName}\", \"firstname\": \"${user.firstname}\", \"lastname\": \"${user.lastname}\", \"u_email\": \"${user.email}\"\"groupname\": "Dummy Group",\"isactive\": \"true\",\"position\": \"\"}"
- 2022-04-20/06:24:56.770 [{}] [quartzScheduler_Worker-4] DEBUG rest.RestUtilService - Exception in RestUtil.getAt : groovy.lang.MissingPropertyException: No such property: d for class: java.lang.String
- {\"tenantId\":\"${users.country.toString()=='CH'?'pmineuchateltest':'pmisingaporetest'}\",\"userid\":\"${users.customproperty60}\",\"username\":\"${users.firstname} ${users.lastname}\",\"userEmail\":\"${users.email}\",\"active\":\"ACTIVE\"}",
Pre-requisites
Applicable Version(s)
app.version=v5.5SP3
app.subversion=v5.5SP3.7.16_FON-2617
Solution
Passing static values through create account Json is not supported in REST connection.