The earlier durchstich-gewo-14.yaml used the templated
${{ inputs.x }} syntax and rich input declarations
(type / required / description). chain 0.16 expects the
simpler $inputs.x form and flat 'inputs: { name: type }'
maps — see flows/hello.yaml in fai/chain. Rewritten to match.
Adds two siblings:
- test-cohort.yaml: trivial stats.cohort_size-only smoke
test. Confirms a Recl∆Im module loads, instantiates against
the chain:platform/invoke@1.0.0 ABI, and writes a clean
flow.completed event. Useful as the first test you run
when wiring a fresh hub.
- durchstich-from-file.yaml: end-to-end demo without the
http.request permission dance. Takes the source XML as a
bytes input (--input content=@./norm.xml), runs through
text.akoma_normalize, stats.cohort_size and the
system.approval gate, and writes the norm + cohort bag to
the audit log. First end-to-end Recl∆Im flow that survives
a hub restart with audit-trail intact.
Verified locally: chain run flows/test-cohort.yaml → flow.completed
in 5 ms; chain run flows/durchstich-from-file.yaml + approve →
flow.completed in 6 s, output bag carries normalized GewO §14
with paragraphs + source_sha256.
Signed-off-by: flemming-it <sf@flemming.it>
39 lines
941 B
YAML
39 lines
941 B
YAML
# Vertikaler Durchstich, Variante "ohne http-Permission".
|
|
#
|
|
# Nimmt das Norm-XML als bytes-Input direkt entgegen (statt es
|
|
# über http.request zu ziehen). Sinnvoll für den ersten end-to-
|
|
# end-Test gegen den lokal laufenden Hub, wenn dessen Operator-
|
|
# Policy noch keine Allowlist für gesetze-im-internet.de hat.
|
|
#
|
|
# Aufruf:
|
|
# chain run flows/durchstich-from-file.yaml \
|
|
# --input content=@/tmp/gewo-14-mini.xml \
|
|
# --input cohort_id=berlin-kmu
|
|
|
|
name: durchstich-from-file
|
|
|
|
inputs:
|
|
content: bytes
|
|
cohort_id: text
|
|
|
|
steps:
|
|
- id: normalize
|
|
use: text.akoma_normalize@^0
|
|
with:
|
|
content: $inputs.content
|
|
mime: "application/xml"
|
|
|
|
- id: cohort
|
|
use: stats.cohort_size@^0
|
|
with:
|
|
cohort_id: $inputs.cohort_id
|
|
|
|
- id: review
|
|
use: system.approval@^0
|
|
with:
|
|
title: "Recl∆Im — Review GewO §14"
|
|
payload: $normalize.norm
|
|
|
|
outputs:
|
|
norm: $normalize.norm
|
|
cohort: $cohort.cohort
|