Relationship between FlowEngine and Plugins
FlowEngine is not a plugin, but a core API provided for plugins to use, connecting core capabilities with business extensions.
In NocoBase 2.0, all APIs are centralized in FlowEngine, and plugins can access FlowEngine via this.engine.
Context: Centrally Managed Global Capabilities
FlowEngine provides a centralized Context that brings together the APIs needed for various scenarios, for example:
Note: Context in 2.0 solves the following problems from 1.x:
- Scattered context, inconsistent calls
- Context is lost between different React render trees
- Can only be used within React components
For more details, see the FlowContext chapter.
Shortcut Aliases in Plugins
To simplify calls, FlowEngine provides some aliases on the plugin instance:
this.context→ equivalent tothis.engine.contextthis.router→ equivalent tothis.engine.context.router
Example: Extending the Router
In this example:
- The plugin extends the route for the
/path using thethis.router.addmethod; createMockClientprovides a clean mock application for easy demonstration and testing;app.getRootComponent()returns the root component, which can be directly mounted to the page.

