viadee / vPAV

viadee Process Application Validator

Home Page:https://www.viadee.de/java/process-application-validator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BoundaryErrorChecker does not parse class with (multiple) throw new BPMNError(String errorCode, String errorMessage) correctly.

DaZang opened this issue · comments

Problem

  1. BoundaryErrorChecker only finds the first occurance of throw new BPMNError
  2. BoundaryErrorChecker does not parse occurances of BPMNError with an error message correctly.

Example for 1 and 2:
public void execute(DelegateExecution execution) throws Exception { if (false) { throw new BpmnError("preceding_error_code", "error message"); } else { throw new BpmnError("123", "error message"); } }

Solution

  1. add a loop when searching for occurances of BPMNError
  2. parse second parameter of throw new BPMNError(String errorCode, String errorMessage) as well.

I'll open a pull request with a proposed fix.

Thanks for your contribution 👍