Skip to content
Weik.ioDocs
2026.2
Try Weik.io

React to a run

Weik.io 2026.2

Each run publishes a summary event that other integrations read with weikio-event-source, and emitPerFile adds an event for every file. Video

Watch: What happened: the files behind a run, 3:28

The video opens a run, lists the files it moved and finds the log line of each file.

On this page

When the morning’s invoices have landed, the invoice processing should start, without anyone polling the storage account. Every run of a transfer publishes its summary into the environment’s event stream, where any integration of the project can read it.

The run summary#

Each run publishes one event when it ends. It has the run’s ID, its start and end, the files, the bytes, the errors and the first error rclone wrote. You list them with the CLI:

Terminal
$ weikio events list --env production --family mft --integration finance/supplier-invoices --since 24h --with-body

Read it in an integration#

An integration reads the transfer’s records with the platform’s weikio-event-source kamelet, with the family mft and the transfer’s name as the channel:

invoice-processing/routes/on-batch.camel.yaml
- route:
    from:
      uri: "kamelet:weikio-event-source?family=mft&channel=supplier-invoices"
      steps:
        - log: "Run of supplier-invoices ended: ${body}"
        - to: direct:process-batch

The integration receives each run summary as soon as Weik.io has stored it. Like every reader of stored events, it gets the summaries published since its first deploy, including those published while it was stopped, and a summary its route fails on is delivered again after the delays of its delivery settings. Delivery and CloudEvents explains the delivery, and Dead letters what happens after the last attempt.

An event for every file#

The summary is one small event per run, which is what most readers need and what stays small inside the environment’s event budget. A transfer whose files each need their own reaction sets emitPerFile: true and publishes both, the summary and one event per file:

finance/transfers/supplier-invoices.yaml
apiVersion: weik.io/v1
kind: mft
metadata: { name: supplier-invoices, project: finance }
spec:
  schedule: "0 0 5 * * ?"
  source:      { remote: supplier-ftp,      path: /outgoing }
  destination: { remote: invoice-archive,   path: invoices/incoming }
  operation: move
  filters: ["*.pdf"]
  emitPerFile: true

Every file still has its own log line whether emitPerFile is on or off. The events are for integrations that react, and the log lines are the record of what moved.

One transfer, two agents#

A transfer that two agents match still runs once. Both agents start a copy, the copies elect a leader through a lock Weik.io keeps, and only the leader runs the schedule. When the leader’s agent goes away, the other copy takes over, so the morning’s run happens even when one agent’s host is down. The readers of the run summaries see one summary per run either way.

One copy at a time shows how to see which copy leads.

Sign in to the live demo

Sign in with the shared viewer account, which can open every screen of the example projects and can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo