New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In workflow-attached curation, separate task-list building from execution. #9497
base: main
Are you sure you want to change the base?
Conversation
The old code would curate the object once for each task, meaning that all but one task would be executed N times up to the length of the list.
Thanks @mwoodiupui. I tested on DSpace 7.6.1 with the following workflow curation task configuration: ...
<tasksets>
<taskset name="metadata-curation">
<flowstep name="editstep">
<task name="normalizedois" />
</flowstep>
<flowstep name="finaleditstep">
<task name="countrycodetagger" />
</flowstep>
</taskset>
</tasksets> Before the patchImmediately after depositing the submission into the workflow, I see the following: $ tail -f dspace.log | grep -A1 org.dspace.curate
2024-04-24 07:47:36,759 INFO 1859f123-6a5c-42a2-813d-ed0b2b1ef962 e09685ef-ecf5-40c9-b01d-6b776c4cd65e org.dspace.curate.Curator @ Curation task: normalizedois performed on: workflow item: bf20d42e-b9a6-4125-87d5-ed84a75a3755 with status: 0. Result: 'Normalized 1 DOI(s)'
2024-04-24 07:47:36,759 WARN 1859f123-6a5c-42a2-813d-ed0b2b1ef962 e09685ef-ecf5-40c9-b01d-6b776c4cd65e org.dspace.curate.XmlWorkflowCuratorServiceImpl @ No contacts were found for workflow item 50129: task normalizedois returned action none with message Normalized 1 DOI(s)
2024-04-24 07:47:36,759 INFO 1859f123-6a5c-42a2-813d-ed0b2b1ef962 e09685ef-ecf5-40c9-b01d-6b776c4cd65e org.dspace.curate.XmlWorkflowCuratorServiceImpl @ Curation tasks over item bf20d42e-b9a6-4125-87d5-ed84a75a3755 for step editstep report:%nNormalized 1 DOI(s)All DOIs already normalizedAll DOIs already normalizedAll DOIs already normalizednull: no countries, skipping.Normalized 1 DOI(s)
2024-04-24 07:47:36,761 INFO 1859f123-6a5c-42a2-813d-ed0b2b1ef962 e09685ef-ecf5-40c9-b01d-6b776c4cd65e org.dspace.content.Item @ aorth@mjanja.ch::update_item:item_id=bf20d42e-b9a6-4125-87d5-ed84a75a3755 Note how the "Normalize DOIs" task runs multiple times, and the country code tagger task also runs, despite only being configured for the After the patchImmediately after depositing the submission into the workflow, I see the following: $ tail -f /home/dspace7/log/dspace.log | grep -A1 org.dspace.curate
2024-04-24 07:56:37,439 INFO 1859f123-6a5c-42a2-813d-ed0b2b1ef962 1b8d1bfc-b4c3-413a-8a46-13edb456ca0f org.dspace.curate.Curator @ Curation task: normalizedois performed on: workflow item: 51c38bf0-fabe-4b41-aad8-fb27ee42b177 with status: 0. Result: 'Normalized 1 DOI(s)'
2024-04-24 07:56:37,440 WARN 1859f123-6a5c-42a2-813d-ed0b2b1ef962 1b8d1bfc-b4c3-413a-8a46-13edb456ca0f org.dspace.curate.XmlWorkflowCuratorServiceImpl @ No contacts were found for workflow item 50130: task normalizedois returned action none with message Normalized 1 DOI(s)
2024-04-24 07:56:37,441 INFO 1859f123-6a5c-42a2-813d-ed0b2b1ef962 1b8d1bfc-b4c3-413a-8a46-13edb456ca0f org.dspace.curate.XmlWorkflowCuratorServiceImpl @ Curation tasks over item 51c38bf0-fabe-4b41-aad8-fb27ee42b177 for step editstep report:
Normalized 1 DOI(s) The "Normalize DOIs" task runs once, and the country code tagger task is not run. This is the correct behavior. |
As it sounds like this is working, I'm pulling this over to the 8.0 board and flagging as |
It was draft because I hadn't had time to test it. |
Let's hold off on this. I tested current DSpace 7.6.1 again several times with the same configuration before this patch and I cannot re-produce the original issue. 🤔 |
The old code would curate the object once for each task, meaning that all but one task would be executed N times up to the length of the list. This patch first configures the Curator with tasks, and then runs it once (or queues it).
References
Description
Completely configure the Curator before using it.
Instructions for Reviewers
List of changes in this PR:
%n
with newline in report outputSee comments for a good test procedure.
Checklist
pom.xml
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.