cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP HCI Cannot create Content Modifier External Parameter in Web UI

jmalla
Contributor
0 Likes
6,521

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.

View Entire Topic
FrancoisM
Explorer
0 Likes

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;
}
jmalla
Contributor
0 Likes

Looks like this will work. But I still do not understand why SAP couldn't simply add this feature in the WebUI in such a long time.

0 Likes

SimpleBuilder does not work with external parameters unfortunately, I tried myself, but the external parameter as an expression in the content modifier does work.