StopFlow
procedure StopFlow;
Example
procedure ScriptEvent(var Value: variant);
begin
if Value = 'STOP' then
begin
Log.Add('Flow cancellation requested');
StopFlow;
Exit;
end;
end;
Usage
StopFlow aliases StopAction, cancelling all views in the current map and marking the enclosing flow log cancelled.
Additional Technical Info
StopFlow is a scripting declaration registered directly to the native StopAction method pointer. There is no separate TvxScripter.StopFlow implementation. At runtime it therefore has exactly the same behaviour as StopAction and StopExecution.
It cancels every view and field in the current map when a field or view context is active and sets Log.IsCancelled to True. The procedure then returns to the next script statement. The example is fictional and source-reviewed only.
Registration detail
The declaration name and native method name intentionally differ:
RegisterDelphiMethod(@TvxScripter.StopAction, 'procedure StopFlow;');
This is an alias, not a wrapper with extra flow semantics. The same implementation chain calls StopExecution, which calls CancelExecution and then marks the log cancelled.
Behaviour and limitations
- A field- or view-map call cancels every view and field in the containing map and clears each view's reprocessing flag.
- Outside a field/view context only the log cancellation is applied.
- The active script is not unwound; use
Exitto skip remaining statements. - Cancellation is observed at processing checkpoints and can be cleared by an action configured with
IgnoreCancel=True. - No failure status or reason is added automatically.
- Existing database, file, transport and other side effects are not rolled back.
Despite the Flow name, it should be treated as a cooperative flag propagated through the current action executor. It is not a process-kill or transactional-abort facility.
Related entries
StopActionis the exact registered native target.StopExecutionsupplies the underlying cancellation implementation.CancelExecutionomits the flow-log cancellation signal.