Author Message
JavierMuro
Joined: Nov 25, 2013
Messages: 6
Offline
Hi,

We are getting an exception:

com.indra.ono.gestionparametrosivr.Parametros@1b19990java.lang.ClassCastException: java.lang.String cannot be cast to com.indra.ono.gestionparametrosivr.Parametros

when we try to retrieve a Object (Parametros()) from a Output parameter in a different module.

We successfully retrieve the variable when the object is in the same module:
Save value:
Parametros parametros = new Parametros(value1, value2, value3, value4);
session.getVariable("VG_parametros").getSimpleVariable().setValue(parametros);

Retrieve:
Parametros parametros = (Parametros) session.getVariable("VG_parametros").getSimpleVariable().getObjectValue();


Is possible to do that between services? Do I have to serialize manually?

Thanks,



SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
In general, modules are self-contained and resources (session info, variables, etc) are not freely available for other modules or apps. I'm not entirely clear if you are doing this already, but if you do want to pass values between a module and the main parent app, you have to specify Module Input and Output Parameters. Then you can assign values to the variables used for those parameters and the module will be able to see your object. Input will send a value from parent to module and Output is the reverse process.
Anonymous

Hi Samaresh,

I do have an Input and Output for that variable. But iam not able to CAST the object variable properly. Is there any correct form?
Go to:   
Mobile view