Summary of steps
To create a client application built with
Flex that is able to invoke the FirstAppSolution/PreLoanProcess
process, perform the following steps:
Start a new Flex project.
Include the adobe-remoting-provider.swc file in your project’s
class path. (See Including the LiveCycle Flex library file.)
Create a mx:RemoteObject instance through
either ActionScript or MXML. (See Creating a mx:RemoteObject instance)
Set up a ChannelSet instance to communicate
with LiveCycle, and associate it with the mx:RemoteObject instance.
(See Create a Channel to LiveCycle.)
Call the ChannelSet’s login method or the
service’s setCredentials method to specify the
user identifier value and password. (See Using single sign-on.)
Create the XML data source to pass to the FirstAppSolution/PreLoanProcess process
by creating an XML instance. (This application logic is shown in
the following code example.)
Create an object of type Object by using its constructor.
Assign the XML to the object by specifying the name of the process’s
input parameter, as shown in the following code:
//Get the XML data to pass to the LiveCycle ES process
var xml:XML = createXML();
var params:Object = new Object();
Invoke the FirstAppSolution/PreLoanProcess process
by calling the mx:RemoteObject instance’s invoke_Async method.
Pass the Object that contains the input parameter.
(See Passing input values.)
Retrieve the invocation identification value that is returned
from a long-lived process, as shown in the following code:
// Handles async call that invokes the long-lived process
private function resultHandler(event:ResultEvent):void
ji = event.result as JobId;
jobStatusDisplay.text = "Job Status ID: " + ji.jobId as String;