action method

FutureOr<bool> action(
  1. Function action, {
  2. required C host,
  3. Arguments? arguments,
})

Validates the execution of a functional action and its associated arguments on the host cell, supporting Hybrid Convergence.

This method is the operational heart of the TestActionRule. It serves as the Transactional Guard for the reactive graph, ensuring that imperative operations—treated as first-class system events—satisfy defined security, integrity, and business invariants before being permitted to modify state.

When to use

You don't call this directly – the framework invokes it automatically when Cell.apply is called. It can be called manually for testing.

How it works

It delegates to the base call method, which evaluates the rule and parent chain.

Non‑obvious

  • The method returns FutureOr<bool>, so it can be sync or async.
  • The host is required; if null, the validation passes.
  • The arguments can be inspected to enforce parameter constraints.

Parameters:

  • action: The Function being requested.
  • host: The Cell on which the action is to be performed.
  • arguments: A tuple of positional and named arguments.

Returns:

true if the action is authorized; false otherwise.

Implementation

FutureOr<bool> action(Function action,
    {required C host, Arguments? arguments}) {
  return call(action, host: host, arguments: arguments);
}