Hotfolder
Configuration
En plus de pouvoir démarrer des workflows manuellement, il est aussi possible de démarrer certains workflows automatiquement. Cette automatisation est réalisée au travers de d'un "hotfolder". Un hotfolder est un dossier qui est "observé": si un SIP y est déposé, le traitement de ce SIP démarre automatiquement avec un workflow spécifique.
La configuration des hotfolders est réalisée dans le fichier <dossier d'installation>\config\doc_observer.yml.
label_of__hotfolder:
directory_watcher:
directory: /tmp # directory to watch
glob: */** # pattern for files to watch
interval: 5.0 # interval between runs (in seconds)
stable: 2 # number of runs until a file is stable (only trigger when copying is finished)
persist: /tmp/dw_state.yml # path for persistence file
webservice:
uri: localhost:3000 # base uri for feeder
api_token: abc123 # api token for API
workflow_id: 3 # id of the workflow to execute
queue_name: fast-queue # optional queue name, if not given the organisation queue is used
# (name of the queue "Meine Organisation".paremeterize() -> "meine-organisation")
# to run the corresponding worker: "QUEUES=fast-queue rails jobs:work"
path:
parent: false # submit the parent path of the object { true | false (default) }
absolute: false # submit the absolute path of the object { true | false (default) }
extension: false # submit the filename with the extension { true | false (default) }
temporary_folder_path: C:/temp # once the file is stable, move it here and send this path to the workflow execution