I wrote the code for the use case that I require here. But I see that following code in AbstractProcessEngineConfiguration.java reads .bpmn files from the passed process folder. If I need to add functionality to read even sub-folders, I need to add a variable in activitiproperties like 'readBPMfromAddtionalFolder' which is true or false so that based on this value, I can read .bpm files from the folders within 'process' folder. I want to take this route as I do not want to break the existing functionality. Hence wanted to run this across you. I am using Spring-boot for my development. The SpringProcessEngineConfiguration.java calls the below method which is defined in AbstractProcessEngineConfiguration.java.
<code>
public List<Resource> discoverProcessDefinitionResources(ResourcePatternResolver applicationContext, String prefix, List<String> suffixes, boolean checkPDs) throws IOException {
if (checkPDs) {
List<Resource> result = new ArrayList<Resource>();
for (String suffix : suffixes) {
String path = prefix + suffix;
Resource[] resources = applicationContext.getResources(path);
if (resources != null && resources.length > 0) {
for (Resource resource : resources) {
result.add(resource);
}
}
}
if (result.isEmpty()) {
logger.info(String.format("No process definitions were found for autodeployment"));
}
return result;
}
return new ArrayList<Resource>();
}
</code>