Chapter 10. Developing Flex Applications for LiveCycle Enterprise Suite

Good design can’t fix a broken business model.

Jeffrey Veen

Adobe LiveCycle Enterprise Suite (ES) as an enterprise server platform is targeted at automation of business processes. One example of a business process is a hardware retail store that sells nails and hammers. The retailer orders the goods online from one of the known suppliers. Assume that an explicit approval of the supplier is required for each ordered item. Because the supplier wants to be able to fulfill all the orders, the supplier attempts to predict the demand.

To that end, the supplier monitors the inventory and, when the level is beyond a certain threshold, reorders the items from a manufacturer. The supplier’s orders also need to be approved by the manufacturer. The activities between the companies occur in a predefined sequence: order-approval-reorder-approval. On a more granular level, within each company there is a certain business process as well: receiving orders, ordering materials and parts, production, quality assurance, invoicing, shipping, and so forth.

Business process automation assumes software-based modeling of the process as well as software-based enforcement of the model that ensures that the process activities are consistently handled by the process participants: retailer, supplier, manufacturer, and so forth. Often, such software is called workflow or business process management (BPM) software.

Unlike other workflow products, LiveCycle ES features unparalleled integration with PDF processing and Adobe Flex. Accordingly, the combination of Flex and LiveCycle technologies becomes a natural choice for many enterprises that require productive workflow solutions featuring a rich user experience.

This chapter focuses on how to use Flex to support human-centric business processes in LiveCycle ES and on the most essential enterprise process management topics. After a brief introduction of LiveCycle ES, the chapter illustrates two scenarios:

  • How to build Flex applications that work in concert with a LiveCycle ES frontend—LiveCycle Workspace. This scenario requires minimal development effort, but it locks you into the capabilities of the Workspace.

  • How to embed LiveCycle ES functionality into your own Flex application. This scenario assumes deeper involvement in the LiveCycle API and more coding, but it opens unlimited integration opportunities.

By the end of this chapter, you will understand:

  • How to extend LiveCycle ES with custom components

  • How to support user and group management from the external enterprise repository

  • How to use LiveCycle ES events to synchronize the processes in the publisher/subscriber style

Note

This chapter was written about LiveCycle ES 8.2, because the version branded as LiveCycle ES2 was not available at the time of this writing. LiveCycle ES2 improves the productivity of developers in various workflows, substantially reducing the number of steps needed to populate a form, design a parallel approval process, get attachments from an initial task, and more. The Eclipse-based Workspace introduces a new concept: the Application Model, which eliminates the need to separately manage forms, processes, and assets. You now can deploy applications without the need to leave the Workbench. Please refer to the latest LiveCycle ES2 documentation.

Business Process Example: Vacation Request

In this simple scenario, a company employee requests a vacation. The manager must approve or reject the request, and the employee must acknowledge the decision, completing the process. In business process management lingo, the process assigns tasks: to the manager (to review the incoming vacation request) and to the employee (to review and acknowledge the manager’s decision). See Figure 10-1.

Diagram of the SimpleVacationRequest

Figure 10-1. Diagram of the SimpleVacationRequest

The diagram of the corresponding SimpleVacationRequest is presented in Figure 10-1. It has two user activities: Manager’s Review and Employee’s Review, each requiring a custom UI (user interface) application to communicate the data between the user and the process management software.

Figure 10-2 illustrates a sample UI that could be used for the manager’s review: name, email, department, vacation type, and date range are all completed automatically beforehand. The manager can append comments to the optional description field and pick either “approved” or “rejected” as the approval decision. Finally, the manager clicks the Complete button to send the decision to the system.

The UI of the vacation request approval

Figure 10-2. The UI of the vacation request approval

The employee review/acknowledgment screen might look almost identical to Figure 10-2, except that the Approval Decision combo box would be disabled and the title word “Approve” would yield to the humble “Review”. To communicate acknowledgment, the employee would click Complete, indicating his awareness of the manager’s decision.

But wait: how does the vacation request make it into the system in the first place? Doesn’t the employee need a UI for that, too? Yes, of course. Figure 10-3 shows the screen to submit the vacation request. By using the user’s login information, the system might automatically initialize the employee name, email, and department. The employee specifies the vacation type and date range.

The UI of the vacation request submission

Figure 10-3. The UI of the vacation request submission

All three use cases are supported by a single Flex application, VacationRequest.swf, discussed in detail later in this chapter. Make no mistake, however: the initial submission of the request is not a part of the process diagram. That’s right, from the process management engine’s point of view, the process instance (for this specific request) starts only after the request is submitted. Does it sound confusing? Well, think of it this way: a process is a program with input parameters. If you start the process using an API, you can pass hardcoded values, read them from the external files, and so forth. Alternatively, the program can pop up a dialog box in front of the employee, forcing him to enter the values.

Think of a web service with a method startProcess(vacationRequestData). The web service is oblivious to preparation of the vacationRequestData. Imagine a user-friendly software program that allows you to fill in a vacation request form and then initiates the process instance by calling the web service. What might this software be in the case of the LiveCycle ES? One option is to write a custom program from scratch; another is to use LiveCycle Workspace ES, as explained in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.46.229