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
Update XslProcessApi to process the draft copies for the metadata in a workflow #5811
Conversation
When this branch using a fresh checkout of main
While geoetwork logs are empty, the browser console shows some errors:
|
Loading sample data, indicates sucess in the UI, but the resulting editor board is empty. Checking logs shows:
Going to try and recate the ES environment and try again. |
Notes:
|
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.
@josegar74 this PR is preventing loading sample data, so I am unable to test the ability to bulk process with a draft metadata record in the mix.
I also tested the main branch on its own, while the ui errors still occur, it can add sample records.
@jodygarnett I tested with latest Afaik, the code changes are not involved in the sample loading. Steps done, using a ES docker image:
|
Some of the trouble is the instructions for running ES are not yet merged (so I do not know exactly what you are running). I also note the Starting from a fresh checkout of main:
Notes
Result: |
Ignoring the UI error and trying a few things:
The user interface indicates the sample data loaded, but the result is not shown in the editor console. The editor console initially takes 2 mins to load. The logs show some failures when loading sample data:
|
@jodygarnett |
Notes:
|
Regarding the You can read more on it at the following url. |
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.
Tested with this procedure:
- Create 5 new records (
A
,B
,C
,D
andE
) - Enable the workflow in
A
record - Publish record
A
. - Create a draft copy of
A
,A'
. - Add records
A
,B
, andC
to a selection bucket. - Execute a batch process using the API passing the name of the bucket.
- In the response
numberOfRecords
andnumberOfRecordsProcessed
are set to4
. In themetadata
field 4 ids are returning, including theA'
draft's id.
{
"errors": [],
"infos": [],
"uuid": "858f74c8-25bb-43e8-8aa7-acaf04e6eafd",
"metadata": [
128,
123,
124,
125
],
"metadataErrors": {},
"metadataInfos": {},
"processId": "url-host-relocator",
"noProcessFoundCount": 0,
"numberOfRecordNotFound": 0,
"numberOfRecordsNotEditable": 0,
"numberOfRecordsWithErrors": 0,
"numberOfRecordsProcessed": 4,
"numberOfRecords": 4,
"numberOfNullRecords": 0,
"startIsoDateTime": "2021-11-09T11:17:34.765Z",
"endIsoDateTime": "2021-11-09T11:17:37.813Z",
"ellapsedTimeInSeconds": 3,
"totalTimeInSeconds": 3,
"running": false,
"type": "XsltMetadataProcessingReport"
}
…a in a workflow (#5811) * Update XslProcessApi to process the draft copies for the metadata in a workflow * mend
…a in a workflow (#5811) * Update XslProcessApi to process the draft copies for the metadata in a workflow * mend
When the workflow is enabled the batch processing works fine in these cases:
But it's not working fine If the metadata is approved and has a working copy. In this case it's processing all the records, but updating only the approved version, not the draft version.
This PR updates the batch processing API to handle both versions of the metadata. For now, in the total number of records are counted the approved and draft versions. This is something to improve in the report, but will require some refactor of the current report.