Skip to main content

Triggering

A route describes what is transferred. Triggering answers the other half: when.

Four ways to start a route​

WayThe occasion behind it
ManuallyYou start the run yourself. Nothing needs to be set up for this — the button is on the execution of every route that has a source of its own.
ScheduledThe route runs on a schedule, regardless of whether anything has changed.
EventThe route reacts to a record being created or changed in SAP Business One.
Dispatch inputThe route is supplied by a dispatch route. This trigger also sets itself up — it is created as soon as a dispatch route lists the route as a target.

Two of them can be set up: schedule and event. A route can carry both at the same time — a nightly run plus a reaction to changes go well together.

Manually is always available in addition: every route with a source of its own can be started, whether with or without a schedule. The one exception is the route supplied by a dispatch route — it lacks a source of its own that a run could look into, and with it the button. What can be started there is the dispatch route.

Which way for what​

In practice three questions decide this:

How fast does it have to be on the other side? For a price that has to be right in the web shop by the next night, a schedule is enough. An order confirmation that someone is waiting for right now needs an event trigger.

How much changes? If around 140 of 2,418 items change every day, the schedule is the calmer way — it collects and transfers in bulk. If something rarely changes, but then urgently, the event is worth it.

Where does the pace come from? Fetching is always done by Xchange: even a message that an external system has placed in a queue sits there until Xchange looks. The question is whose pace applies. With schedule and event it is the pace of the route itself. With dispatch input it is the pace of the dispatch route that supplies it — that route fetches, decides and passes on. That is why a route supplied this way does without a schedule of its own: the pace lies one route further ahead.

In the example: "Artikel Cambira Austria" runs at night at 2:00 AM — the product range is maintained during the day in-house, and the Austrian company needs the current state in the morning. The status messages of the logistics partner take the other way: Kessler places each message in a queue, and "Statusmeldungen Kessler" checks every ten minutes what is there. Each message goes to the route that is responsible for it — pickup, transport, delivery or failed delivery. These four run along at the ten-minute pace, without a schedule of their own.

Full or only what changed​

Every schedule comes with the question of how much it reads:

  • Incremental reads only what has changed since the last run. The normal case.
  • Full reads all records covered by the data filter every time.

A full run takes more time, but puts the same load on the target system. With 2,418 items, all 2,418 are read and prepared, even if only 140 have changed. In the end only the 140 are sent out anyway: Xchange compares each prepared record with the state it last transferred and skips what has stayed the same — in the history these jobs appear as Skipped (no change). A full run therefore makes sense where a record may have changed without its change date moving: the incremental run goes by the date, the full one reads every record.

In addition, Cleanup can be switched on only for a full run. It reports to the target system the records that the route transferred earlier and that today fall out of the data filter. An incremental run sees only what has changed and is therefore blind to a removal — see Routes — Automation.

A route that reads from a queue does without this choice: it processes what is there. "Bestellungen Webshop" fetches every five minutes — it transfers exactly what has arrived since the last time, and the question of full or incremental does not arise.

What is decided elsewhere​

  • Whether something is transferred is determined by the route's data filter — see Routes — Source data.
  • Whether the route runs is determined by its operating state: a stopped route stays still, even when its schedule falls due.
  • From when the change takes effect is determined by activation: a changed trigger takes effect in operation only with the activated configuration snapshot — see Validate and activate.

See also​