The flowable version which I'm using is 6.4.1.
@Component
public class MyClass implements JavaDelegate {
    @Autowired
    private MySampleService mySampleService;
    @Override
    public void execute(DelegateExecution delegateExecution){
        sampleService.doSomeTask();
    }
}
Here, myClass bean would be created for class MyClass. Hence, in the bpmn, I can use it like flowable:delegateExpression="${myClass}".
But I'm getting error
"unknown property used in expression: ${myClass}" 
And without delegateExpression, mySampleService would be null.
Any suggestions?
 
                        
There are two ways to configure flowable: