-
Notifications
You must be signed in to change notification settings - Fork 63
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
Creating processes using the Active MQ interface #6183
base: master
Are you sure you want to change the base?
Conversation
Kitodo/src/main/java/org/kitodo/production/interfaces/activemq/CreateNewProcessOrder.java
Show resolved
Hide resolved
Metadata groups are supported. See also in the “send class” above: Map<String, Object> author = new HashMap<>();
author.put("RoleCode", "aut");
author.put("FirstName", "Max");
author.put("LastName", "Mustermann");
metadata.put("Person", author); |
252cb75
to
2f49283
Compare
We have already tested this branch several times and it works well for us so far. @solth what would be needed for this to be merged? |
For starters, there are conflicts that need to be resolved before this pull request can be merged. Additionally, it is a draft, so it seems @matthias-ronge is still working on it and hasn't deemed it ready for review, yet, himself. |
I must limit my previous statement to some extent. We had tested creating processes by importing metadata froam a catalog. It works fine. We have now tested creating a process and passing its metadata vie ActiveMQ and have not been able to get it to work. We used the code given above but the only metadata field that was not empty aftewards was DocType. Of course we adapted the example to include only metadata fields that we have defined in our ruleset. Also @matthias-ronge could you please comment on the previous statement? Is this a draft or a real PR? Can you add documentation and resolve the merge conflicts? |
I had initially set the pull request as a draft to see if it would be sufficient to all your testings as well. Then I forgot to change it. I will resolve the merge conflicts and I will take a closer look to the metadata, to see if this is a bug in the program or in the example code. Expect my reply soon. |
2f49283
to
a2f15f4
Compare
Thank you for looking into it. FWIW, here is the sample code we used, adapted to our ruleset:
The created process has no metadata besides the doctype. |
I was able to reproduce the error. The code forgot to specify the location of the metadata storage, so when saving, it didn't know where to put it, and discarded it. I have now fixed that; the metadata is currently always stored in |
@aetherfaerber would you or a colleague of yours be willing and confident to review this pull request? That includes checking the code as well as testing the functionality (which you already did, if I am not mistaken). |
Yes, we already tested the functionality and can also confirm that the fix to the problem I reported earlier works well. Everything works as expected. While investigating the error we already had a brief look at the code. We can also try to check it but are not sure what this should include. We can offer to go through it and check for unclear variable names, missing comments, possible unrelated changes and the like. An in-depth analysis on code architecture/efficiency/standards is probably out of our league here. Do the CQ-Pipelines in this repository already check for conformance to the guidelines at https://www.kitodo.org/fileadmin/groups/kitodo/Dokumente/Kitodo-EntwicklerLeitfaden_2017-06.pdf ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have read through the code changes and had a close look at various important aspects. We approve the changes.
Method process length is 53 lines (max allowed is 50).
5bba94b
to
8044732
Compare
@aetherfaerber thank you very much for your review. And sorry I forgot to reply to your question earlier. Those are the correct, current coding guidelines you mentioned, even though they are quite old and long overdue for reevaluation. |
@BartChris does this pull request resolve #4837 for you? |
You can use this function to create processes using the Active MQ interface. Examples:
Without a catalog (all data is passed):
Or, use a catalog import: