Bonjour à tous,
Je travaille actuellement sur alfresco 5.2.
J'ai créé un répertoire Import avec une règle qui applique la méthode Import sur les fichiers entrant de type acp
Le fichier acp comporte un document et son fichier xml de métadonnées
Si j'importe un fichier acp via l'interface share, la règle se déclenche bien et le fichier est créé avec ses métadonnées
Si je dépose le fichier acp dans le répertoire via un montage cifs, le fichier acp est bien explosé ( doc + xml ) mais l'association des deux ne se fait pas
Comment expliquez vous ce comportement ? avez vous réussi à le contourner ?
Merci à tous pour votre aide
Richard
Salut Richard,
Suite à cet article:
Using Alfresco Rules and Actions it is possible to setup an automated import whereby an ACP file is automatically imported into the Repository when placed into a designated Repository folder (or Space).
For example, the following Rule is defined against an 'Import' folder which has a condition of '*.acp' and if met, has an action to Import the ACP into the 'Dave's Space' folder.
When an ACP file is placed into the 'Import' folder it automatically kicks off the Import process and places the items held in the ACP file into the 'Dave's Space' folder.
The important point to remember, is that the Import will be initiated regardless of how the ACP file was placed into the folder. For example, the Import will initiate if the ACP file was placed there via CIFS, FTP, WebDAV, Web Client or API. This is particularly powerful for system to system data integration.
Je pense que vous allez quitter l'ACP doit avoir la règle créée. Est-ce ainsi que vous faites?
Cris.
Bonjour Cris,
Merci pour cette réponse. C'est exactement la procédure que j'ai mis en place.
Ca ne fonctionne pas via CIFS FTP ou Webdav sur mon instance alfresco 5.2 ( en alfrfesco 3.0 je n'avais pas de souçi )
Du coup, j'ai crée un script python qui me permet d'uploader un fichier acp dans mon répertoire d'import.
A l'issu les règles et actions s'appliquent parfaitement et réponds ainsi à mes besoins.
Je mets en copie le script. Cela servira peut-être à quelqu'un,
import json
import requests
import sys
if len(sys.argv) != 2:
exit(0)
fileName = sys.argv[1]
url = "http://<adresse_serveur_alfresco>:8080/alfresco/service/api/upload"
auth = ("admin", "admin")
files = {"filedata": open(fileName, "rb")}
# remplacer node_id par la référence de votre espace ou doit être uploader le fichier
data = {"destination": "workspace://SpacesStore/<node_id>"}
r = requests.post(url, files=files, data=data, auth=auth)
print(r.status_code)
print(json.loads(r.text))
Merci pour votre aide
Richard
Discussions about Alfresco Content Services and Alfresco Process Services in French
Related:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.