Pageflow and Form Guide
CHAPTER 1
This chapter provides an introduction to the use of pageflows and XForms in exteNd Director applications. It includes these topics:
A pageflow defines the flow of control for a set of pages that execute within a single portlet. Each page presents a set of controls that allow for user interaction. For example, the pages in a flow might provide a way for the user to display stock quotes or weather forecasts, or access corporate data such as employee information.
The pages within a flow can use either of the following technologies to define the user presentation:
In addition to presenting pages for user interaction, pageflows can perform background processing tasks. For example, a pageflow might invoke a Web Service, access a database, or simply execute code written in Java.
Wizards To facilitate database access, exteNd Director provides tools for creating pageflows that give the user a way to find, display, and modify records in a database. exteNd Director provides the Database Pageflow Wizard to help you create these pageflows. The Database Pageflow Wizard generates a set of forms (XHTML pages that use XForms technology) as well as one or more pageflows that tie the forms together into an integrated user interface.
exteNd Director also provides tools for creating pageflows that invoke Web Services. To help you create these kinds of flows, exteNd Director provides the Web Service Pageflow Wizard. exteNd Director also provides the Composer Pageflow Wizard to help you take advantage of exteNd ComposerTM services.
The core of a pageflow application is the process descriptor, an XML file that you create visually using the Pageflow Modeler. A pageflow process, which is the visual representation of the process descriptor, is a branching series of activities and links that models a set of user interactions within a portlet. These are the key parts of a pageflow process:
Process component |
Description |
---|---|
Activity |
An object that represents a task. An activity can present information to the user and respond to user interactions, or perform background functions that are not visible to the user.
|
Link |
An object that represents a path in the routing logic of the flow. A link points to an activity. Links are what tie the activities in a pageflow together. A link is a single logical path between two activities. A link can also move data between activities. An activity can have multiple source (incoming) links and multiple destination (outgoing) links.
|
A typical pageflow process includes data that is manipulated by pageflow users or program logic. To access data in a pageflow, you use scoped paths. exteNd Director includes a group of predefined scoped paths that are available from the Pageflow Modeler and the Workflow Modeler and through the Scoped Path API.
For more information on scoped paths, see Using scoped paths in a pageflow.
The pageflow engine is responsible for executing and managing workflow processes. It uses the process descriptor created with the Pageflow Modeler to:
It is helpful to understand pageflow by contrasting it with the exteNd Director workflow model. Although workflow and pageflow share similar mechanics, pageflow has some distinguishing features, as shown here:
NOTE: Although workflow and pageflow are different types of applications, the Workflow subsystem provides facilities for integrating them. You can embed a pageflow in a workflow using the Pageflow activity in the Workflow Modeler. You can also start a workflow process from a pageflow using a Java activity.
For details on embedding on a pageflow in a workflow, see the chapter on working with activities in the Workflow Guide. For details on starting a workflow process from a pageflow, see Example: Starting a workflow process.
XForms provide a robust, standards-based way to define Web forms. The advantages of the XForms standard include:
A powerful event model (so that you don't have to use a lot of scripting for client-side validation or calculations)
XForms cannot run as standalone applications. They are designed to run as components within a host language like XHTML. In the Novell implementation, XForms run within the context of a pageflow application.
A single XForms document includes the sections shown in the following diagram:
For more information on using the Form Designer to define the Model, presentation, or events for an XForms document, see Form Designer.
In XForms, the data is defined in the Model element. The Model can contain one or more instance elements.
At design time, you provide the Form Wizard with an XML schema or instance document that defines the structure of the instance data. Once an initial form is created based on this structure, you'll use the Form Designer's Model Editor to define additional information about the data such as constraints, calculations, validations, and so on. In addition, you'll define how the runtime data is:
Suppliedsince the form runs in the context of a pageflow, you'll specify the circumstances when the data is supplied by the pageflow (if the instance data is inline).
Submittedyou'll specify what part of the data to submit, and the other submission details such as: the method (PUT, POST, GET) and the encoding.
XForms can be processed via a browser plug-in or a server-side XForms processor.
At startup the exteNd Director portal checks to see if a browser plug-in is installed. If not, XForms processing defaults to the Novell exteNd Director server-side processor. The server-side processor is responsible for:
Generating HTML and Javascript so that a browser can render an XForm.
Performing the data validation, calculations, constraints and so on defined on the form.
Responding to XML events and XForms actions that occur on the form.
The following diagram illustrates the interaction flow of the Novell exteNd Director server-side XForms processor and a device such as a browser.
The browser makes a request for an XForms documentrunning in a pageflow.
The pageflow portlet receives the request (via the portal container), renders it, and passes it to the XForms server-side processor.
If a browser plug-in does not exist, the XForms exteNd Director server-side processor:
The browser establishes a network connection to the XForms server-side processor so all subsequent communications within the form (for example, event processing) are direct with the XForms server-side processor, bypassing the Portal container.
Integrated into the development environment is a complete graphing package called the Pageflow Modeler that allows you to quickly and visually create a pageflow process. The Pageflow Modeler allows you to:
When you save a pageflow, the Pageflow Modeler translates your document into an XML-based file called a process definition. The process definition saves the layout and format of your pageflow and translates the flow logic into a program the pageflow engine can read and execute.
The Pageflow Modeler also saves a portlet fragment deployment descriptor that maps your pageflow to a pageflow runner. The pageflow runner is a Java class that is implemented as a portlet.
The exteNd Director Form Designer provides an environment for developing XForms 1.0-compliant Web forms. The Form Designer is a graphical development tool that allows you to quickly create XForms components for use in pageflow applications.
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...