cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with dynamic configuration

Former Member
0 Kudos

Hello!

I have a small but annoying Problem! I try to create a DynamicConfiguration object inside a mapping! As you can see in the screenshots, when testing the mapping, an error Comes up, which I could not solve until now!

Do you have any ideas?

BR, EF

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member181985
Active Contributor
0 Kudos

Hi Elmar,

It seems you are using incorrect code. You should use,

DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);


Also, as Amit already mentioned DynamicConfiguration can't be accessed in standalone mode. It works at runtime end to end


Best Regards,

Praveen Gujjeti

Former Member
0 Kudos

Hi!

The Problem is, that the Container object does NOT Support the "getTransformationParameters()" method! We are on PI 7.40, so there seems to be a Change to this object type!

BR, EF

Former Member
0 Kudos

Hi,

use getInputParameters() instead.

Cheers,

Edu

Former Member
0 Kudos

Hi!

This is what i did See the first screenshot ... I am using only methods which are supported by the "new/different" configuration object, but there is still an error!

BR, EF

former_member181985
Active Contributor
0 Kudos

Try like this,

GlobalContainer globalContainer = container.getGlobalContainer();

java.util.Map map = globalContainer.getParameters()

DynamicConfiguration conf = (DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); 

Former Member
0 Kudos

Hi Elmar,

try to test if from the Interface Mapping itself, go to the test tab, pick the Request or Response and test it from there. You cannot test it directly from the Message Mapping.

Cheers,

Edu

Former Member
0 Kudos

Hello,

U cannot test DC in ur mapping locally...

And if u want to then add try/catch statement in ur code and then test ur mapping.

Thanks

Amit Srivastava