Custom Connector - Unable to read input variable value from BPMN


#1

I am creating a custom connector. Which is working fine with static data. Now I want to get the those data from camunda modeler as input parameter. I have declared the same on ConnectorRequest class as below:-

String PARAM_MESSAGE = “kafkamessage”; // This is input variable taking as parameter

public String getKafkamessage() {
return getRequestParameter(PARAM_MESSAGE);
}

public ProducerConnectorRequest kafkamessage(String kafkamessage) {
setRequestParameter(PARAM_MESSAGE, kafkamessage);
return this;
}

But while calling getKafkamessage() it’s producing null value. How to resolve this. Please suggest.


#2

This is resolved.


#3

Can you share how you resolved the problem?


#4

To get the input parameter variable value, I have created a file Connector.java. Under which defined a method ConnectorResponse execute(ConnectorRequest req) . Within the method body req.get{VariableName} getting the value of the defined variable. (The {VariableName} refers to, the variable defined under ConnectorRequest.java file).