Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
Issue #886
  • Loading branch information
rsoika committed Nov 26, 2024
1 parent ab74a4d commit 6f5cafd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public BPMNModel findModelByWorkitem(ItemCollection workitem) throws ModelExcept
if (!versions.isEmpty()) {
String newVersion = versions.iterator().next();
if (!newVersion.isEmpty()) {
logger.log(Level.WARNING, "Deprecated model version: ''{0}'' -> migrating to ''{1}'',"
logger.log(Level.WARNING, "Missing model version: ''{0}'' -> migrating to ''{1}'',"
+ " $workflowgroup: ''{2}'', $uniqueid: {3}",
new Object[] { version, newVersion, workitem.getWorkflowGroup(),
workitem.getUniqueID() });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ private void collectWorkitemsInDue(ItemCollection event, String modelVersion, Li
if (!modelVersion.equals(workitem.getModelVersion())) {
// test if the old model version still exists.
try {
modelService.getModel(workitem.getModelVersion());
modelService.getModelManager().getModel(workitem.getModelVersion());
logger.finest("......skip because model version is older than current version...");
// will be processed in the following loops..
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,18 +587,8 @@ public ItemCollection processWorkItem(ItemCollection workitem)
workitem.replaceItemValue("type", DEFAULT_TYPE);
}

/*
* Lookup current processEntity. If not available update model to latest
* matching model version
*/
BPMNModel model = null;
try {
model = this.getModelManager().getModel(workitem.getModelVersion());
} catch (ModelException e) {
throw new ProcessingErrorException(WorkflowService.class.getSimpleName(),
ProcessingErrorException.INVALID_PROCESSID, e.getMessage(), e);
}

// Lookup current model. If not found update model by regex
BPMNModel model = modelService.getModelManager().findModelByWorkitem(workitem);
WorkflowKernel workflowkernel = new WorkflowKernel(this);
// register plugins...
registerPlugins(workflowkernel, model);
Expand Down

0 comments on commit 6f5cafd

Please sign in to comment.