Using conditional ‘if true then do this otherwise do this’ logic in Metastorm 7.x is a must when building a process. It controls data value change, database interactions and general execution choice but for some reason, at least upto version 7.6, Metastorm has a real problem with parsing nested conditionals through the integration wizard, which can become a pain to troubleshoot.
Metastorm processes its on load, save, start and on complete code line by line. There’s no curly brace syntax like with C, C#, Jscript style coding. This means that the conditional operation function, if nested runs accross a single line of the code window and so can become a ‘bracket nightmare’, especially if you are having difficulties getting the integration wizard editor to parse the mess and you have to resort to using the formula editor.
The normal conditional operations is the (expression)?(when true):(when false) syntax which is great for a single conditional per line, but if you start nesting your conditionals, the integration wizard just can’t hack it. Clearly a designer problem. If you create a nested conditional operation, the integration wizard will strip the start and end brackets of the nested conditional (the child, not the parent) if you attempt to edit it in the designer. Cancel the integration wizard and the start and end brackets return, submit the edit and Metastorm saves the child conditional with no start or end brackets. Next time you try and edit this chunk of code via the integration wizard, the designer will kick out an error and ask you to view the code via the formula editor
This is an invalid nested conditional caused by the designer stripping the start and end brackets:
Creating a single conditional operation per line will circumvent this issue.