Problems with Custom components: Can't get values from output parameters on ok flow.

13 Oct '15, 10:39 AM
15,333 Views
No Forum Badges

Hi,

I have a problem with values on output parameters. When I execute my custom component, I put a value with bean.put("result",value) but when I get this value in ok flow is empty. I dont have problems with input parameters, only with output parameters.

I define input and output parameters like:

<InputParameter name="<%=unitId%>.value" label="value" />

<OutputParameter name="<%=unitId%>.result" label="result" />

And the code:

public Object execute(Map operationContext, Map sessionContext) throws RTXException {
        ExtendedOperationUnitBean bean=new ExtendedOperationUnitBean();
        String value=BeanHelper.asString(operationContext.get(getId()+".value"));

        .... code ....

        bean.put("result", true);
        return bean;
    }

Thanks.

 
x 0
Follow
Answer Answer at this question and get points!
Forum Starter - Level 2

Hi Angel,

Why do you put <%=unitId%> inside the name of the OuputParameter?

Leave the name only with "result" and try again.

The other code seems correct.

   
x 1
No Forum Badges

I do <%=unitId%> on OutputParameter because I use the existing sample code generated when the component is created.

Thanks, this works.

 
x 1
Answer at this question and get points!

Related questions

Ayuda Simple List Component Layout personalizado Button to go on another page Criptare dati sensibili nel database CSV Component with utf8 encoding Custom components Custom descriptors Custom Plug-in Custom Time Unit Custom Unit and AJAX / SOAP Custom Unit: Difficult example in Guide ... any suggestions? Data flow from a page which is not visible anymore Dynamic link labelling for Custom Unit Encoding Confirm Dialog file analysis then update MySQL database Google Map Unit Guardar Saltos de LINEA How can I add a credit card payment gateway or integrate paypal in my web app logic? how can i open a pdf file using download dialog How complex can Custom Unit output be? How to run the example from Custom Unit Guide? Is there any custom unit store or repository? Do you create/sell custom units? java.lang.NullPointerException More Custom Unit questions: example of Content and Operation Unit? Need help with Landmark Overlays for Google Map Unit. Personalizzazione del login component Problema Invocation Unit "Run Now" on a job scheduled to run later Selezione sul giorno "Events Planning" Status ProcessInstance and activityInstance in spanish Stored procedure component Twitter Unit - Get Geo location of twitt Usage of the Gantt Unit ¿Visor de imágenes y reproductor de video para la versión 7.2? Image viewer and video player for version 7.2? Web project without initial login form - how to create custom logins? Webratio Add-ons no permite login Webratio don't recognize JSON library WebRatio Platform 7.2 Community Cloud Edition