I have implemented a simple Camunda Connector:
@OutboundConnector(
name = “MYCONNECTOR”,
inputVariables = {
“entityName”},
type = “io.camunda:my-connector:1”)
public class MyConnectorFunction implements OutboundConnectorFunction {@Value("${some.text.var}") private String someTextVar; @Override public Object execute(OutboundConnectorContext context) { try { final var connectorRequest = context.bindVariables(MyConnectorRequest.class); return "Hello, World: " + someTextVar; } catch (Exception e) { LOGGER.error(e.getMessage(), e); throw new RuntimeException(e); } }
}
I created a JSON template for it, connected it to Camunda Modeler, built and deployed the JAR of this connector in Docker using docker-compose in the connectors image.
I also added an application.properties
file to my connector project and defined a property there:
some.text.var=Some Test Var1
As you can see from the code above, I am trying to access this property, but it is always null. Is there any mechanism to access Spring properties from a connector, or some way to view the Spring context?