Bonita Conector using Spring Boot

1
0
-1

Hi,

I'm trying to create a Bonita Conector (using Bonita connector archetype) but I can't use the @Value from Spring Boot (returns null).

The implementation that I'm using is:

Conector.properties:

bpm.url=${BPM_URL:http://docker.localhost}

Class:

@Value("${bpm.url}"
private String url;

pom.xml:

org.springframeworkspring-context5.2.9.RELEASE
;
org.springframeworkspring-core5.2.9.RELEASE

When I try, for example, print the value of "url" it returns null. Can someone help me?

Thanks in advance

Diana

1 answer

1
0
-1
This one is the BEST answer!

Hi Diana,
I'm afraid this is currently not possible. Connectors are not spring beans so they are not aware of the spring context.
It is however a good improvement feedback.

Thanks for sharing.
Romain

Comments

Submitted by diana.bento on Wed, 10/28/2020 - 10:16

Hi Romain, thanks for your help! Is there another option for the problem (without using Spring Boot)? The problem is: I'm using an external API for a project and I don't pretend to have in code the username and password to create a valid token to do all the operations that I need.

Thanks,

Diana

Submitted by romain.bioteau on Wed, 10/28/2020 - 12:06

Username and password should be connector input in the connector definition. Then use a parameter when configuring the connector in a process

Notifications