10-25-2018 02:54 AM
Bonjour,
Je rencontre un problème concernant l'utilisation du bulkimport et l'intégration de métadonnées.
Je souhaiterais pouvoir importer des documents tout en modifiant le type et les métadonnées des documents.
Pour ce faire, j'ai deux fichiers :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="type">myCM:RH</entry>
<entry key="myCM:serviceRH">FrontOffice</entry>
<entry key="myCM:identificationPortefeuilleRH">4</entry>
</properties>
Je fais appel au bulkimport à partir de curl via la ligne de commande suivante :
curl -v -u admin:admin -L POST --url "localhost:8080/alfresco/s/bulkfsimport/initiate" --data "targetPath=/Sites/ressources-humaines/documentLibrary/&sourceDirectory=/app/tmp/test&existingFileMode=REPLACE"
Mon problème est que LES fichiers sont bien postés dans l'espace documentaire du site ressources-humaines MAIS il n'y a pas l'intégration des métadonnées.
Sauf erreur de ma part, seul le fichier test.pdf devrait être posté ET devrait changer de type avec la mise à jour des métadonnées conformément au fichier xml.
Au niveau du fichier log4j je n'ai pas d'erreur :
2018-10-25 10:36:46,750 DEBUG [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk import started from '/app/tmp/test'...
2018-10-25 10:36:46,752 INFO [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk Filesystem Import: Commencing batch of 100 entries
2018-10-25 10:36:46,753 DEBUG [bulkimport.impl.DirectoryAnalyserImpl] [BulkFilesystemImport-BackgroundThread] Analysing directory /app/tmp/test...
2018-10-25 10:36:46,754 DEBUG [bulkimport.impl.DirectoryAnalyserImpl] [BulkFilesystemImport-BackgroundThread] Finished analysing directory /app/tmp/test.
2018-10-25 10:36:46,758 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] RETRY TXNS: []
2018-10-25 10:36:46,758 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Bulk Filesystem Import1 ready to execute
2018-10-25 10:36:46,759 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Importing org.alfresco.repo.bulkimport.ImportableItem@4ded1775[HeadRevision=org.alfresco.repo.bulkimport.ImportableItem$ContentAndMetadata@20d17725[contentFile=/app/tmp/test/test.pdf,metadatafile=<null>],Versions=<null>]
2018-10-25 10:36:46,759 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Searching for node with name 'test.pdf' within node 'workspace://SpacesStore/e02f9fab-b8dc-47e8-82a0-42004687970b'.
2018-10-25 10:36:46,760 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Creating new node of type '{http://www.alfresco.org/model/content/1.0}content' with name 'test.pdf' within node 'workspace://SpacesStore/e02f9fab-b8dc-47e8-82a0-42004687970b'.
2018-10-25 10:36:46,772 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Streaming contents of file '/app/tmp/test/test.pdf' into node 'workspace://SpacesStore/0fdf9519-e5c2-47bb-9f27-21c6dd5bd2f9'.
2018-10-25 10:36:46,807 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Adding properties to node 'workspace://SpacesStore/0fdf9519-e5c2-47bb-9f27-21c6dd5bd2f9':
[{http://www.alfresco.org/model/content/1.0}name = test.pdf,
{http://www.alfresco.org/model/content/1.0}created = Wed Jul 27 08:52:06 RET 2016,
{http://www.alfresco.org/model/content/1.0}title = test.pdf,
{http://www.alfresco.org/model/content/1.0}modified = Wed Jul 27 08:52:06 RET 2016]
2018-10-25 10:36:46,816 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Importing org.alfresco.repo.bulkimport.ImportableItem@127def54[HeadRevision=org.alfresco.repo.bulkimport.ImportableItem$ContentAndMetadata@6d29748b[contentFile=/app/tmp/test/test.pdf.metadata.xml,metadatafile=<null>],Versions=<null>]
2018-10-25 10:36:46,817 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Searching for node with name 'test.pdf.metadata.xml' within node 'workspace://SpacesStore/e02f9fab-b8dc-47e8-82a0-42004687970b'.
2018-10-25 10:36:46,818 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Creating new node of type '{http://www.alfresco.org/model/content/1.0}content' with name 'test.pdf.metadata.xml' within node 'workspace://SpacesStore/e02f9fab-b8dc-47e8-82a0-42004687970b'.
2018-10-25 10:36:46,828 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Streaming contents of file '/app/tmp/test/test.pdf.metadata.xml' into node 'workspace://SpacesStore/4113de28-833f-4bae-8231-80027935cb02'.
2018-10-25 10:36:46,849 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Adding properties to node 'workspace://SpacesStore/4113de28-833f-4bae-8231-80027935cb02':
[{http://www.alfresco.org/model/content/1.0}name = test.pdf.metadata.xml,
{http://www.alfresco.org/model/content/1.0}created = Tue Sep 18 15:38:50 RET 2018,
{http://www.alfresco.org/model/content/1.0}title = test.pdf.metadata.xml,
{http://www.alfresco.org/model/content/1.0}modified = Tue Sep 18 15:38:50 RET 2018]
2018-10-25 10:36:46,895 INFO [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk Filesystem Import: Processed 2 entries. Rate: 13 per second. 0 failures detected.
2018-10-25 10:36:46,899 INFO [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk Filesystem Import: Completed batch of 100 entries
2018-10-25 10:36:46,899 DEBUG [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk import from '/app/tmp/test' succeeded.
D'avance, merci pour votre aide.
Je suis sous centos 7 et alfresco community 5.2
10-25-2018 07:08 AM
Problème résolu : il fallait que le nom du fichier xml soit : test.pdf.metadata.properties.xml
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.