Skip to content

Start flow ​

Starts another flow of the repository, in the same way as pressing Start for it, and then calls Continue either right after the flow has started or after it has stopped. No data is passed to the started flow and nothing is returned from it.

Pins ​

PinKindTypesDescription
InputinputanyEach record starts the configured flow.
ContinueoutputanyCalled with the original input record and metadata, after start or after end (see WaitForFinish).

Configuration ​

FieldTypeDefaultDescription
FlowIdflow (FlowExplorer)Required. The flow to start, picked in the flow explorer. The stored value is the flow id.
WaitForFinishbooleanfalsefalse: call Continue as soon as the flow has started. true: call Continue when the started flow has stopped.

Behaviour ​

  • The flow is started as a normal flow (not in debug mode, as the system user): its start components (unconnected start / input pins, Timers, listeners) run as usual.
  • If the target flow is already running, the start request is accepted without restarting it, and Continue is called as for a successful start.
  • With WaitForFinish = true, Continue is called when the started flow is unloaded from the host. A flow that keeps running (Timer, listeners, keep-alive setting) never ends, so Continue is never called.
  • Continue is called from a background thread after Execute has returned; the component that sent the record does not wait for it.
  • A flow cannot start itself (error).

Notes ​

  • The started flow receives no input data. To send data to another flow and receive a result, build the other flow as a flow plugin (a "Plugin port" entry point with a "Plugin port response") and use it as a component; Start flow does not trigger "Plugin port" components.
  • Start failures (unknown flow, build errors) are raised on a background thread: they are not passed back to the caller and are not caught by Try catch; Continue is simply not called.
  • Each record adds new start / end handlers to the component and they are never removed. When the component processes several records, later starts / ends also call Continue again for earlier records (with their old data). Use it for a single trigger per flow run (e.g. from a Timer or at flow start) rather than per record.

Example ​

json
{ "FlowId": "3f1c2a7e-0b4d-4c55-9a7e-1d2f3a4b5c6d", "WaitForFinish": true }

Timer → Start flow → Log

Viaducta documentation