Describe the bug
PR #7272 (#7223) makes "a JavaDelegate must NOT be a @component" observable as a WARN in ComponentContainer.createUnmanaged (engine-java/.../component/ComponentContainer.java:437-443). Two things about where and how often it fires:
1. On the ${JavaTask} + handler path it fires on every execution, forever. DirigibleJavaCallDelegate.instantiate (engine-bpm-flowable/.../delegate/DirigibleJavaCallDelegate.java:199) calls ClientDelegateBeans.createUnmanaged(handlerClass) for each execute - the delegate is "fresh per execution" by design (engine-java CLAUDE.md). An annotated handler on a step that runs a thousand times a day logs a thousand WARNs with the same text; the same repo just spent three PRs (#7220, #7265, #7267) establishing once-then-DEBUG for exactly this class of "the same fact, every tick" logging. On the flowable:class path it fires once per parsed definition, which is fine.
2. It is a log line at step-execution time, not a Problems-view entry at publish. #7223's preferred outcome was the Problems view; a delegate nobody has executed yet warns nothing, and an operator reading a WARN in the Logs view is not the developer who annotated the class. ComponentContainer.rebuild already enumerates every bean and fills wiringErrors (the map that feeds the IDE's Problems view via JavaLoader); a bean whose class implements an interface named org.flowable.engine.delegate.JavaDelegate (by name - engine-java cannot see the Flowable type, which is also why isBean is the detection today) is knowable there, once per rebuild, at publish.
Minor: the message hardcodes "is a JavaDelegate annotated @component" while the detection is isBean(type) (any @Component), correct only because both callers are delegate paths.
Expected
- The publish-time check:
rebuild records a @Component that implements JavaDelegate as a wiring error (or warning) surfaced in Problems, naming the class and the rule.
- The execution-time WARN is logged once per class per generation (a
Set on the container snapshot, cleared by rebuild), then DEBUG.
Describe the bug
PR #7272 (#7223) makes "a JavaDelegate must NOT be a @component" observable as a WARN in
ComponentContainer.createUnmanaged(engine-java/.../component/ComponentContainer.java:437-443). Two things about where and how often it fires:1. On the
${JavaTask}+handlerpath it fires on every execution, forever.DirigibleJavaCallDelegate.instantiate(engine-bpm-flowable/.../delegate/DirigibleJavaCallDelegate.java:199) callsClientDelegateBeans.createUnmanaged(handlerClass)for eachexecute- the delegate is "fresh per execution" by design (engine-java CLAUDE.md). An annotated handler on a step that runs a thousand times a day logs a thousand WARNs with the same text; the same repo just spent three PRs (#7220, #7265, #7267) establishing once-then-DEBUG for exactly this class of "the same fact, every tick" logging. On theflowable:classpath it fires once per parsed definition, which is fine.2. It is a log line at step-execution time, not a Problems-view entry at publish. #7223's preferred outcome was the Problems view; a delegate nobody has executed yet warns nothing, and an operator reading a WARN in the Logs view is not the developer who annotated the class.
ComponentContainer.rebuildalready enumerates every bean and fillswiringErrors(the map that feeds the IDE's Problems view viaJavaLoader); a bean whose class implements an interface namedorg.flowable.engine.delegate.JavaDelegate(by name - engine-java cannot see the Flowable type, which is also whyisBeanis the detection today) is knowable there, once per rebuild, at publish.Minor: the message hardcodes "is a JavaDelegate annotated @component" while the detection is
isBean(type)(any@Component), correct only because both callers are delegate paths.Expected
rebuildrecords a@Componentthat implementsJavaDelegateas a wiring error (or warning) surfaced in Problems, naming the class and the rule.Seton the container snapshot, cleared byrebuild), then DEBUG.