2021-08-11 11:46:05 +02:00
|
|
|
mail:
|
|
|
|
host: localhost:25
|
|
|
|
|
2021-08-10 16:56:44 +02:00
|
|
|
directories:
|
|
|
|
- path: /tmp/foo
|
|
|
|
recursive: false
|
2021-08-10 18:31:29 +02:00
|
|
|
events: ["CLOSE_WRITE", "MOVED_TO"]
|
|
|
|
pollingInterval: 60
|
2021-08-10 16:56:44 +02:00
|
|
|
regex: "/[^\\.][^/]+.xml$"
|
2021-09-07 18:09:05 +02:00
|
|
|
ignoreMissing: true
|
2021-08-10 16:56:44 +02:00
|
|
|
actions:
|
2021-08-11 11:46:05 +02:00
|
|
|
- id: postXML
|
|
|
|
description: POST xml
|
|
|
|
type: http
|
2021-08-10 18:31:29 +02:00
|
|
|
method: post
|
|
|
|
url: http://localhost:8080/api/v1/_/renz_einfo/xml
|
|
|
|
header:
|
|
|
|
Token: Ksi02vcaHHasd1sjYxiq4J
|
|
|
|
ContentType: application/xml
|
|
|
|
# content: PLAIN IS FILECONTENT
|
|
|
|
onError:
|
2021-08-11 11:46:05 +02:00
|
|
|
- id: moveXMLError
|
|
|
|
description: MOVE xml to error dir
|
|
|
|
type: move
|
2021-08-10 16:56:44 +02:00
|
|
|
to: /tmp/error/{{ filename }}
|
2021-08-11 11:46:05 +02:00
|
|
|
- id: mailXMLError
|
|
|
|
description: eInfo Import ERROR on POST xml
|
|
|
|
type: mail
|
|
|
|
to: sebastian@webmakers.de
|
|
|
|
subject: "{{ action.Description }}"
|
|
|
|
body: |
|
|
|
|
path: {{ path }}
|
|
|
|
event: {{ event }}
|
|
|
|
|
|
|
|
http status: {{ context.postXML.response.Status }}
|
|
|
|
|
|
|
|
http response body
|
|
|
|
------------------
|
|
|
|
{{ context.postXML.response.Body }}
|
|
|
|
|
|
|
|
from: noreply@webmakers.de
|
2021-08-10 16:56:44 +02:00
|
|
|
stop: true
|
|
|
|
|
2021-08-10 18:31:29 +02:00
|
|
|
onSuccess:
|
2021-08-11 11:46:05 +02:00
|
|
|
- id: deleteXML
|
|
|
|
description: DELETE xml after POST
|
|
|
|
type: delete
|
2021-08-10 18:31:29 +02:00
|
|
|
|
|
|
|
- path: /tmp/foo
|
|
|
|
recursive: false
|
|
|
|
events: ["CLOSE_WRITE", "MOVED_TO"]
|
2021-08-12 16:48:38 +02:00
|
|
|
regex: "/(\\d{2})(\\d{2})(\\d{2})[^/]*.(png|jpe?g|pdf)$"
|
2021-08-10 18:31:29 +02:00
|
|
|
actions:
|
|
|
|
- type: log
|
2021-08-12 16:48:38 +02:00
|
|
|
content: "{{ filename }} {{ regexMatches.1 }} {{ regexMatches.2 }} {{ regexMatches.3 }} {{ regexMatches.4 }}"
|
|
|
|
- type: mkdir
|
|
|
|
path: /tmp/testdir/{{ regexMatches.1 }}/{{ regexMatches.2 }}/{{ regexMatches.3 }}/{{ regexMatches.4 }}
|