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.
Describe the bug
PR #7274 (#7226) refuses
next: <self>on a process step at parse:The same spin exists one key over and is still accepted: a
decisionwhosethen:orelse: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 thenextself-loop did - which is what made theResilienceBpmnTestfixture 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'sthen: <self>on auserTask(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 asnext.