Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

DB Connector : Splitting entitlement Id's in JSON

nbillu
New Contributor II
New Contributor II

Hi All,
I have two entitlements called (LegalEntity-Module and Module) where I am pulling the entitlement data by using ID's. And Iam storing It in EntitlementID

For LegalEntity-Module. EntitlementID is (22-34) 
So, Here i need to split the value i.e (22,34) and need to assign the first value that is 22 to LegalEntity-Module.

For Module  entitlementid is (3-Read)
So, Here i need to split the value i.e (3,read) and need to assign. accordingly.
Sample SP:

{
"LegalEntity-Module": "CALL quantr.updateUserEntityAccess_DDF(22,'ABC', 1, 'sam')",
"Module": "CALL quantr.updateUserModuleAccess_DDF ('ABC',3,'Read','sam')"
}

Iam using the below Stored procedure. 

{
"LegalEntity-Module": "CALL quantr.updateUserEntityAccess_DDF(${task.entitlement_valueKey?.entitlementID?.split("-")[0]},'${accountName}', 1, '${'SAM Task# '+task.id+'; '+'SAM Request ID# '+task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}')",
"Module": "CALL quantr.updateUserModuleAccess_DDF ('${accountName}',${task.entitlement_valueKey?.entitlementID?.split("-")[0]},'${task.entitlement_valueKey?.entitlementID?.split("-")[1]}','${'SAM Task# '+task.id+'; '+'SAM Request ID# '+task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}')"
}

Error after running wsretry Job(Error parsing json)

nbillu_0-1690296458903.png

Can anyone help me to get it resolved

Regards,

Navya Billu





2 REPLIES 2

nimitdave
Saviynt Employee
Saviynt Employee

Please try this once:

 
{
"LegalEntity-Module": [
"CALL quantr.updateUserEntityAccess_DDF('${task.entitlement_valueKey?.entitlementID?.split(\"-\")[0]}','${accountName}', '1','${'SAM Task# '+task.id+'; '+'SAM Request ID# '+task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}')"
],
"Module": [
"CALL quantr.updateUserModuleAccess_DDF ('${accountName}','${task.entitlement_valueKey?.entitlementID?.split(\"-\")[0]}','${task.entitlement_valueKey?.entitlementID?.split(\"-\")[1]}','${'SAM Task# '+task.id+'; '+'SAM Request ID# '+task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}')"
]
}

rushikeshvartak
All-Star
All-Star

Make sure entitlementid having value if you are splitting 


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.