support referen workflow output (#4414)

This commit is contained in:
LawyZheng
2026-01-08 14:00:22 +08:00
committed by GitHub
parent a1f0adf273
commit 00f7128ffd
3 changed files with 10 additions and 1 deletions

View File

@@ -73,7 +73,12 @@ function WorkflowParameterEditPanel({
onSave,
initialValues,
}: Props) {
const reservedKeys = ["current_item", "current_value", "current_index"];
const reservedKeys = [
"current_item",
"current_value",
"current_index",
"workflow_run_outputs",
];
const isCloud = useContext(CloudContext);
const isEditMode = !!initialValues;
const [key, setKey] = useState(initialValues?.key ?? "");

View File

@@ -174,6 +174,7 @@ class WorkflowRunContext:
self.parameters: dict[str, PARAMETER_TYPE] = {}
self.values: dict[str, Any] = {}
self.secrets: dict[str, Any] = {}
self.workflow_run_outputs: dict[str, Any] = {}
self._aws_client = aws_client
self.organization_id: str | None = None
self.include_secrets_in_templates: bool = False
@@ -895,6 +896,7 @@ class WorkflowRunContext:
LOG.warning(f"Parameter {block_label} already has a value in workflow run context, overwriting")
self.values[block_label] = block_reference_value
self.workflow_run_outputs[block_label] = block_reference_value
async def set_parameter_values_for_output_parameter_dependent_blocks(
self,

View File

@@ -318,6 +318,8 @@ class Block(BaseModel, abc.ABC):
if "workflow_run_id" not in template_data:
template_data["workflow_run_id"] = workflow_run_context.workflow_run_id
template_data["workflow_run_outputs"] = workflow_run_context.workflow_run_outputs
if settings.WORKFLOW_TEMPLATING_STRICTNESS == "strict":
if missing_variables := get_missing_variables(potential_template, template_data):
raise MissingJinjaVariables(