Plugin contract reference
A plugin is the implementation behind a nodetype; it implements Plugin through one role interface (TriggerPlugin, ProcessorPlugin or TerminalPlugin) from the plugin-api module.
Roles
Each role interface fixes
getCategory(). TerminalPlugin adds the optional completionMetadata(config): extra metadata for the terminal’s SUCCESS status event, added only when a message reached the terminal; default is an empty map.
Declarations
Two plugins with the same type id stop the server at startup (
IllegalStateException, “Duplicate plugin type”).
Descriptor
PluginDescriptor(description, usagePattern, uiDesign).
UiDesign(color, icon, label, width, height):
Config schema
ConfigField(name, type, required, defaultValue, options, description). options is copied and never null. Factories: required(name, type, description), optional(name, type, defaultValue, description), choice(name, required, defaultValue, description, options...).
With an empty schema the web UI falls back to a raw JSON editor.
Optional operations
Every operation has a default; override only what the plugin needs.
Order for one node:
validateConfig and validateInContext at validation, initialize and prepare at compile, forNode when the run is assembled, then start, process or consume.
forNode returns an instance of the plugin’s own kind; the engine casts it to the role interface it runs.
Failure mode
FailureMode.from(value) parses a config value, trimmed and case-insensitive; null yields ERROR; an unknown value throws IllegalArgumentException.
Run context
The engine supplies these through the Reactor context; both are absent outside a workflow run.Shared helpers
Control-plane variant
ControlPlanePlugin extends ExecutionSupervisor, not Plugin.