and more in a single search tool across platforms. Read the announcement here. |
on 03/27/2023 07:09 AM
Below is the JSON Syntax(with multiple if-else) where one if-else looks like the below(Sample If Else Snip) which could possibly lead to a "Method code too large" exception. In the "JSON Structure(with multiple if-else)" sample, the "ENABLEACCOUNTOU" variable has the entire JSON with multiple nested If-else conditions which will then have to bind and transform out to ${} to a value. Due to this nature, we will not be able to split the JSON into multiple JSONs and bind it separately.
Sample If Else Snip
if(null!=task.accountKey.customproperty14?task.accountKey.customproperty14.toLowerCase().contains('Contractor or Vendor'.toLowerCase()):'' || null!=task.accountKey.customproperty14?task.accountKey.customproperty14.toLowerCase().contains('Contractor or Vendor - No Mailbox'.toLowerCase()):''){
if(null!=task.accountKey.customproperty25?task.accountKey.customproperty25.equalsIgnoreCase('A'):''){
'OU=A,OU=AA,OU=AAA'
}
else if(null!=task.accountKey.customproperty25?task.accountKey.customproperty25.equalsIgnoreCase('B'):''){
'OU=B,OU=AA,OU=AAA'
}
###Assuming that there was 100s of similar nested if-else conditions###
else{
'OU=C,OU=AA,OU=AAA'
}
}
JSON Structure(with multiple if-else)
{
"USEDNFROMACCOUNT": "YES",
"MOVEDN": "YES",
"REMOVEGROUPS": "NO",
"ENABLEACCOUNTOU":"${
if(){
if(){''}
else if(){''}
###Assuming that there was 100s of similar nested if-else conditions###
else{''}
}
else if(){
if(){
if(){''}
else if(){''}
###Assuming that there was 100s of similar nested if-else conditions###
else{''}
}
###Assuming that there was 100s of similar nested if-else conditions###
else if(){
if(){
if(){''}
else if(){''}
###Assuming that there was 100s of similar nested if-else conditions###
else{''}
}
else{
if(){''}
else if(){''}
###Assuming that there was 100s of similar nested if-else conditions###
else{''}
}}}
else {
if(){''}
else if(){''}
###Assuming that there was 100s of similar nested if-else conditions###
else{''}
}
},DC=X,DC=XX,DC=XXX",
"AFTERMOVEACTIONS": {
"userAccountControl": "512"
}
}