Processes created in Workbench can be invoked
by using Remoting. That is, you can invoke a LiveCycle process
from a client application built with Flex. This feature is based
on Data Services.
注意: When using Remoting, it is recommended that
you invoke processes that were created in Workbench as opposed to
LiveCycle services. However, it is possible to invoke LiveCycle services directly. (See Encrypting PDF documents using
Remoting located on LiveCycle Developer Center.)
注意: If a LiveCycle service is not configured
to allow anonymous access, requests from a Flex client result in
a web browser challenge. The user must enter user name and password
credentials.
The following LiveCycle short-lived process, named MyApplication/EncryptDocument,
can be invoked using Remoting. (For information about this process
such as its input and output values, see Short lived process example.)
注意: To invoke a LiveCycle process using
a Flex application, ensure that a remoting endpoint is enabled.
By default, a remoting endpoint is enabled when you deploy a process.
When this process is invoked, it performs the following actions:
Obtains the unsecured PDF document that is passed as
an input value. This action is based on the SetValue operation.
The name of the input parameter is inDoc and its
data type is document. (The document data
type is an available data type from within Workbench.)
Encrypts the PDF document with a password. This action is
based on the PasswordEncryptPDF operation. The
name of the output value for this process is outDoc and
represents the password-encrypted PDF document. The data type of
outDoc is document.
Saves the password-encrypted PDF document as a PDF file to
the local file system. This action is based on the WriteDocument operation.
注意: The MyApplication/EncryptDocument process
is not based on an existing LiveCycle process. To following
along with the code examples, create a process named MyApplication/EncryptDocument using Workbench.