This may only require a documentation update, but I think it could be a stumbling block for anyone trying to use the batchComplete boolean value in this typical manner:
if ($('batchComplete')) { // this will always execute }
Because the value is being pulled from a Map, it must be an Object. A java.lang.Boolean is what is returned, and objects are always truthy, even if they represent "false."
It can be worked around either of the following ways (and possibly others):
if ($('batchComplete') == true) { /* ... */ } if ($('batchComplete').booleanValue()) { /* ... */ }
Any other documented sourceMap variables that are boolean values would be affected in the same way.
This may only require a documentation update, but I think it could be a stumbling block for anyone trying to use the batchComplete boolean value in this typical manner:
if ($('batchComplete')) { // this will always execute }
Because the value is being pulled from a Map, it must be an Object. A java.lang.Boolean is what is returned, and objects are always truthy, even if they represent "false."
It can be worked around either of the following ways (and possibly others):
if ($('batchComplete') == true) { /* ... */ } if ($('batchComplete').booleanValue()) { /* ... */ }
Any other documented sourceMap variables that are boolean values would be affected in the same way.
Imported Issue. Original Details: Jira Issue Key: MIRTH-4483 Reporter: agermano Created: 2020-03-30T16:16:52.000-0700