Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to return LiveCycle ES service invokation result to Flex client using remoting

Avatar

Former Community Member
I have LiveCycle ES 8.2 JBoss setup.

I have a simple (short live ) orchestration which take few input (String) parameters dose some business logic and return result (String).

I have a Flex client which uses a Flex remoting (RemoteObject) to invoke the service's invoke operation by passing the input parameters.



I able to pass the input parameter to service and invoke it from Flex client successfully but could not figure out why the result object does not have the return result from the service. I tried to defined the output parameter as process data, output variable of type String.

The server log shows the service got executed and the output process data does have the expected result string but on flex client end that is not got passed, I must be missing few steps here, pl help.



Thanks -yog
2 Replies

Avatar

Former Community Member
Hi Yog,<br /><br />It could be the way you are handling the result event from remoting invocation. Here is a simple Flex app that calls a LiveCycle process via remoting, where the LiveCycle orchestration has two process variables, an input called 'inputStr' of type string and an output called 'outputStr' of type string. The handleResult() method gets 'outputStr' from the result event and assigns it to a Label control.<br /><br /><?xml version="1.0" encoding="utf-8"?><br /><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"<br /> creationComplete="initializeChannelSet()"><br /> <br /><mx:Script><br />// CDATA starts here<br /><br />import mx.messaging.ChannelSet;<br />import mx.messaging.channels.AMFChannel;<br />import mx.rpc.events.ResultEvent;<br />import mx.rpc.events.FaultEvent;<br /><br />private function initializeChannelSet():void {<br /> var cs:ChannelSet= new ChannelSet();<br /> cs.addChannel(new AMFChannel("remoting-amf", "http://localhost:8080/remoting/messagebroker/amf"));<br /> ro.setCredentials("administrator", "password");<br /> ro.channelSet = cs;<br />}<br /><br />private function callLC():void {<br /> ro.invoke({inputStr:nameStr.text});<br />}<br />private function handleResult(event:ResultEvent):void {<br /> remotingResponse.text = event.result.outputStr;<br />}<br /><br />private function handleFault(event:FaultEvent):void {<br />}<br /><br />// CDATA ends here<br /></mx:Script><br /><br /><mx:RemoteObject id="ro" destination="GetDateTime" result="handleResult(event)" fault="handleFault(event)"/><br /><br /><mx:Panel title="Adobe LiveCycle Data Services ES Remoting"<br /> paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"><br /> <mx:HBox width="100%"><br /> <mx:Label fontWeight="bold" text="What's your name?"/><br /> <mx:TextInput id="nameStr" width="350"/><br /> </mx:HBox><br /> <mx:Label id="remotingResponse"/><br /> <mx:HBox width="100%"><br /> <mx:Spacer width="100%"/><br /> <mx:Button label="Call LC" click="callLC()"/><br /> </mx:HBox><br /></mx:Panel><br /><br /></mx:Application><br /><br />Steve

Avatar

Former Community Member
Steve, thanks a lot for your input it is returning the result value now. So with LCES all the orchestration inherit the remoting capabilities automatically. - yog