on 01-22-2013 1:22 AM
Hi Guys,
I have a requirement to extract data, storing it in a global variable and retrieving the same after a synchronous call.
I am using this mapping in BPM.
anyone have a suggestion on this. Code snippet will be great.
Thanks
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi please find an example below.The container variable can be accessed in other UDFs
public String getValue(String a, Container container) throws StreamTransformationException{
AbstractTrace trace=container.getTrace();
String test="";
GlobalContainer globalContainer;
globalContainer = container.getGlobalContainer();
String inlogin_sess = " ashutosh test value" ;
globalContainer.setParameter(test,inlogin_sess);
test=""+globalContainer.getParameter(test);
trace.addInfo("c dis"+test);
return test ;
}
We can access the container variable in other udfs of same mapping using getParameter
Hi,
I am using the global variable to store and retrieve the data in message mapping..
Here is my code.
To store..
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keySource = DynamicConfigurationKey.create("http://test.com/test/nl","RequestValue");
if (conf != null) {
conf.put(keySource, var1);
}
return var1;
To Retrieve
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keySource = DynamicConfigurationKey.create("http://test.com/test/nl","RequestValue");
return conf.get(keySource);
I am hoping this should work inside BPM..?!
Cheers
Sam
Hi,
Please check this link also for alternate solution to store the values in global variables in library:
Also check this link: http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/03/04/usage-of-dynamic-configuration-in...
Regards,
Beena.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.