diff --git a/imixs-workflow-core/src/main/java/org/imixs/workflow/WorkflowKernel.java b/imixs-workflow-core/src/main/java/org/imixs/workflow/WorkflowKernel.java index b1286a970..59869e9f7 100644 --- a/imixs-workflow-core/src/main/java/org/imixs/workflow/WorkflowKernel.java +++ b/imixs-workflow-core/src/main/java/org/imixs/workflow/WorkflowKernel.java @@ -280,7 +280,7 @@ public ItemCollection process(final ItemCollection workitem) throws PluginExcept } // store last $lastTask - documentResult.replaceItemValue("$lastTask", workitem.getProcessID()); + documentResult.replaceItemValue("$lastTask", workitem.getTaskID()); // Check if $WorkItemID is available if ("".equals(workitem.getItemValueString(WorkflowKernel.WORKITEMID))) { @@ -343,7 +343,7 @@ public ItemCollection findNextTask(ItemCollection documentContext, ItemCollectio } else { // get current task... itemColNextTask = this.ctx.getModelManager().getModel(documentContext.getItemValueString(MODELVERSION)) - .getTask(documentContext.getProcessID()); + .getTask(documentContext.getTaskID()); } return itemColNextTask; } @@ -467,7 +467,7 @@ private ItemCollection processEvent(final ItemCollection documentContext, final // Update the attributes $ProcessID and $WorkflowStatus documentResult.replaceItemValue(PROCESSID, Integer.valueOf(itemColNextTask.getItemValueInteger("numprocessid"))); - logger.finest("......new $processid=" + documentResult.getProcessID()); + logger.finest("......new $processid=" + documentResult.getTaskID()); documentResult.replaceItemValue(WORKFLOWSTATUS, itemColNextTask.getItemValueString("txtname")); logger.finest("......new $workflowStatus=" + documentResult.getItemValueString(WORKFLOWSTATUS)); // update deprecated attributes txtworkflowStatus and txtworkflowGroup @@ -536,7 +536,7 @@ private ItemCollection findConditionalExclusiveTask(ItemCollection event, ItemCo // we update the documentContext.... ItemCollection itemColEvent = this.ctx.getModelManager() .getModel(documentContext.getModelVersion()) - .getEvent(documentContext.getProcessID(), eventID); + .getEvent(documentContext.getTaskID(), eventID); if (itemColEvent != null) { // create follow up event.... @@ -546,7 +546,7 @@ private ItemCollection findConditionalExclusiveTask(ItemCollection event, ItemCo // get current task... ItemCollection itemColNextTask = this.ctx.getModelManager() .getModel(documentContext.getItemValueString(MODELVERSION)) - .getTask(documentContext.getProcessID()); + .getTask(documentContext.getTaskID()); return itemColNextTask; } @@ -611,7 +611,7 @@ private ItemCollection findConditionalSplitTask(ItemCollection event, ItemCollec // we update the documentContext.... ItemCollection itemColEvent = this.ctx.getModelManager() .getModel(documentContext.getModelVersion()) - .getEvent(documentContext.getProcessID(), eventID); + .getEvent(documentContext.getTaskID(), eventID); if (itemColEvent != null) { // create follow up event.... event.replaceItemValue("keyFollowUp", "1"); @@ -619,7 +619,7 @@ private ItemCollection findConditionalSplitTask(ItemCollection event, ItemCollec // get current task... ItemCollection itemColNextTask = this.ctx.getModelManager() .getModel(documentContext.getItemValueString(MODELVERSION)) - .getTask(documentContext.getProcessID()); + .getTask(documentContext.getTaskID()); return itemColNextTask; } } @@ -686,12 +686,12 @@ private void evaluateSplitEvent(ItemCollection event, ItemCollection documentCon // we update the documentContext.... ItemCollection itemColEvent = this.ctx.getModelManager() .getModel(documentContext.getModelVersion()) - .getEvent(documentContext.getProcessID(), eventID); + .getEvent(documentContext.getTaskID(), eventID); if (itemColEvent != null) { // get current task... ItemCollection itemColNextTask = this.ctx.getModelManager() .getModel(documentContext.getItemValueString(MODELVERSION)) - .getTask(documentContext.getProcessID()); + .getTask(documentContext.getTaskID()); // clone current instance to a new version... ItemCollection cloned = createVersion(documentContext); diff --git a/imixs-workflow-core/src/test/java/org/imixs/workflow/TestItemCollection.java b/imixs-workflow-core/src/test/java/org/imixs/workflow/TestItemCollection.java index 591dc12ab..990e9e9d0 100644 --- a/imixs-workflow-core/src/test/java/org/imixs/workflow/TestItemCollection.java +++ b/imixs-workflow-core/src/test/java/org/imixs/workflow/TestItemCollection.java @@ -756,6 +756,7 @@ public void testFluentInterface() { /** * Test issue #383, #384 */ + @SuppressWarnings("deprecation") @Test @Category(org.imixs.workflow.ItemCollection.class) public void testDeprecatedFieldProcessID() { diff --git a/imixs-workflow-core/src/test/java/org/imixs/workflow/util/TestJSONParser.java b/imixs-workflow-core/src/test/java/org/imixs/workflow/util/TestJSONParser.java index f47197139..e36348565 100644 --- a/imixs-workflow-core/src/test/java/org/imixs/workflow/util/TestJSONParser.java +++ b/imixs-workflow-core/src/test/java/org/imixs/workflow/util/TestJSONParser.java @@ -80,7 +80,7 @@ public void testSimpleNumbers() throws ParseException { Assert.assertNotNull(itemCol); Assert.assertEquals(10, itemCol.getEventID()); - Assert.assertEquals(100, itemCol.getProcessID()); + Assert.assertEquals(100, itemCol.getTaskID()); } @Test(expected = ParseException.class) @@ -114,7 +114,7 @@ public void testComplexWorkitem() throws ParseException { Assert.assertNotNull(itemCol); - Assert.assertEquals(20, itemCol.getProcessID()); + Assert.assertEquals(20, itemCol.getTaskID()); Assert.assertEquals("worklist", itemCol.getItemValueString("txtworkflowresultmessage"));