Flow Studio
CapabilityRegistry
The central store of all registered capabilities — how it is populated at startup, query methods, and how downstream systems (palette, security) use it.
Registry Interface
// ProcessEngine/Capabilities/CapabilityRegistry.cs
public interface ICapabilityRegistry
{
// Get all executor types for a given capability type
IReadOnlyList<Type> GetByType(CapabilityType type);
// Get the capability type for a given executor type
CapabilityType? GetByExecutorType(Type executorType);
// Get all registered capability types
IReadOnlyList<CapabilityType> GetAllTypes();
// Check if a node type string has a registered capability
bool HasCapability(string nodeType);
// Get capability metadata for a node type
CapabilityMetadata? GetMetadata(CapabilityType type);
}
Concrete Implementation
public class CapabilityRegistry : ICapabilityRegistry
{
private readonly Dictionary<CapabilityType, List<Type>> _byType = new();
private readonly Dictionary<Type, CapabilityType> _byExecutorType = new();
private readonly Dictionary<CapabilityType, CapabilityMetadata> _metadata = new();
public CapabilityRegistry(IEnumerable<INodeCapability> capabilities)
{
// Initialize capability type lists
foreach (CapabilityType ct in Enum.GetValues<CapabilityType>())
_byType[ct] = new List<Type>();
// Store metadata from each capability implementation
foreach (var cap in capabilities)
_metadata[cap.Type] = cap.Metadata;
}
public IReadOnlyList<Type> GetByType(CapabilityType type)
=> _byType.TryGetValue(type, out var list) ? list : Array.Empty<Type>();
public CapabilityType? GetByExecutorType(Type executorType)
=> _byExecutorType.TryGetValue(executorType, out var ct) ? ct : null;
}
API Endpoint for the Designer
The backend exposes a capability metadata endpoint that the Flow Studio designer calls to populate the node palette:
GET /api/flow-studio/capabilities
Authorization: Bearer {token}
Response:
[
{
"type": "Webhook",
"displayName": "Webhooks",
"description": "HTTP event triggers and outbound calls",
"iconClass": "fa-solid fa-webhook",
"nodeTypes": ["WebhookTrigger", "WebhookCall"]
},
{
"type": "Messaging",
"displayName": "Messaging",
"description": "Send messages via Slack, Email, SMS, Push",
"iconClass": "fa-solid fa-envelope",
"nodeTypes": ["SlackMessage", "Email", "SMS", "PushNotification"]
}
// ... 10 more
]
TypeScript Registry Client
// packages/flow-studio-api/src/types/capability.types.ts
export interface CapabilityInfo {
type: string;
displayName: string;
description: string;
iconClass: string;
nodeTypes: string[];
}
// packages/flow-studio-api/src/clients/capabilityApiClient.ts
export async function fetchCapabilities(): Promise<CapabilityInfo[]> {
const res = await apiClient.get('/api/flow-studio/capabilities');
return res.data;
}