We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code with custom label generates incorrect graph visualization:
import ru.fix.completable.reactor.graph.kotlin.Graph import kotlin.random.Random class ExampleGraph : Graph<ExamplePayload>() { private val generate = suspendHandler { Random.nextInt(-10, 10) }.withRoutingMerger router@{ if (it == 0) { return@router Flow.ZERO } if (it < 0) { Flow.NEGATIVE } else { Flow.POSITIVE } } private val positive = suspendHandler { }.withoutMerger() private val negative = suspendHandler { }.withoutMerger() private val zero = suspendHandler { }.withoutMerger() private enum class Flow { POSITIVE, NEGATIVE, ZERO } init { payload().handleBy(generate) generate .on(Flow.POSITIVE).handleBy(positive) .on(Flow.NEGATIVE).handleBy(negative) .on(Flow.ZERO).handleBy(zero) positive.onAny().complete() negative.onAny().complete() zero.onAny().complete() coordinates() .pd(3, -126) .vx(negative, 33, 148) .vx(positive, -155, 143) .vx(zero, 261, 118) .vx(generate, 32, -50, 56, 31); } }
Here is visualization:
But if we will change generate vertex code to the following:
generate
private val generate = suspendHandler { Random.nextInt(-10, 10) }.withRoutingMerger { if (it == 0) { return@withRoutingMerger Flow.ZERO } if (it < 0) { Flow.NEGATIVE } else { Flow.POSITIVE } }
everything is ok:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following code with custom label generates incorrect graph visualization:
Here is visualization:
But if we will change
generate
vertex code to the following:everything is ok:
The text was updated successfully, but these errors were encountered: