Plugins
Plugins extend WorkflowRuntime with pre-built actions, rules, and custom activities. Instead of writing custom IWorkflowActionProvider or IWorkflowRuleProvider implementations for common patterns like HTTP requests, approval cycles, or LDAP integration, you register a plugin with a single method call and assign its capabilities in your workflow schemes. Start with the Basic Plugin to get common actions and rules out of the box.
The registration snippets below omit the required base runtime setup. Complete Workflow Runtime configuration before calling StartAsync().
// Required builder, persistence provider, and other base runtime setup are omitted.var runtime = new WorkflowRuntime() .WithPlugin(new BasicPlugin());await runtime.StartAsync();How plugins work
A plugin is a class that implements IWorkflowPlugin. When you call runtime.WithPlugin(plugin), the runtime inspects which provider interfaces the plugin also implements and registers each one automatically. A single plugin can provide any combination of:
| Interface | What it adds |
|---|---|
| IWorkflowActionProvider | Actions for activities and conditions for transitions |
| IWorkflowRuleProvider | Rules for command authorization |
| ICustomActivityProvider | Custom activity types (gateways, events, tasks) |
| ICustomConditionProvider | Custom condition types registered with runtime.WithCustomConditions() |
| IDesignerParameterFormatProvider | Parameter UI definitions for the Designer |
| IDesignerAutocompleteProvider | Autocomplete suggestions in the Designer |
| IWorkflowExternalParametersProvider | External parameter storage on process instances |
The runtime calls OnPluginAdd at registration time, where the plugin wires its providers, subscribes to runtime events, and injects build steps. The OnRuntimeStartAsync method is called when the runtime starts. Built-in plugins implement IWorkflowPlugin and expose their capabilities through the corresponding provider interfaces listed above.
Register plugins
Register plugins after configuring the runtime and before calling runtime.StartAsync(). You can register multiple plugins and optionally restrict them to specific schemes.
var basicPlugin = new BasicPlugin();var approvalPlugin = new ApprovalPlugin();// Required builder, persistence provider, and other base runtime setup are omitted.var runtime = new WorkflowRuntime() .WithPlugin(basicPlugin) .WithPlugin(approvalPlugin);// Or restrict plugins to specific schemes:// runtime.WithPlugin(basicPlugin,// schemes: ["OrderProcess", "InvoiceApproval"]);await runtime.StartAsync();Retrieve a registered plugin at any time with runtime.GetPlugin<BasicPlugin>().
Available plugins
Workflow Engine ships 8 built-in plugins that cover the most common workflow patterns.
Actions and rules
Plugins that add actions, conditions, and rules.
Integration
Plugins that connect Workflow Engine to external systems.
Notation
Plugins that add support for standard process notation.
Choose a plugin
Use this table to find the right plugin for your task.
| I need to... | Plugin |
|---|---|
| Send HTTP requests or emails during process execution | Basic Plugin |
| Create independent process instances or manipulate parameters | Basic Plugin |
| Check child subprocess completion or delete child subprocesses | Basic Plugin |
| Restrict commands to specific roles or users | Basic Plugin |
| Track multi-person approvals with history | Approval Plugin |
| Iterate over a list of values in a loop | Loops Plugin |
| Work with files, directories, ZIP archives, or FTP | File Plugin |
| Display forms at specific workflow stages | Forms Plugin |
| Resolve user roles from Active Directory | Active Directory Plugin |
| Push real-time updates to browser clients | Real-Time Tracking Plugin |
| Import BPMN 2.0 diagrams into schemes | BPMN Plugin |
Plugin licensing
| Plugin | License |
|---|---|
| Basic Plugin | Included in all editions |
| Approval Plugin | Included in all editions |
| Loops Plugin | Included in all editions |
| File Plugin | Included in all editions |
| Real-Time Tracking Plugin | Included in all editions |
| Forms Plugin | Requires a separate Forms license |
| Active Directory Plugin | Requires a separate Active Directory license |
| BPMN Plugin | Requires a separate BPMN license |
Plugins that require a separate license throw an exception at registration if the license does not include the feature.
Frequently asked questions
What is a plugin in Workflow Engine?
A plugin is a class that implements IWorkflowPlugin and registers additional actions, rules, custom activities, or designer extensions with WorkflowRuntime. You add a plugin by calling runtime.WithPlugin(new MyPlugin()). The runtime auto-detects which provider interfaces the plugin implements and registers them automatically.
How do I register multiple plugins?
Call runtime.WithPlugin() for each plugin, or pass several plugins at once using runtime.WithPlugins(schemes, plugin1, plugin2). The schemes parameter is a List<string> of scheme codes that restricts the plugins to only those schemes.
Can I write my own plugin?
Yes. Implement IWorkflowPlugin and optionally any provider interface the runtime detects. The runtime uses type-pattern detection to register whichever of IWorkflowActionProvider, IWorkflowRuleProvider, IDesignerParameterFormatProvider, IDesignerAutocompleteProvider, ICustomActivityProvider, ICustomConditionProvider, or IWorkflowExternalParametersProvider your plugin implements. Implement only the provider interfaces required by your plugin's capabilities.
Do plugins require a license?
Basic Plugin, Approval Plugin, Loops Plugin, File Plugin, and Real-Time Tracking Plugin are included in all editions. Forms Plugin, Active Directory Plugin, and BPMN Plugin require a separate license. Plugins that require a license throw an exception at registration if the license does not include the feature.
What configuration do plugins need?
Most plugins take configuration through constructor parameters or public properties set before registration. The PluginSettings dictionary on IWorkflowPlugin is obsolete - use constructor-based configuration instead. Some plugins require delegate functions to connect to your application's data layer, for example UsersInRoleAsync on BasicPlugin to resolve role membership.