AnsweredAssumed Answered

Raising parse errors from a BpmnParseListener

Question asked by thilo.ginkel on Nov 22, 2011
Hi there,

while implementing a custom BpmnParseListener to process some custom extensionElements in a userTask I noticed that there currently seems to be no straightforward way to abort the parsing of the process definition (e.g., because the custom extensions have been used incorrectly) with an exception: While the parsing will be interrupted if an exception is thrown by the parse listener, the deployment completes as BpmnParse.execute() swallows all exceptions.

On the other hand, BpmnParse provides explicit functionality to abort the deployment by recording an error. Unfortunately, BpmnParse is not accessible from a BpmnParseListener and extending BpmnParseListener with appropriate functionality would break source-level and binary compatibility.

So, two questions:
1) Is there any special reason why BpmnParse.execute() swallows exceptions?
2) If so, do you think that extending BpmnParseListener to allow error signaling would make sense?