04-18-2012 04:10 PM
I have two separate x?y:z nested conditional statements in the Run Document Chain Id field simulating a switch statement.
One of the statements is 251 characters long the other is 418 characters long. The 251 character statement works fine with 4 imbedded conditionals. The 418 character statement gives a error:
Caused by: [Error: unexpected token in contstructor] [Near : {... Complete'):'besPSSSandCheckLis ....}]
The 418 character statement has 5 conditionals and much longer variable names hence the increased size.
I have gone over and over the longer of the two expressions looking for errors. I even used an editor (notepad++) which matches parenthesis, braces, quotes, etc to see if there is a typo. I can't find any typos or mismatched delimiters.
I'm getting suspicious of the number 251. 251 is very close to 256, a very magical number in computers. The first, working, statement is just under 256 characters long. The second is well over that.
The question is: Is there a character buffer limit on the buffer for the expression builder and/or Run Document chain id field in studio?
Here are the two statements:
This statement works.
@{Document["PSI1:Dents"]=='no'?( Document["PSI1:Flaking"]== 'no' ?( Document["PSI1:Dirt"] == 'no' ?(Document["PSI1:TransitionWires"] == 'no'?'ac_stub':'besPSI1FTDDgetComment'):'besPSI1FTDDgetComment'):'besPSI1FTDDgetComment'):'besPSI1FTDDgetComment'}
This statement generates the error above:
@{Document["PSSand:CleanedRubberAlcohol"]=='yes'?( Document["PSSand:SandUniformEndtoEnd"]== 'yes' ?( Document["PSSand:SixHundredGritSandPaper"] == 'yes' ?(Document["PSSand:SpongeDustOffRubber"] == 'yes'? Document["PSSand:WireSideDown"]=='yes'?'ac_stub':'besPSSSandCheckListToComplete'):'besPSSSandCheckListToComplete'):'besPSSSandCheckListToComplete'):'besPSSSandCheckListToComplete'):'besPSSSandCheckListToComplete'}
04-19-2012 07:26 AM
Your expression is malformed, the innermost parenthesis looks like:
( Document["PSSand:SpongeDustOffRubber"] == 'yes'
? Document["PSSand:WireSideDown"] == 'yes' ? 'ac_stub' : 'besPSSSandCheckListToComplete'
)
It's missing a : something
to match the ?
. Or the parenthesis is misplaced.
And no, there are no size limitations like that in Nuxeo Studio.
04-19-2012 07:26 AM
Your expression is malformed, the innermost parenthesis looks like:
( Document["PSSand:SpongeDustOffRubber"] == 'yes'
? Document["PSSand:WireSideDown"] == 'yes' ? 'ac_stub' : 'besPSSSandCheckListToComplete'
)
It's missing a : something
to match the ?
. Or the parenthesis is misplaced.
And no, there are no size limitations like that in Nuxeo Studio.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.