Skip to content

Possible duplicate state transitions in flow definition #3674

@neo4Play

Description

@neo4Play

o.s.b.core.job.flow.support.SimpleFlow point to StateTransition in the variable transitionMap parameterized by Map<String, Set<StateTransition>>.
We get duplicated entries in the Set by using o.s.b.core.job.builder.FlowJobBuilder but it doesn't leads to an error!

Sample:

final FlowJobBuilder flowJobBuilder = this.parentJobConfig.customJobBuilders()
		.get(jobName)
		.start(step1)
		.on(ExitStatus.FAILED.getExitCode())
		.fail()
		.on(ExitStatus.STOPPED.getExitCode())
		.stop()
		.next(step2)
		.on(ExitStatus.COMPLETED.getExitCode())
		.end()
		.on(ExitStatus.FAILED.getExitCode())
		.fail()
		.on(ExitStatus.STOPPED.getExitCode())
		.stop()
		.build();

The basic functions hash() and equals() would avoid the bad code smell!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions