Skip to content

next does not work as expected in ComponentFlow #510

Closed
@mcseemz

Description

@mcseemz

Hello.
This code always asks for a second input ("skill") in spite of the "next" set to null.

        ComponentFlow.ComponentFlowResult run = componentFlowBuilder.clone().reset()
                .withSingleItemSelector("hero")
                .selectItems(heroes)
                .max(10)
                .next(x -> null)
                .and()
                .withSingleItemSelector("skill")
                .selectItems(skills)
                .max(10)
                .and()
                .build().run();

And in
https://docs.spring.io/spring-shell/docs/2.1.1/site/reference/htmlsingle/#using-shell-components-flow
It is expected to break the sequence and finish. At least that can be understood from the code, as there is no explanation for the logic in the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions