Events and processes from scripts
Documentation status: guide — see Maturity and evidence.
Scripts can participate in event routing, but the event taxonomy should remain explicit.
Event levels
Keep separate:
- local visual events;
- UX functional/intention events;
- application coordination events;
- business or process events.
A visual event should not automatically become a server call or a business mutation.
Event handling pattern
// event parameters are supplied by the declared event mapping
if EventName = 'ValidationRequested' then
begin
Result := true;
end;
The exact event class and parameter mapping belong to metadata. The script implements only the declared reaction.
Process execution pattern
For a multi-step operation:
process := ObjectsContainer.CreateObjectItem('app#review_process', 1, '');
process.Request := CurrentRequest;
process.Start();
Treat this as a capability-oriented recipe: the process model owns subsequent state changes, emitted events, waiting points, and trace entries. Do not move that orchestration into page scripts.