on ‎2017 Oct 06 1:51 AM
I am not able to create an External parameter for the Content modifier. The dropdown is not enabled.

I followed the URL External parameter not working HCI Web with a user who has the same issue. The recommendation was to create the external parameter in Eclipse and deploy that.
So I created this in Eclipse:

Then I click on the Externalized Parameters tab (in between the Console and the Remote Systems tab).
Then I sync with the Editor, add the values, and then save the parameters.

I execute checks for the flow and make sure everything looks good. Then I deploy the integration content from Eclipse. I check the deployment in the console and tasks view and I get no errors:
However, when I create the external parameter for the Content modifier in Eclipse and deploy, I still do not see the external parameter that I created in Eclipse in the Web UI.

Request clarification before answering.
Hi All
For those that still come across this post, it is possible without the need to classify the parameter as an External Parameter. In the content modifier, simply set the type to Expression and set the value to the same name as your external parameter {{extName}}.

You can use the same concept in the message body if you want to access the parameter by simply using {{extName}}. This will dynamically replace the value.
To access the externalized parameters via scripts, you can use the Camel SimpleBuilder function to evaluate the parameter name and return it as a String:
import org.apache.camel.Exchange;
import org.apache.camel.builder.SimpleBuilder;
def Message processData(Message message) {
def Exchange ex = message.exchange;
def messageLog = messageLogFactory.getMessageLog(message);
if(messageLog != null){
messageLog.setStringProperty( "Property" , SimpleBuilder.simple('{{sftp.directory}}').evaluate(ex, String) );
}
}
return message;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.