Skip to content

GUI allows multiple links into Loop Start's input port, failing only at run time #7155

Closed

Description

@aglinxinyuan

What happened?

The GUI lets you connect two upstream operators into a Loop Start's single input port. Nothing in the editor flags it — no link is refused, validation stays green — and the workflow only fails when you run it:

java.lang.IllegalArgumentException: requirement failed:
Loop Start input port GlobalPortIdentity(
    PhysicalOpIdentity(OperatorIdentity(LoopStart-operator-...),main),
    PortIdentity(0,false), true)
  expected exactly one reader URI, got 2
    at WorkflowExecutionManager.loopStartStateUris(WorkflowExecutionManager.scala:69)
    at StartWorkflowHandler.startWorkflow(StartWorkflowHandler.scala:45)

Loop Start being single-input is intended — the scheduler resolves that loop's bookkeeping URIs from its input port's single reader, so fan-in belongs in a Union before the loop, as discussed in #6966. The bug is that the restriction is invisible until run time.

(This does not apply to Loop End, which supports fan-in — a loop body may branch and converge on it. That side is tracked in #7246.)

How to reproduce?

  1. Drop a Loop Start and two source operators on the canvas.
  2. Connect both sources to the Loop Start's input port — both links are accepted.
  3. Run the workflow → it fails at StartWorkflow with the error above.

Version/Branch

1.3.0-incubating-SNAPSHOT (main)

Root cause

InputPort already carries a disallowMultiLinks flag, and the frontend honors it in two independent places:

Guard Where Reads the flag from
Editor refuses to draw a second link into the port workflow-editor.component.ts operator metadata (dynamic schema)
Validation requires exactly one input on the port validation-workflow.service.ts the saved operator predicate

Loop Start never sets it — LoopOpDesc.operatorInfo declares a plain InputPort().

Expected behavior

before after
Drawing a 2nd link into Loop Start's input port allowed refused by the editor
Programmatically built plan fails at StartWorkflow unchanged — the scheduler require stays as a backstop
Loop End with 2+ inbound links — still allowed (see #7246)

Activity

  1. added theissue type on Jul 31, 2026
  2. changed the title [-]GUI allows multiple links into a loop operator's input port, failing only at run time[/-] [+]GUI allows multiple links into Loop Start's input port, failing only at run time[/+] on Aug 2, 2026
  3. added a commit that references this issue on Aug 2, 2026
    436b37e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions