Summary of steps

To create a client application built with Flex that is able to invoke the FirstAppSolution/PreLoanProcess process, perform the following steps:

  1. Start a new Flex project.

  2. Include the adobe-remoting-provider.swc file in your project’s class path. (See Including the LiveCycle Flex library file.)

  3. Create a mx:RemoteObject instance through either ActionScript or MXML. (See Creating a mx:RemoteObject instance)

  4. Set up a ChannelSet instance to communicate with LiveCycle, and associate it with the mx:RemoteObject instance. (See Create a Channel to LiveCycle.)

  5. 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.)

  6. 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.)

  7. 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(); 
    params["formData"]=xml;
  8. 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.)

  9. 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;  
    }

// Ethnio survey code removed