Source: factory.workflow/ObjWorkflowNode.py
Base class for all workflow node types.
All workflow nodes (Service, Calc, Email, etc.) inherit from this class
and implement the execute() method to perform their specific operations.
...
| Method | Signature | Description |
|---|---|---|
| DB | DB() -> Any |
Access to database connection from workflow instance |
| package | package() -> str |
Access to package name from workflow instance |
| archetype | archetype() -> str |
Access to archetype from workflow instance |
| debug | debug(*args, **kwargs) -> None |
Delegate debug logging to workflow instance |
| error | error(*args, **kwargs) -> None |
Delegate error logging to workflow instance |
| note | note(*args, **kwargs) -> None |
Delegate note logging to workflow instance |
| info | info(*args, **kwargs) -> None |
Delegate info logging to workflow instance |
| get_queries | get_queries(query_name: str) -> str |
Get SQL query from workflow instance |
| sql_get_value | sql_get_value(sql: str) -> str |
Execute SQL and get single value |
| sql_get_values | sql_get_values(sql: str) -> tuple |
Execute SQL and get multiple values |
| get_deployment | get_deployment() -> str |
Get current deployment environment |
| get_uuid | get_uuid(prefix: str = '') -> str |
Generate UUID |
| sql_get_dictionary | sql_get_dictionary(sql: str) -> dict |
Execute SQL and get dictionary result |
| add_column | add_column(table: str, column: str, column_type: str) -> None |
Add column to table via workflow instance |
| get_domongo | get_domongo() -> bool |
Check if MongoDB is available for workflow operations |
| local_patch_param | local_patch_param(context: WorkflowContextType, guid: str, processguid: str, text: str) -> str |
Replace parameters in text with values from context |
| start_timer | start_timer(node_name: str) -> None |
Start performance timer for node execution |
| end_timer | end_timer() -> float |
End performance timer and return elapsed time |
| update_result_context | update_result_context(run_context: WorkflowContextType, result_key: str, result_value: Any) -> WorkflowContextType |
Helper method to update run_context['result'] with a new key/value. |
| set_service_attributes_from_context | set_service_attributes_from_context(service_obj: Any, run_context: WorkflowContextType, prefixes: list = None) -> None |
Set attributes on a service object from run_context. |
| queue_async_operation | queue_async_operation(operation_type: str, package: str, context: WorkflowContextType, additional_fields: dict = None) -> str |
Stage an operation for async execution via MongoDB queue. |
| execute | execute(run_context: WorkflowContextType, current_result: str, input_guid: str, node_type: str, name: str) -> NodeExecuteResultType |
Execute the node logic. |