feat: add workflow action runtime policies
This commit is contained in:
@@ -26,7 +26,10 @@ import {
|
||||
TabsList,
|
||||
TabsTrigger,
|
||||
} from "@/components/ui/tabs";
|
||||
import type { WorkflowGraph } from "@/components/workflow/specs";
|
||||
import {
|
||||
actionResultAssignmentMode,
|
||||
type WorkflowGraph,
|
||||
} from "@/components/workflow/specs";
|
||||
import type { DynamicVariableDefinition } from "@/lib/api";
|
||||
|
||||
const DYNAMIC_VARIABLE_PATTERN = /{{\s*([A-Za-z][A-Za-z0-9_]{0,63})\s*}}/g;
|
||||
@@ -93,6 +96,12 @@ export function activeWorkflowDynamicVariableDefinitions(
|
||||
}
|
||||
}
|
||||
for (const node of graph.nodes) {
|
||||
if (
|
||||
node.type === "action" &&
|
||||
actionResultAssignmentMode(node.data) !== "override"
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
for (const name of Object.keys(node.data.resultAssignments ?? {})) {
|
||||
if (isPublicDynamicVariableName(name)) names.add(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user