org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${newDelegate}. Cause: Cannot resolve identifier ‘newDelegate’
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:63)
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:51)
at org.camunda.bpm.engine.impl.bpmn.behavior.ServiceTaskDelegateExpressionActivityBehavior$3.call(ServiceTaskDelegateExpressionActivityBehavior.java:107) - camunda 7.21 and spring boot 3.4.7 is used
Hi @Ujjwala_Jape ,
Diagnosis: Cannot resolve identifier 'newDelegate'
The stack trace tells us precisely what is happening:
ServiceTaskDelegateExpressionActivityBehaviormeans your Service Task is configured with a delegate expression, i.e. in the BPMN:camunda:delegateExpression="${newDelegate}".JuelExpression.getValue()is the JUEL engine trying to evaluate${newDelegate}.Cannot resolve identifier 'newDelegate'means the EL resolver chain looked for something namednewDelegate(first a process variable, then a Spring bean) and found nothing.
So the engine could not find a Spring bean (or process variable) named newDelegate.
Possible sources (reflection)
I considered these 7 candidate root causes:
- Bean name mismatch — the delegate class exists but its Spring bean name is not exactly
newDelegate(e.g. class isNewDelegatebut annotated@Component("newDelegateService"), or the class name doesn’t camel‑case tonewDelegate). - Missing stereotype annotation — the delegate class has no
@Component/@Service/@Named, so no bean is registered at all. - Outside component scan — the delegate is in a package not covered by
@SpringBootApplicationcomponent scanning, so the bean never gets created. - Spring–Camunda EL integration not active — the process engine is built from a plain
ProcessEngineConfiguration/StandaloneProcessEngineConfiguration(or a custom bootstrap) that does not register the SpringApplicationContextElResolver. Without it, JUEL can only see process variables, never beans. - Typo / casing in the BPMN — the model references
${newDelegate}but the bean is actually${NewDelegate}or similar. - Engine bootstrapped before beans / wrong ApplicationContext — the engine uses a different context than the one holding the bean.
- Version incompatibility — Camunda 7.21 officially targets Spring Boot 3.2 (7.22 → 3.3, and Spring Boot 3.4 support only arrived in 7.23‑alpha3). Running the
camunda-bpm-spring-boot-starterfor 7.21 on Spring Boot 3.4.7 is an unsupported combination that can cause the auto‑configuration (CamundaBpmAutoConfiguration) to not fully apply — which in turn means theSpringProcessEngineConfigurationand its bean EL resolver are never wired in.
Two most likely causes
- #1/#2/#3 — the bean named
newDelegatesimply isn’t available to the engine (wrong name, missing annotation, or not scanned). This is by far the most common trigger for this exact message. - #7 → #4 — the Spring/Camunda auto‑configuration didn’t apply because of the 7.21 + Spring Boot 3.4.7 version mismatch, leaving the engine without Spring bean resolution. Your explicit mention of the versions makes this a strong secondary suspect.
Validation steps (to confirm which one it is)
Since the workspace here has no source files, please run these checks in your project to validate:
- Confirm the bean name & registration. In the delegate class, verify:
Then add a startup log to prove the bean exists and the engine is Spring‑backed:@Component("newDelegate") // or a class literally named NewDelegate implementing JavaDelegate public class NewDelegate implements JavaDelegate { ... }@Autowired ApplicationContext ctx; @EventListener(ApplicationReadyEvent.class) public void check() { System.out.println("newDelegate present? " + ctx.containsBean("newDelegate")); } - Confirm Spring EL integration is active. Log the engine configuration class at startup:
If it is not a@Autowired ProcessEngine engine; // ... System.out.println("Engine config class = " + engine.getProcessEngineConfiguration().getClass().getName());SpringProcessEngineConfiguration(e.g. it prints aStandalone...or generic config), the Spring bean resolver is missing → cause #4/#7. - Confirm versions. Check that you are using
org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter:7.21.0and note that it is not certified for Spring Boot 3.4.7.
Hi Aravindh, Thanks for reaching out. I will try validation steps. Thanks