Skip to content

intent: a decision whose then:/else: targets itself is not refused like next: <self> is (#7226 follow-up) #7292

Description

@delchev

Describe the bug

PR #7274 (#7226) refuses next: <self> on a process step at parse:

// parser/IntentParser.java:6344-6353
if (next.equals(step.getName())) {
    issues.add("... `next` targets itself - a self-loop that never advances");

The same spin exists one key over and is still accepted: a decision whose then: or else: names the decision itself. checkDecisionTarget (:6869-6875) checks only that the target exists. An exclusive gateway has no wait state, so - { name: rated, kind: decision, if: ..., then: rated, else: done } emits a sequence flow from the gateway to itself and Flowable spins on it exactly as the next self-loop did - which is what made the ResilienceBpmnTest fixture bug worth a parse rule in the first place.

Not proposing the same for onError: <self> (that is an unbounded retry; retry: exists for it, but the semantics are arguable) nor for a timer boundary's then: <self> on a userTask (re-open the task - a legitimate pattern that must stay legal). Multi-step cycles through a wait state are legitimate and correctly untouched.

Expected

then:/else: of a decision naming the decision itself is refused with the same sentence as next.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions