-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: Allow variables to be assigned as the end node of the loop node #4125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ const props = defineProps<{ nodeModel: any }>() | |
| const containerRef = ref() | ||
|
|
||
| const validate = () => { | ||
| const workflow = new WorkFlowInstance(lf.value.getGraphData()) | ||
| const workflow = new WorkFlowInstance(lf.value.getGraphData(), WorkflowMode.ApplicationLoop) | ||
| return Promise.all(lf.value.graphModel.nodes.map((element: any) => element?.validate?.())) | ||
| .then(() => { | ||
| const loop_node_id = props.nodeModel.properties.loop_node_id | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code has one main potential issue that needs to be addressed: IssueThe Instead of this line: const workflow = new WorkFlowInstance(lf.value.getGraphData(), WorkflowMode.ApplicationLoop);Use either the base mode without specifying it ( Additionally, ensure that all properties and methods referenced ( |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The provided code has some improvements and corrections:
Improvements:
workflowModeParameter: Added an optional parameterworkflowModelto the constructor ofWorkFlowInstance, which defaults toWorkflowMode.Application.Corrected Issues:
WorkflowTypeandWorkflowMode.Suggested Optimizations:
end_nodes_dict) for accessing end nodes based on the workflow mode can be optimized further in certain scenarios, but it is already implemented here for clarity.Here is the revised version of the code with these considerations:
This revision improves the structure and functionality while maintaining correctness and readability.