Hide Forgot
Description of problem: When a Task has multiple incoming connections, "Validate Process" button doesn't detect the error. But it fails at building a package. Steps to Reproduce: 1. Import attached repository_export_multiple_connections.xml 2. open process "xxxx" 3. Press "Validate Process" Actual results: no warning for the Task Expected results: raise a warning for the Task
Created attachment 792045 [details] repository_export_multiple_connections.zip
Created attachment 792048 [details] validation_brms531.png
BPMS 6.0.0 ER2 validation detects the error (message is "Could not parse BPMN2 to RuleFlowProcess.") So I'm not cloning this BZ to BPMS 6. See validation_bpms600er2.png.
Created attachment 792054 [details] validation_bpms600er2.png
Backporting BPMN2SyntaxChecker.checkSyntax() part from this commit seems to fit. https://github.com/droolsjbpm/jbpm-designer/commit/3b0e035f142bb557f47148a3236de1d67e72d08f
Created attachment 793973 [details] BZ1002877_validate.diff Attaching a fix proposal.
Created attachment 793974 [details] validation_fix.png
BZ1002877_validate.diff was basically taken from the commit 3b0e035f142bb557f47148a3236de1d67e72d08f . But I added e.getMessage() for UI message. addError(defaultResourceId, "Could not parse BPMN2 to RuleFlowProcess. " + e.getMessage()); In this case, x-mark is put on the Start Node but the message is about a Task Node ("This type of node cannot have more than one incoming connection!"). See validation_fix.png. So it might be a bit confusing to users but I think it's better than nothing. WDYT?
RuleFlowProcessValidator errors do not give back specific node ids which we can then trace back to the node ids on the designer canvas. By default Designer attaches all issues for which there is no specific id to the first node it encounters on the canvas. This is different now in 6.x but that is the way it was for 5.3.x What we can do is fix this specific issue by adding checks to task nodes only in which case we could attach the errors to the specific task nodes, or introduce RuleFlowProcessValidator in which case all errors it may produce will be placed on the first node. Let me know which one would be more suitable for the fix. Thanks.
Added commit 3254f31d7fa69906d922238c0ac9a946c0dc1b07 to the guvnor-integration branch which is the community latest of 5.3.x branch. @Toshiya and Allesandro - please let me know what branch I should move this to for the build. Thanks.
(In reply to Tihomir Surdilovic from comment #11) > introduce RuleFlowProcessValidator in which case all errors it may produce will be placed on the first node. This is preferred because the customer's need is "detect errors as far as possible". Thanks,
Verified on BRMS_5.3.1_4. The validator now correctly displays a warning message and the log contains: 11:19:17,770 WARN [BPMN2SyntaxChecker] Could not parse to RuleFlowProcess. java.lang.IllegalArgumentException: This type of node cannot have more than one incoming connection!