Workflow curation incorrect nesting causes multiple applications of the same task per object. #9496
Labels
bug
component: workflow
Related to approval workflow or configurable workflow
help wanted
Needs a volunteer to claim to move forward
Milestone
Describe the bug
Code in org.dspace.curate.XmlWorkflowCuratorServiceImpl is incorrectly nested. We should first fill the Curator with Tasks and then queue or curate the object. What we're actually doing is curating the object once for each Task in the taskset of the Step as Tasks are added to the Curator. The comment is wrong too: it is the Step that has a queue, not each Task.
DSpace/dspace-api/src/main/java/org/dspace/curate/XmlWorkflowCuratorServiceImpl.java
Lines 141 to 150 in 10362d9
To Reproduce
Unknown at this time, but the code is clearly wrong. Probably just set up a workflow step with two tasks, submit an item through that workflow, and observe double execution of one of the tasks by inspecting the log.
Expected behavior
The tasks attached to a workflow step should each be run only once over the workflow item whenever the step is entered.
The text was updated successfully, but these errors were encountered: