Interface ScriptEventListener


public interface ScriptEventListener
Interface for receiving script execution events. Implementations can use these events to update the UI or log execution progress.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ScriptEventListener
    A no-op implementation of ScriptEventListener.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onLog(String level, String message)
    Called when a script logs a message (via Print node).
    void
    Called when a node completes execution successfully.
    void
    onNodeError(String nodeId, String error)
    Called when a node encounters an error during execution.
    void
    Called when a node starts executing.
    void
    Called when the script execution is cancelled.
    void
    onScriptCompleted(boolean success)
    Called when the entire script completes execution.
  • Field Details

  • Method Details

    • onNodeStarted

      void onNodeStarted(String nodeId)
      Called when a node starts executing.
      Parameters:
      nodeId - the unique identifier of the node
    • onNodeCompleted

      void onNodeCompleted(String nodeId, Map<String, NodeValue> outputs)
      Called when a node completes execution successfully.
      Parameters:
      nodeId - the unique identifier of the node
      outputs - the output values produced by the node
    • onNodeError

      void onNodeError(String nodeId, String error)
      Called when a node encounters an error during execution.
      Parameters:
      nodeId - the unique identifier of the node
      error - description of the error that occurred
    • onScriptCompleted

      void onScriptCompleted(boolean success)
      Called when the entire script completes execution.
      Parameters:
      success - true if the script completed without errors
    • onScriptCancelled

      void onScriptCancelled()
      Called when the script execution is cancelled.
    • onLog

      default void onLog(String level, String message)
      Called when a script logs a message (via Print node).
      Parameters:
      level - the log level (debug, info, warn, error)
      message - the log message