-
Bug
-
Resolution: Done
-
Minor
-
None
-
jBPM 5.3
-
None
In case that you have 2 processes in different packages, you can set one process as 'Called Element' in a 'Reusable Subprocess' of another process. But 'Validate Process' will fail with "No existing process with id=xxxx.XXXX could be found." message.
You can reproduce it with the attached repository_export_subprocess_in_different_package.xml.
- Import
- Open 'parentprocess'
- Click 'Validate Process'
BPMN2SyntaxChecker looks at only parent's package.
if(fe instanceof CallActivity) { CallActivity ca = (CallActivity) fe; if(ca.getCalledElement() == null || ca.getCalledElement().length() < 1) { addError((CallActivity) fe, "Reusable Subprocess has no called element specified."); } else { String[] packageAssetInfo = ServletUtil.findPackageAndAssetInfo(uuid, profile); String packageName = packageAssetInfo[0]; List<String> allProcessesInPackage = ServletUtil.getAllProcessesInPackage(packageName, profile); boolean foundCalledElementProcess = false; for(String p : allProcessesInPackage) { String processContent = ServletUtil.getProcessSourceContent(packageName, p, profile); Pattern pattern = Pattern.compile("<\\S*process[\\s\\S]*id=\"" + ca.getCalledElement() + "\"", Pattern.MULTILINE); Matcher m = pattern.matcher(processContent); if(m.find()) { foundCalledElementProcess = true; break; } } if(!foundCalledElementProcess) { addError((CallActivity) fe, "No existing process with id=" + ca.getCalledElement() + " could be found."); } } }