LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
fix: Use pipeline ID when log ID is missing in session (#133)
Chandrasekharan M17cb87cf2d4e
diff --git a/backend/workflow_manager/workflow/execution.py b/backend/workflow_manager/workflow/execution.pyindex e54582126..035c21e31 100644--- a/backend/workflow_manager/workflow/execution.py+++ b/backend/workflow_manager/workflow/execution.py@@ -68,7 +68,12 @@ class WorkflowExecutionServiceHelper(WorkflowExecutionService):ignore_processed_entities=False,)if not workflow_execution:- self.execution_log_id = StateStore.get(Common.LOG_EVENTS_ID)+ # Use pipline_id for pipelines / API deployment+ # since session might not be present.+ log_events_id = StateStore.get(Common.LOG_EVENTS_ID)+ self.execution_log_id = (+ log_events_id if log_events_id else pipeline_id+ )self.execution_mode = modeself.execution_method: tuple[str, str] = (WorkflowExecution.Method.SCHEDULED@@ -117,6 +122,7 @@ class WorkflowExecutionServiceHelper(WorkflowExecutionService):raise InvalidAPIRequest("File shouldn't be empty")tool_instance.metadata[JsonSchemaKey.ROOT_FOLDER] = execution_path+ # TODO: Review and remove log_guid if its unused@staticmethoddef create_workflow_execution(workflow_id: str,@@ -137,9 +143,8 @@ class WorkflowExecutionServiceHelper(WorkflowExecutionService):if single_stepelse WorkflowExecution.Type.COMPLETE)- execution_log_id = (- StateStore.get(Common.LOG_EVENTS_ID) if not log_guid else log_guid- )+ log_events_id = StateStore.get(Common.LOG_EVENTS_ID)+ execution_log_id = log_events_id if log_events_id else pipeline_idworkflow_execution = WorkflowExecution(pipeline_id=pipeline_id,workflow_id=workflow_id,