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 62 forks source link

Add script hook for import #4678

Open matthias-ronge opened 3 years ago

matthias-ronge commented 3 years ago

Goal: For the import, enable the execution of a script. After the import has performed, the script is activated. METS file and rule set file are passed as parameters, so for example, an import, which is only catalog-specific, but not ruleset-specific, can be adapted. The script hook should be executed after import, before values from the METS file are displayed in the mask for creating a new process.

BartChris commented 2 years ago

This sounds like a good idea. I am wondering wether in addition to that there could be another hook to be executed when somebody wants to save the process. That could be used to check process data which could not be covered by the ruleset, e.g. specific rules for the process title which are checked against some other system.

matthias-ronge commented 2 years ago

I am wondering wether in addition to that there could be another hook to be executed when somebody wants to save the process. That could be used to check process data which could not be covered by the ruleset, e.g. specific rules for the process title which are checked against some other system.

If you want to suggest this, please make it a separate issue. However, it sounds to me like you are trying to solve a problem here that should be solved elsewhere.

Metadata validation should follow static rules if possible, something is valid or something is invalid. These rules can be complex, see development #4229; but it shouldn't be, something is valid depending on what an external system says. Otherwise you can quickly get into situations in which one thing was first valid, then later it is no longer, and then the question is, why was this agreed on (before), though it is invalid (now). This can be particularly annoying if you want to adjust an old process again after years, and all of a sudden it is no longer valid. Or, what if the external system is not available some day?

Side note: The process title is not a metadata. It is handled differently internally. The validation does monitor it separately, and there are different rules. Even with a script that reads the meta.xml, checking the process title is not possible without further ado.

Maybe it would be really good if you describe the problem in a separate issue, so that the community can work towards a solution together. Most of the time, the problems affect others, too.

BartChris commented 2 years ago

Thank you - i will think about your recommendations.