Strategy registry for workflow node executors.
ObjNodeRegistry provides a self-registration mechanism for workflow node
types. Node executor classes register themselves at import time via the
@register decorator, allowing new node types to be added without modifying
the core workflow engine (ObjWorkflow.py).
ObjNodeRegistry is a class-level registry (no instances are created).
All state lives in the _registry class variable, a Dict[str, Type] mapping
node type strings to ObjWorkflowNode subclasses. Side-effect imports in
ObjWorkflow.py (lines ~97-128) trigger the decorators at startup, populating
the registry before any workflow executes.
# In a node executor module:
@ObjNodeRegistry.register(WorkflowNodeType.SERVICE.value)
class ObjWorkflowService(ObjWorkflowNode):
def execute(self, run_context, current_result,
input_guid, node_type, name):
...
# At runtime, the workflow engine retrieves:
executor = ObjNodeRegistry.get_executor("SERVICE", workflow)
result = executor.execute(run_context, current_result,
input_guid, node_type, name)
All registered classes must subclass ObjWorkflowNode and implement:
def execute(
self,
run_context: WorkflowContextType,
current_result: str,
input_guid: str,
node_type: str,
name: str,
) -> NodeExecuteResultType:
Constructor signature: __init__(self, workflow_instance) (single argument).
self.DB delegates to workflow_instance.DB.
| Method | Description |
|---|---|
register(*node_types) |
Class decorator that maps one or more node type strings to the decorated class |
get_executor(node_type, workflow_instance) |
Create and return a new executor instance for the given node type, or None if unregistered |
is_registered(node_type) |
Return True if the node type has a registered executor |
get_registered_types() |
Return a list of all registered node type strings |
clear_registry() |
Remove all registrations (used in testing) |
| Node Type | Executor Module |
|---|---|
ACL |
ObjWorkflowAcl |
AI |
ObjWorkflowAi |
API |
ObjWorkflowApi |
CALC |
ObjWorkflowCalc |
CLASSIFICATION |
ObjWorkflowClassification |
CONSTANTS |
ObjWorkflowConstants |
DATASTORE |
ObjWorkflowDatastore |
DATATRANSFER |
ObjWorkflowDatatransfer |
DECISION |
ObjWorkflowDecision |
DOCEXTRACT, DOCDOWNLOAD, DOCTEMPLATE, DOCUMENT |
ObjWorkflowDocument |
EMAIL |
ObjWorkflowEmail |
EXPORT |
ObjWorkflowExport |
FEATURERENDER |
ObjWorkflowFeatureRender |
FORMFLOW, FORMGUI, REPORTFLOW, REPORTGUI |
ObjWorkflowFlow |
GATE, GATE_EXCLUSIVE |
ObjWorkflowGateExclusive |
GATE_FAN_OUT |
ObjWorkflowGateFanOut |
GATE_GATHER |
ObjWorkflowGateGather |
GATE_INCLUSIVE |
ObjWorkflowGateInclusive |
GATE_PARALLEL |
ObjWorkflowGateParallel |
GEOCODE, GEOREV, GEOIP, GEOZONE |
ObjWorkflowGeo |
IMPORT |
ObjWorkflowImport |
NOTIFY |
ObjWorkflowNotify |
SCHEDULER |
ObjWorkflowScheduler |
SCORECARD |
ObjWorkflowScorecard |
SEGMENT |
ObjWorkflowSegment |
SENDMAIL |
ObjWorkflowSendMail |
SERVICE |
ObjWorkflowService |
SIGNAL |
ObjWorkflowSignal |
SLEEP, WAIT |
ObjWorkflowSleep |
SMS |
ObjWorkflowSms |
VALUE, VALUES |
ObjWorkflowValue |
WAITDATE |
ObjWorkflowSleep |
WAITTIME |
ObjWorkflowSleep |
WEBHOOK |
ObjWorkflowWebhook |
WORKFLOW, WORKFLOWSYNC |
ObjWorkflowWorkflow |
| Module | Reason |
|---|---|
ObjWorkflowSimul |
Simulation orchestration tool, not a workflow node |
ObjWorkflowVisual |
Diagram/visualisation utility, not a workflow node |
FLOW node type |
Base/legacy Call Activity; only FORMFLOW, FORMGUI, REPORTFLOW, REPORTGUI are active |