Skip to content

Commit 530f9c0

Browse files
Fix: restore non_trigger_entrypoint_nodes variable for edge generation
Co-Authored-By: [email protected] <[email protected]>
1 parent 6eae980 commit 530f9c0

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

ee/vellum_ee/workflows/display/workflows/base_workflow_display.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def serialize(self) -> JsonObject:
250250
has_manual_trigger = len(manual_trigger_edges) > 0
251251

252252
# Determine which nodes have explicit non-trigger entrypoints in the graph
253-
# We need this early to decide whether to create an ENTRYPOINT node
253+
# This is used later to decide whether to skip entrypoint edges for nodes with triggers
254254
non_trigger_entrypoint_nodes: Set[Type[BaseNode]] = set()
255255
for subgraph in self._workflow.get_subgraphs():
256256
if any(True for _ in subgraph.trigger_edges):
@@ -261,18 +261,6 @@ def serialize(self) -> JsonObject:
261261
except Exception:
262262
continue
263263

264-
# Check if workflow has only non-manual triggers (IntegrationTrigger/ScheduleTrigger)
265-
has_only_non_manual_triggers = len(trigger_edges) > 0 and not has_manual_trigger
266-
267-
# We need an ENTRYPOINT node if:
268-
# 1. There's a ManualTrigger, OR
269-
# 2. There are no triggers at all (backward compatibility), OR
270-
# 3. There are non-trigger entrypoints (nodes that need ENTRYPOINT edges alongside triggers)
271-
# We skip ENTRYPOINT node only when there are ONLY non-manual triggers with no regular entrypoints
272-
needs_entrypoint_node = (
273-
has_manual_trigger or not has_only_non_manual_triggers or len(non_trigger_entrypoint_nodes) > 0
274-
)
275-
276264
entrypoint_node_id: Optional[UUID] = None
277265
entrypoint_node_source_handle_id: Optional[UUID] = None
278266
entrypoint_node_display = self.display_context.workflow_display.entrypoint_node_display
@@ -296,8 +284,9 @@ def serialize(self) -> JsonObject:
296284
"base": None,
297285
"definition": None,
298286
}
299-
elif needs_entrypoint_node:
300-
# Non-trigger entrypoints exist: use workflow_display ENTRYPOINT node
287+
else:
288+
# Non-manual trigger or no triggers: use workflow_display ENTRYPOINT node if IDs are present
289+
# This allows the ENTRYPOINT node to be optional - if IDs are None, no ENTRYPOINT node is created
301290
entrypoint_node_id = self.display_context.workflow_display.entrypoint_node_id
302291
entrypoint_node_source_handle_id = self.display_context.workflow_display.entrypoint_node_source_handle_id
303292

@@ -315,7 +304,6 @@ def serialize(self) -> JsonObject:
315304
"base": None,
316305
"definition": None,
317306
}
318-
# else: only non-manual triggers with no regular entrypoints - no ENTRYPOINT node needed
319307

320308
# Add all the nodes in the workflows
321309
for node in self._workflow.get_all_nodes():

0 commit comments

Comments
 (0)