Unknown property used in delegate expression of service task

I have a bmpn file which uses delegate expression with a spring bean. This seems to work in a single tenant environment but not at a multi-tenant one. I am getting the following error:

org.flowable.common.engine.api.FlowableException: Unknown property used in expression: ${editValueExpressionBean} with Execution

The service task:

    <serviceTask id="editvalue" flowable:exclusive="true" name="editvalue" flowable:delegateExpression="${editValueExpressionBean}"/>

My bean:
@Scope(SCOPE_PROTOTYPE)
@Slf4j
@Component(“editValueExpressionBean”)
@AllArgsConstructor
public class EditAttributeValueDelegate implements JavaDelegate

I am wondering if this is related with the fact that I am overriding process engine.
In my springboot app I am using MultiSchemaMultiTenantProcessEngineConfiguration and I am overring the process engine as follows:

  @Primary
    @Bean
    public ProcessEngineConfiguration processEngineConfiguration(TenantConfigurationRepository repository) {

        return MultiTenantConfigurationInitializer.createMultiTenantProcessEngineConfiguration(repository);
    }

    @Bean
    public ProcessEngine processEngine(ProcessEngineConfiguration configuration) {
        return configuration.buildProcessEngine();
    }

Found the solution by adding this:

 Map<Object, Object> beans = new SpringBeanFactoryProxyMap(applicationContext);
        config.setExpressionManager(new ProcessExpressionManager(beans));