cancel
Showing results for 
Search instead for 
Did you mean: 

Custom configuration parameters in XI / PI for java UDF

former_member434276
Discoverer
0 Kudos

Hello everyone,

I am developping several UDFs in XI that are used during the mapping of messages. These UDFs are in fact quite complex (serveral classes with over 1000 lines of code) : they are developped in the Netweaver Developer Studio and then imported into XI as Imported Archives.

My problem is that the behaviour of the UDFs can change depending on configuration choices that should be changeable: these configuration choices are in fact simple parameters : key => value pairs which impact the UDFs business logic (functionnal aspects essentially).

Currently, everytime any of these parameters has to be changed, the whole imported archive must be redeployed and propagated to all systems (DEV, INT, Q/A, PROD) even though not a single line of code has changed !!!

I am simply looking for a place in XI where I can create / display / maintain simple parameters (key => value) without having to :

- restart anything on XI

- redeploy any imported archives

- develop specific applications for maintaining

- use value mapping

Basically, I am looking for something similar to Value Mapping except I just want to store key => value pairs and look them up in my UDFs java code to determine the UDF's desired behaviour.

I have not been able to find any solution after exhaustive forum, blogs, help, API and documentation reviews.

Thanks in advance for any hints you may have and don't worry, I will reward for any help you can bring.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi !

You can access property files from inside your UDF functions to read them and get key/value pairs. Then you only need to place those property files in the XI local filesystem and keep them updated between DEV, Q/A, PROD environments.

Check this threads:

/people/sap.user72/blog/2006/06/07/property-file-a-smart-use-in-xi-context

Regards,

Matias

ps: please award points if helpful.

former_member434276
Discoverer
0 Kudos

Hi,

Thank you for your reply. I was really looking for an existing tool within XI to do such a task.

This is due to the fact that the team responsible for the configuration of the properties will not have access to the XI environments' file systems (only XI tools) and they will therefore not be able to change the contents of the properties file.

Moreover, we are using clustered environments meaning that the properties file will have to be replicated on all the server instances thus adding additional points of failure to our solution.

I will keep on investigating but again I thank you for your advice. Maybe SAP will provide a dedicated UI such as value mappings for custom configuration parameters.

Otherwise, we may have to develop a dedicated UI that will allow the team to change configuration parameters which will in turn be readable as properties from the UDFs.

Best Regards.

Former Member
0 Kudos

Hi !

Another way, to avoid access to XI environment's file system, is to use the Value Mapping Groups in Integration Directory and define there key/value pairs. Thru ID you could create a new object of type Value Mapping Group, then set the source agency/scheme/value and target agency/scheme/value...and populate manually the value mapping table...

example:

source scheme: "KeyName"

source value: "log_path"

target scheme: "KeyValue"

target value: "/usr/tmp/myFiles/"

and so on with more KeyName/KeyValue pairs.

pros: no need to access file system, all data is within XI, you can access this data easily via UDF, you can modify this data just by accessing the ID.

cons: during udf test in IR, value mapping tables are NOT accessible, you will get a constant message. This is because Value Mapping data is stored in the cache and accessed only at runtime.

Regards,

Matias.

Answers (0)