Issue with formService in Spring application

I have a problem with form services. In Spring application I’m trying to create a form service using the factory method.

<bean id="formService" factory-bean="processEngine" factory-method="getFormService" />

Other service are created, but this one is null. Does anyone have any idea what I’m doing wrong?

Hi Filip,

You can have a look at the FlowableEngineConfiguration in the flowable-ui-task module:

This uses the flowable-form-spring-configurator module that initializes the Flowable Form Engine using the same datasource as the Flowable Engine. Before you can use the FormService, the Form Engine has to be initialized.

Best regards,

Tijs

Hi Tijs.
Thank you for advice. I have read it and then I realized it’s misunderstanding :slight_smile: . I want to instantiate org.flowable.engine.FormService not org.flowable.form.api.FormService. I’m implementing form properties right now, not form definitions. Of course follow yours recomendations I’ll implement form definitions as well but unless form properties exists in version 6 I think it should be also implemented for backward compatibility.
You hint will be useful in next few hours because I’ll start implementation of form definitions service after form properties tests is done but my question is still valid, right?


Best regards
Filip

Hi Filip,

Misunderstood indeed :-). Just added a specific FormService test to the flowable-spring module, but I can’t reproduce the issue you are seeing. Are the other service interfaces not null? Only the FormService is null?

Best regards,

Tijs

Hi Tijs.
Thank for your help. I finally found an issue. The problem was in bean configuration for spock tests. Service was created but never injected. Your test helps me debug positive path and solve it on my side. Thank you once again.

Best regards,
Filip