kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
63 stars 63 forks source link

"repeatOnCorrection" flag not set correctly when configuring workflow #4342

Closed solth closed 3 years ago

solth commented 3 years ago

When checking the correction checkbox for a step in the workflow editor, the resulting task should have the repeatOnCorrection flag set to true, but that is not the case. Checking the mentioned checkbox doesn't seem to have any effect on the created tasks.

Bildschirmfoto 2021-04-16 um 09 42 02
solth commented 3 years ago

It seems the corresponding repeatOnCorrection attribute is already missing from the bpmn.xml file created by the workflow editor. @Erikmitk could you check the editor and see if this flag is skipped when creating the workflow?

Erikmitk commented 3 years ago

The property is called correction in the editor and has never been called repeatOnCorrection before. If this is the only thing that's depending on this propertie's name I can simply rename it.

Kathrin-Huber commented 3 years ago

Can you tell me the difference, between the "correction" attribute and the "repeatOnCorrection" attribute of the Task? Cause it has both. Neither is used anywhere in the code (except for tests).

matthias-ronge commented 3 years ago

The property correction is probably a mapping of whether a task of a process is a correction task. In version 2, this was saved in the prioritaet field, where 0 indicated a normal task and 10 indicated a correction task. :persevere: This prioritaet field no longer exists in version 3. :sweat_smile: I suspect that should be reflected here. The property is semantically invalid for tasks of process templates (where I would expect it to be null), but it makes sense for tasks of processes.

repeatOnCorrection is explained in the Javadoc as:

Get information if task should be repeated on correction.

That would be a new feature if it were implemented. In version 2, I was told, all steps of the workflow after the corrected step were always run through again.

Kathrin-Huber commented 3 years ago

Actually I thought this is already working. But it seems to be, there is missing something...

matthias-ronge commented 3 years ago

In version 2, correction tasks are automatically placed at the top of the list. I suspect that the query database is sorted numerically on the prioritaet field. So it makes sense with the numbers after all. If you move the mouse over the red C, it also shows what is the error here.

Version 2 with correction steps

I suspect this is missing in version 3. But it is important for business operations that this continues to happen.

There is also a filter “remove correction steps” in version 3, but on a quick search, I don't have found the code behind it, where it is implemented. But maybe I missed the spot.

Remove correction steps menu

solth commented 3 years ago

I suspect this is missing in version 3. But it is important for business operations that this continues to happen.

This is indeed implemented in Kitodo.Production 3 as well and results in a similar indication in the process and task lists (given the corresponding column is displayed!):

Bildschirmfoto 2021-09-21 um 14 19 15

Note that the "K" is grey because the corresponding problem has been marked as "solved". Until then it is red/orange.

There is also a filter “remove correction steps” in version 3, but on a quick search, I don't have found the code behind it, where it is implemented. But maybe I missed the spot.

This already works and hides all tasks for which the correction flag is 1 (those marked with the correction K, see above).

solth commented 3 years ago

This issue is indeed solved by #4630 but the correction workflow does not yet work as intended, because the flag is not used. Therefore I close this issue and add a new one describing the separate problem #4686