Pageflow and Form Guide
CHAPTER 5
This chapter provides general information about how to create pageflow processes using the Pageflow Modeler. It has these sections:
The Pageflow Modeler allows you to create and save an XML document that can be executed by the pageflow engine at runtime. This document can be called a pageflow process or a process definition. Pageflow process refers to the graphical representation of the document; process definition more precisely refers to the underlying XML descriptor.
Creating a pageflow process is a three-step procedure:
Use the graphing environment of the Pageflow Modeler to lay out the logic of your process:
Use the Property Inspector to configure Activity and Link properties that link the process to the resources of your exteNd Director environment.
Save the process in your project resource set. The Pageflow Modeler translates it into the process definition that the pageflow engine can execute.
You can create a custom view of all resource files that are associated with a pageflow. Once you've created the view, you can use display it on the View tab.
exteNd Director allows you to export the contents of a view to a JAR. When you export resources from a view, exteNd Director creates a JAR that contains all of the elements in the view, including the directory structureplus the XML file that defines the view from which the resources were exported. This JAR can then be imported into another resource set.
For details on creating a view for a pageflow, see Creating a resource view for a pageflow.
To start the Pageflow Modeler, you create a new process or open an existing one.
The main window of the Pageflow Modeler opens in the editing area. The Mode activity is automatically added to the process:
Select File>Save from the exteNd Director menu.
If the Pageflow Modeler detects any mistakes in the process, a popup message informs you and asks if you would like to save anyway. This validation occurs on all save events. You can address the warnings later.
If this is your first save, the Save As dialog appears.
The contents of the pageflow-process folder display in your project resource set. Although you can specify another directory, it is recommended that you accept the default.
You can access the process property sheet to view current information about the process and set properties.
With the cursor in the Modeler window, right-click and select Properties.
Edit or view the process properties:
TIP: To provide more screen space, you can close the Navigation and Output Panes in exteNd Director by clicking the panel view selectors:
Here are the main features of the Pageflow Modeler:
With the General tab selected, click the Pan button on the toolbar to change the cursor to pan mode:
Drag the hand cursor on the graph area to scroll the graph in the editing area.
You can also use the horizontal and vertical scroll bars to achieve the same effect.
With the General tab selected, click the Select button on the toolbar.
NOTE: Select mode is the default.
To select multiple objects, click empty space and drag the selection rectangle around the group. You can also select more than one object by holding down the Ctrl key while clicking objects with the mouse.
Drag them to the desired location.
If you move an activity, any links associated with that activity move with it.
An activity represents a task in a pageflow. A pageflow activity can present an interface to the user or perform background functions.
Here is a summary of the activities in the Pageflow Modeler. For details about activity properties and usage, click the appropriate item:
See Pageflow activity types for more information about the activity types.
See Pageflow activity types for more information about the activity types.
To access activity properties:
Right-click and select Properties, or click the Eye icon on the General tab.
Click the appropriate tab in the property sheet.
The properties are specific for the activity type. For more information, see Pageflow activity types.
To open the source file for an activity:
A link is a single logical path from one activity to another activity. Links are represented by arrows in the Pageflow Modeler.
Below is a summary of the activities in the Pageflow Modeler. For details about usage and setting link properties, click on the appropriate item:
Click an activity and drag from the starting activity to the target activity, then release the mouse button.
You can use link segments to enhance the legibility and appearance of the pageflow. For more information on link segments, see Drawing a link segment.
Click the Eye icon on the General tab or right-click and select Properties.
Click the appropriate tab in the property sheet.
Properties are specific for the link type. For more information, see Pageflow link types.
A segment is the line between two points of a link. Segments are purely cosmetic. You can use them to enhance the legibility and appearance of the pageflow. Here is a pageflow diagram that shows a link (Link 2) with three segments:
Release the mouse button at the point you want to end the segment.
For the final segment, drag to the destination activity and click it.
Scoped paths allow you to associate data with pageflow activities and links. exteNd Director provides a set of predefined scoped paths that you can access using the scoped path dialogs and the Scoped Path Navigator.
For background information about scoped paths, see the chapter on working with scoped paths in Developing exteNd Director Applications.
This section describes how to:
Associate scoped paths directly with the primary property for an activity
Copy scoped paths before or after an activity or a link executes in the flow
For information about scoped path usage with examples, see Using scoped paths in a pageflow.
You can use a scoped path to associate an object with an activity. To do this, you specify a scoped path as the value for the activity's primary property. You can do this with any of the following types of activities:
To associate a scoped path with an activity's primary property:
Select the activity, then right-click and select Properties.
In the Property Inspector, click the tab that has the primary property. This tab typically has the same name as the activity. For example: the HTML activity has an HTML tab where you can set the primary property, and the Form activity has a Form tab.
Click the primary property for the selected activity. For details, see Pageflow activity types.
The Choose The Scope dialog displays:
The dialog displays the default predefined path for this activity type.
Use one of these methods to specify the path:
Type the path in the text box.
This requires you to know the syntax for the scoped path. For more information, see the section on predefined scoped paths in Developing exteNd Director Applications.
Select any one of the paths already defined in this flow; these paths appear at the bottom of the dropdown list below the dashes.
TIP: If you choose a current path that accesses the resource set, you can display the contents of the file by clicking the icon next to the Browse button.
Select one of the predefined scopes at the top of the dropdown and click Browse.
When you click Browse, the Scoped Path Navigator displays.
The Scoped Path Navigator is an interactive tool that allows you to specify the path using a tree view (where applicable) and the XPath expression builder. The available options depend on the scoped path you selected.
For more information on using the Scoped Path Navigator, see the section on using the scoped paths in Developing exteNd Director Applications.
Editing a scope To edit an existing scoped path, repeat the procedure.
With the exception of the Mode and Finish activities, you can copy scoped paths before or after the execution of any activity, and copy scoped paths after the execution of a any link.
For design considerations that relate to copying scoped paths, see the section on copying scoped paths in Developing exteNd Director Applications.
To copy a scoped path before or after an activity:
Select the activity, then right-click and select Properties.
In the Property Inspector, click the Copy Scoped Paths tab:
To copy the scoped path before execution, click the link Edit Scoped Paths under Copy Before.
To copy the scoped path after execution, click the link Edit Scoped Paths under Copy After.
The appropriate Copy dialog (Copy Before or Copy After) displays:
Click the ellipsis for From scope.
The dialog displays the default predefined scope for this activity type. If you want to use another scope, select it from the dropdown list.
To specify the path, use one of the methods described in Step 3 in the preceding procedure (To associate a scoped path with an activity's primary property:).
Click the ellipsis for To scope. Repeat the procedure for specifying the From scope.
To edit a scope To edit an existing scope, repeat the procedurebut click Update instead of Add.
To copy a scoped path after the execution of a link:
In the Property Inspector, click the link Edit Scoped Paths under Copy Scoped Paths.
Click the ellipsis for From scope
The dialog displays the default predefined scope for this activity type. If you want to use another scope, select it from the dropdown list.
To specify the path, use one of the methods described in Step 3 in the preceding procedure (To associate a scoped path with an activity's primary property:).
Click the ellipsis for To scope. Repeat the procedure for specifying the From scope.
On the Copy Scope dialog click Add and OK to exit the Copy Scope dialog.
To edit a scope To edit an existing scope, repeat the procedurebut click Update instead of Add.
You can view all of the current paths used for a selected object in the flow or for all objects in the flow.
To access current scoped paths for an activity or link:
To access all current paths in the flow:
From the Available Scoped Paths dialog you can copy a selected path to the clipboard and paste it wherever you want.
To copy a scoped path to the clipboard:
Access the scoped paths using one of the methods described in the preceding section.
Double-click the path, or click Copy to Clipboard at the bottom of the dialog.
Link expressions let you use runtime values to choose between multiple target activities. When an activity finishes processing, you can use expressions to determine which activity should be executed next. The expression builder allows you to test runtime values in simple or compound expressions that evaluate to true or false. Expressions apply to simple links and button links only.
For more information on simple links, see Simple link. For more information on button links, see Button link.
Select a simple link or a button link, right-click, and select Properties.
In the Property Inspector, select Edit Expression.
To specify the path, use one of the methods described in Step 4 in the procedure To associate a scoped path with an activity's primary property:.
In the Value field, specify the value to test against the scoped data.
Select the data type (which must match the scoped data) in the data type dropdown.
To add additional clauses to the expression, select the appropriate item from the logical operator dropdown, complete the clause, and click Add. Add as many clauses as you need.
NOTE: To negate the current expression, enable the Not check box.
You can validate a process at design time whenever you choose. The modeler analyzes the process structure and displays any errors encountered. Note that the validation applies to the design-time process structure only.
With or without any objects selected, right-click and select Validate Process.
Labels are separate objects in the graphing environment and have their own property sheets. Labels have two forms:
Floating labels are simply text you place on your pageflow graph and have no association with another pageflow graph object. Titles, version numbers, notes, and legends are all good uses for floating labels.
From the Pageflow Modeler toolbar, select the Text Block button:
Click the location on the graph where you want the label to appear.
Most labels are associated with an activity or link and are called attached labels. By default, activities and links start with a label.
An activity or link can have many labels. You can reposition the attached label by dragging it to a new location. Note the line that appears as you drag. This line indicates the activity or link the label is attached to.
Right-click the label and select Properties.
The Property Inspector displays showing the current formatting properties.
Make your changes. Properties are described in Setting object display properties.
Each activity, link, and label has a set of properties associated with it. Select and right-click an element, and the properties of the element are displayed in the Property Inspector. The table below describes the graphical properties found on some or all of the elements:
The layout is the arrangement of the activities, links, and labels in your graph. The Pageflow Modeler has a sophisticated layout feature that can completely rearrange your graph to maximize readability and minimize space.
You can specify whether you want the new arrangement to have a horizontal or vertical orientation and whether you want link links drawn as diagonal lines or composed of perpendicular segments.
There are two kinds of layout: full layout and incremental layout.
Full layout gives the Pageflow Modeler great freedom to move activities, links, and labels around the graph.
For example, this figure displays a hand-arranged layout:
This figure shows the result of applying a full layout to the hand-arranged layout:
Incremental layout tries to make a graph more attractive and organized but also tries to keep the basic design of your hand-arranged layout.
This figure shows the result of applying an incremental layout to the hand-arranged layout shown above:
TIP: Try a layout on your graph. Select Edit>Undo to back out of a layout you don't want.
To apply an incremental layout:
You can set layout preferences for a pageflow graph. These preferences let you specify whether you want the new arrangement to have a horizontal or vertical orientation and whether you want link links drawn as diagonal lines or composed of perpendicular segments.
The Pageflow Modeler gives you four ways to zoom:
The Pageflow Modeler includes a drawing grid that works much like the grid in any graphics program:
When the grid is visible, the corners of activity and label objects stick to the intersections of horizontal and vertical grid lines. This makes it much easier to line up objects and use consisting spacing.
When the grid is invisible, objects can be positioned without constraint in one-pixel increments.
Turning the grid on does not reposition existing items to align with the grid.
To change the spacing of grid lines (grid size):
Choose Pageflow>Grid Size from the exteNd Director menu.
The Bird's Eye View is a popup window that gives you a view of the entire pageflow graph to help you find your way around in a large graph. The Bird's Eye View window:
Appears when you click the Bird's Eye View button on the Pageflow Modeler toolbar:
Is dismissed by clicking the X button in the upper-right corner
Indicates the area visible in the graph window with a blue outline box
You can use the blue outline box of the Bird's Eye View window to do several useful things:
You can create a custom view of all resource files that are associated with a pageflow. Once you've created the view, you can display it on the View tab.
exteNd Director allows you to export the contents of a view to a JAR. When you export resources from a view, exteNd Director creates a JAR that contains all of the elements in the view, including the directory structureplus the XML file that defines the view from which the resources were exported. This JAR can then be imported into another resource set.
TIP: To get to the View tab, you need to first click the Resources tab in the exteNd Director Navigation Pane.
For more information on views, see the chapter on working with views in Developing exteNd Director Applications.
To create a resource view for a pageflow process:
Choose Pageflow>Create Resource View from the exteNd Director menu.
The view created has the same name as the pageflow process descriptor. The view definition is stored as an XML document in the my-views folder within the resource set.
To remove a pageflow, you need to delete the pageflow process descriptor file. When you delete the descriptor file, any files referenced by the pageflow (such as Java source files, HTML files, XML files, and other resources) are not removed. Therefore, if you want to remove these files, you need to delete them by hand.
When you create a pageflow, the Pageflow Modeler saves a portlet fragment deployment descriptor in the resource set. When you delete a pageflow, you need to delete this descriptor and unregister the portlet as well.
For more information about deleting portlets, see the section on deleting portlets in the Portal Guide.
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...