Action
Action: TvxActionMan
Example
procedure ScriptEvent(var Value: variant);
begin
Value := Action.ModuleName;
end;
Usage
Provides the current Velox action/flow object for the script execution.
Behaviour
ActionandFloware aliases, not copies and not parent/child objects.- Property changes or method side effects through either alias affect the same action object.
- In normal execution the object belongs to the current action context. Do not cache it for another execution or thread.
- In design/reference contexts, the fallback action can have default/empty state. A non-nil reference alone does not prove that a configured flow is executing.
- The variable declaration is not
const, but scripts should not replace or nil the reference; doing so only disrupts their view of host context.
Ownership, errors and side effects
Velox owns the instance. Never call Free on it. Reading the reference has no I/O, but accessed properties/methods can log, query, mutate, start work or raise exceptions as documented for TvxActionMan. Errors from member access propagate unless the called member handles them.
Additional Technical Info
Action is the host-provided TvxActionMan for the current script. It exposes the live action/flow object and is exactly the same instance as Flow.
The object reference is available as execution context. Treat the reference itself as read-only and host-owned. Members exposed by TvxActionMan can read or change live action state according to their individual contracts.
Implementation
During compilation, Velox registers both Action and Flow as TvxActionMan. Before execution, SetVariableInstances resolves lAction := TvxActionMan(Action) and binds both names to that same pointer.
The backing GetAction resolver first uses the action associated with the current custom map item or script item. If no action is available, it creates a scripter-owned TvxActionMan fallback for map design. That fallback makes the reference non-nil but does not represent a configured, running production flow.
Performance and concurrency
Retrieving the already-bound reference is constant-time. The object represents mutable execution state and is not documented as a general cross-thread object; use it only inside the current script execution.
Related entries
Created 2026-07-15