Unknown property used in expression when using Java Delegate with Delegate Expression in BPMN

4.4k Views Asked by At

Is anyone also having problem when using java delegate task in service task with delegate expression? It is ok when placing into class with "org.flowable.DelegateExpressionBean"

Error Message

Forwarding to error page from request [/app/rest/process-instances] due to exception [Unknown property used in expression: ${delegateExpressionBean}]

Java Class

package org.flowable;

@Component
public class DelegateExpressionBean implements JavaDelegate {
    @Autowired
    ExternalService externalService;
    @Override
    public void execute(DelegateExecution delegateExecution) {
       ...
       externalService.call();
    }

BPMN XML

<serviceTask id="DelegateExpressionBean" name="Delegate Expression Bean" flowable:delegateExpression="${delegateExpressionBean}">

1

There are 1 best solutions below

0
On

I think this answers your question: https://stackoverflow.com/a/63389251/2412627

If you are still having trouble, try to use your own package structure instead of reusing org.flowable.