Invoking Human-Centric Long-Lived Processes

You can programmatically invoke human-centric long-lived processes that were created in Workbench using these client applications:

The long-lived process that is invoked is named FirstAppSolution/PreLoanProcess . You can create this process by following the tutorial specified in Creating Your First LiveCycle Application .

A human-centric process involves a task that a user can respond to by using Workspace. For example, using Workbench, you can create a process that lets a bank manager approve or deny a loan application. The following illustration shows the process FirstAppSolution/PreLoanProcess .

The FirstAppSolution/PreLoanProcess process accepts an input parameter named formData whose data type is XML. The XML data is merged with a form design named PreLoanForm.xdp . The following illustration shows a form that represents a task assigned to a user to approve or deny a loan application. The user approves or denies the application by using Workspace. The Workspace user can approve the loan request by clicking the Approve button shown in the following illustration. Likewise, the user can deny the loan request by clicking the deny button.

A long-lived process is invoked asynchronously and cannot be invoked synchronously due to the following factors:

  • A process can span a significant amount of time.

  • A process can span organizational boundaries.

  • A process needs external input in order for it to finish. For example, consider a situation where a form is sent to a manager, who is out of the office. In this situation, the process is not complete until the manager returns and fills out the form.

When a long-lived process is invoked, LiveCycle creates an invocation identifier value as part of creating a record. The record tracks the status of the long-lived process and is stored in the LiveCycle database. Using the invocation identifier value, you can track the status of the long-lived process. In addition, you can use the process invocation identifier value to perform Process Manager operations such as terminating a running process instance. (See Terminating Process Instances .)

Note: LiveCycle does not create an invocation identifier value or a record when a short-lived process is invoked.

The FirstAppSolution/PreLoanProcess process is invoked when an applicant submits an application, which is represented as XML data. The name of the input process variable is formData and its data type is XML. For the purposes of this discussion, assume that the following XML data is used as input to the FirstAppSolution/PreLoanProcess process.

<?xml version="1.0" encoding="UTF-8"?> 
<Name>Sam White</Name> 
<ApprovalStatus>PENDING APPROVAL</ApprovalStatus> 

XML data passed to a process must match the fields located in the form used in the process. Otherwise, data is not displayed within the form. All applications that invoke the FirstAppSolution/PreLoanProcess process must pass this XML data source. The applications created in Invoking Human-Centric Long-Lived Processes dynamically create the XML data source from values that a user entered into a web client.

Using a client application, you can send the FirstAppSolution/PreLoanProcess process the required XML data. A long-lived process returns an invocation identifier value as its return value. The following illustration shows client applications invoking the FirstAppSolution/PreLoanProcess long-lived process. The client applications send XML data and get back a string value that represents the invocation identifier value.

// Ethnio survey code removed