refactor(api/core/workflow/enums): Rename WORKFLOW_RUN_ID to WORKFLOW_EXECUTION_ID (#20459)

Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
-LAN- 2025-05-30 11:05:08 +08:00 committed by GitHub
parent d72d02b970
commit db488bef51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 7 additions and 7 deletions

View File

@ -140,7 +140,7 @@ class AdvancedChatAppRunner(WorkflowBasedAppRunner):
SystemVariableKey.DIALOGUE_COUNT: self._dialogue_count, SystemVariableKey.DIALOGUE_COUNT: self._dialogue_count,
SystemVariableKey.APP_ID: app_config.app_id, SystemVariableKey.APP_ID: app_config.app_id,
SystemVariableKey.WORKFLOW_ID: app_config.workflow_id, SystemVariableKey.WORKFLOW_ID: app_config.workflow_id,
SystemVariableKey.WORKFLOW_RUN_ID: self.application_generate_entity.workflow_run_id, SystemVariableKey.WORKFLOW_EXECUTION_ID: self.application_generate_entity.workflow_run_id,
} }
# init variable pool # init variable pool

View File

@ -124,7 +124,7 @@ class AdvancedChatAppGenerateTaskPipeline:
SystemVariableKey.DIALOGUE_COUNT: dialogue_count, SystemVariableKey.DIALOGUE_COUNT: dialogue_count,
SystemVariableKey.APP_ID: application_generate_entity.app_config.app_id, SystemVariableKey.APP_ID: application_generate_entity.app_config.app_id,
SystemVariableKey.WORKFLOW_ID: workflow.id, SystemVariableKey.WORKFLOW_ID: workflow.id,
SystemVariableKey.WORKFLOW_RUN_ID: application_generate_entity.workflow_run_id, SystemVariableKey.WORKFLOW_EXECUTION_ID: application_generate_entity.workflow_run_id,
}, },
workflow_info=CycleManagerWorkflowInfo( workflow_info=CycleManagerWorkflowInfo(
workflow_id=workflow.id, workflow_id=workflow.id,

View File

@ -95,7 +95,7 @@ class WorkflowAppRunner(WorkflowBasedAppRunner):
SystemVariableKey.USER_ID: user_id, SystemVariableKey.USER_ID: user_id,
SystemVariableKey.APP_ID: app_config.app_id, SystemVariableKey.APP_ID: app_config.app_id,
SystemVariableKey.WORKFLOW_ID: app_config.workflow_id, SystemVariableKey.WORKFLOW_ID: app_config.workflow_id,
SystemVariableKey.WORKFLOW_RUN_ID: self.application_generate_entity.workflow_execution_id, SystemVariableKey.WORKFLOW_EXECUTION_ID: self.application_generate_entity.workflow_execution_id,
} }
variable_pool = VariablePool( variable_pool = VariablePool(

View File

@ -113,7 +113,7 @@ class WorkflowAppGenerateTaskPipeline:
SystemVariableKey.USER_ID: user_session_id, SystemVariableKey.USER_ID: user_session_id,
SystemVariableKey.APP_ID: application_generate_entity.app_config.app_id, SystemVariableKey.APP_ID: application_generate_entity.app_config.app_id,
SystemVariableKey.WORKFLOW_ID: workflow.id, SystemVariableKey.WORKFLOW_ID: workflow.id,
SystemVariableKey.WORKFLOW_RUN_ID: application_generate_entity.workflow_execution_id, SystemVariableKey.WORKFLOW_EXECUTION_ID: application_generate_entity.workflow_execution_id,
}, },
workflow_info=CycleManagerWorkflowInfo( workflow_info=CycleManagerWorkflowInfo(
workflow_id=workflow.id, workflow_id=workflow.id,

View File

@ -13,4 +13,4 @@ class SystemVariableKey(StrEnum):
DIALOGUE_COUNT = "dialogue_count" DIALOGUE_COUNT = "dialogue_count"
APP_ID = "app_id" APP_ID = "app_id"
WORKFLOW_ID = "workflow_id" WORKFLOW_ID = "workflow_id"
WORKFLOW_RUN_ID = "workflow_run_id" WORKFLOW_EXECUTION_ID = "workflow_run_id"

View File

@ -65,7 +65,7 @@ class WorkflowCycleManager:
# init workflow run # init workflow run
# TODO: This workflow_run_id should always not be None, maybe we can use a more elegant way to handle this # TODO: This workflow_run_id should always not be None, maybe we can use a more elegant way to handle this
execution_id = str(self._workflow_system_variables.get(SystemVariableKey.WORKFLOW_RUN_ID) or uuid4()) execution_id = str(self._workflow_system_variables.get(SystemVariableKey.WORKFLOW_EXECUTION_ID) or uuid4())
execution = WorkflowExecution.new( execution = WorkflowExecution.new(
id_=execution_id, id_=execution_id,
workflow_id=self._workflow_info.workflow_id, workflow_id=self._workflow_info.workflow_id,

View File

@ -73,7 +73,7 @@ def real_workflow_system_variables():
SystemVariableKey.USER_ID: "test-user-id", SystemVariableKey.USER_ID: "test-user-id",
SystemVariableKey.APP_ID: "test-app-id", SystemVariableKey.APP_ID: "test-app-id",
SystemVariableKey.WORKFLOW_ID: "test-workflow-id", SystemVariableKey.WORKFLOW_ID: "test-workflow-id",
SystemVariableKey.WORKFLOW_RUN_ID: "test-workflow-run-id", SystemVariableKey.WORKFLOW_EXECUTION_ID: "test-workflow-run-id",
} }