Getting the below Error message
Fail: in in RULE-OBJ-WHEN @BASECLASS: String index out of range: -1
while running the when rule stand alone
please clarify anyone how to fix this error in When rule
Getting the below Error message
Fail: in in RULE-OBJ-WHEN @BASECLASS: String index out of range: -1
while running the when rule stand alone
please clarify anyone how to fix this error in When rule
@Naveen Aluru
Check in the when rule has string functions that has the incorrect lenght reference or incorrect numeric reference.
Hi @Naveen Aluru: Is it correct to say that the when rule is working fine when used in the application case workflow and you are getting this error when you are running the rule as standalone in Dev studio?
In this case, can you check what is the logic added in the when rule? If the when rule is using functions like indexinpagelist to get the index of any item in the page list and sourcing it as reference for a pagelist, this can happen because the page used in the function may not be available during standalone execution.
Thanks.
@ArulDevan when working with in application, its working fine, but when i try to run this when rule standalone, its throwing this error,
and i have not used any index related functions also, i have used like
@contains(@pxDataManipulate.pxStringCSVFromStringList(.pxCoveredInsKeys),“A-”)
Hi @Naveen Aluru: This is expected because the pxStringCSVFromStringList will create a exception because pxCoveredInsKeys value list will not have any value when you execute it standalone. Exception is because of the function definition where the setLength method call will cause this issue.
When you run from a case where the pxCoveredInsKeys have some values, this will not happen. It is worth to check if you are using the same logic in a top level parent case (as per my knowledge if it is not handled in your code, it should create the same issue).
Can you also share why you are trying to execute the when rule as standalone so that the community can better suggest a solution for you? Is it for Unit testing?
Thanks.