diff --git a/Dockerfile-wildfly-debug b/Dockerfile-wildfly-debug index 320496c..c9866bf 100644 --- a/Dockerfile-wildfly-debug +++ b/Dockerfile-wildfly-debug @@ -1,4 +1,4 @@ -FROM quay.io/wildfly/wildfly:27.0.1.Final-jdk11 +FROM quay.io/wildfly/wildfly:27.0.1.Final-jdk17 LABEL description="Imixs-Process-Manager" LABEL maintainer="ralph.soika@imixs.com" diff --git a/src/main/java/org/imixs/application/model/ModelController.java b/src/main/java/org/imixs/application/model/ModelController.java index 2dced69..d580942 100644 --- a/src/main/java/org/imixs/application/model/ModelController.java +++ b/src/main/java/org/imixs/application/model/ModelController.java @@ -104,7 +104,7 @@ public Set getGroups(String version) { try { BPMNModel model; model = modelService.getModelManager().getModel(version); - return modelService.getModelManager().findAllGroups(model); + return modelService.getModelManager().findAllGroupsByModel(model); } catch (ModelException e) { logger.log(Level.WARNING, "Unable to load groups:{0}", e.getMessage()); } @@ -123,20 +123,18 @@ public Set getGroups(String version) { * The worflowGroup list is used to assign a workflow Group to a core process. * * @return list of workflow groups + * @throws ModelException */ - public List getWorkflowGroups() { + public List getWorkflowGroups() throws ModelException { - // Set set = new HashSet<>(); - // List versions = modelService.getModelManager().getVersions(); List result = new ArrayList<>(); - for (BPMNModel model : modelService.getModelManager().getAllModels()) { String version = BPMNUtil.getVersion(model); // Skip system model.. if (version.startsWith("system-")) { continue; } - Set groups = modelService.getModelManager().findAllGroups(model); + Set groups = modelService.getModelManager().findAllGroupsByModel(model); for (String groupName : groups) { if (result.contains(groupName)) continue; @@ -173,15 +171,12 @@ public ItemCollection findStartTaskByGroup(String version, String group) throws ItemCollection result = null; BPMNModel model = modelService.getModelManager().getModel(version); List startTasks; - try { - startTasks = modelService.getModelManager().findStartTasks(model, group); - if (startTasks.size() > 0) { - result = startTasks.get(0); - } - } catch (BPMNModelException e) { - throw new ModelException(ModelException.INVALID_MODEL, - "Unable to create new workitem by group '" + group + "'", e); + + startTasks = modelService.getModelManager().findStartTasks(model, group); + if (startTasks.size() > 0) { + result = startTasks.get(0); } + if (result == null) { logger.warning("No Model found for Group '" + group + "'"); } @@ -211,12 +206,14 @@ public ItemCollection startWorkflowByTask(String version, ItemCollection startTa } /** - * returns all model versions. Used by the Model View + * Returns a sorted set of all model versions. + *

+ * Used by the Model View. * * @return */ - public List getVersions() { - return modelService.getModelManager().getVersions(); + public Set getVersions() { + return modelService.getModelEntityStore().keySet(); } /** @@ -257,7 +254,6 @@ public void doUploadModel(ActionEvent event) BPMNModel model; try { model = BPMNModelFactory.read(inputStream); - modelService.saveModel(model); continue; } catch (BPMNModelException e) {