Pageflow and Form Guide

CHAPTER 5

Pageflow Modeler

This chapter provides general information about how to create pageflow processes using the Pageflow Modeler. It has these sections:

 
Top of page

About the Pageflow Modeler

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.

 
Top of section

Basic procedure

Creating a pageflow process is a three-step procedure:

  1. Use the graphing environment of the Pageflow Modeler to lay out the logic of your process:

  2. Use the Property Inspector to configure Activity and Link properties that link the process to the resources of your exteNd Director environment.

  3. Save the process in your project resource set. The Pageflow Modeler translates it into the process definition that the pageflow engine can execute.

 
Top of section

Creating a view for a pageflow

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 structure—plus the XML file that defines the view from which the resources were exported. This JAR can then be imported into another resource set.

For more information    For details on creating a view for a pageflow, see Creating a resource view for a pageflow.

 
Top of page

Starting the Modeler

To start the Pageflow Modeler, you create a new process or open an existing one.

Procedure To create a pageflow process:

  1. With your project open in exteNd Director, select File>New.

  2. Click the Portlet tab and select Pageflow:

    FileNewPF

  3. Click OK.

    The main window of the Pageflow Modeler opens in the editing area. The Mode activity is automatically added to the process:

    PFModeler

Procedure To save a pageflow process:

  1. 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.

  2. Click Yes.

    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.

  3. Specify a file name and click Save.

Procedure To open a pageflow process:

  1. Select File>Open from the exteNd Director menu.

  2. Navigate to the pageflow-process folder in your project resource set.

  3. Double-click to open.

 
Top of section

Process properties

You can access the process property sheet to view current information about the process and set properties.

Procedure To access process properties:

  1. Do one of the following:

    The Property Inspector displays the process properties:

    PFProcessProps

  2. Edit or view the process properties:

    Property

    Description

    Name

    The formal name of the process. The default is the name specified for the process descriptor. If you need to name your processes according to some naming convention, set it here.

    Description

    A description of the process intended for the Pageflow Modeler user.

    Use Smart Linking

    Indicates whether smart linking is enabled or disabled for the process. When smart linking is enabled, the pageflow engine identifies the target activity for a smart link and spawns a link from the current activity to the target activity. The spawned link may be cached for later use.

    Smartlink Verb

    A key that is used to identify the HTTP request parameter whose value will be used to determine the target activity for a dynamic link.

    Show Precedence Labels

    Specifies whether precedence labels should be displayed in the pageflow graph. When a particular activity is linked to more than one activity, the pageflow engine uses precedence to determine which link to follow. Each link has a precedence number associated with it. In cases where more than one link expression might evaluate to true, the engine evaluates the links in precedence order, following the first link that returns true.

    Template

    Specifies whether this pageflow can be used as a template for the creation of other pageflows.

 
Top of page

About the Modeler window

TIP:   To provide more screen space, you can close the Navigation and Output Panes in exteNd Director by clicking the panel view selectors:

wdPanelViewSelector

 
Top of section

Main features

Here are the main features of the Pageflow Modeler:

PFModelerWindow

 
Top of section

Navigating, selecting, and moving objects

Procedure To navigate the window:

  1. With the General tab selected, click the Pan button on the toolbar to change the cursor to pan mode:

    iHand

  2. 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.

Procedure To select objects:

  1. With the General tab selected, click the Select button on the toolbar.

    iPoint

    NOTE:   Select mode is the default.

  2. Click any object to select it.

  3. 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.

Procedure To move objects:

  1. Select the objects.

  2. Drag them to the desired location.

    If you move an activity, any links associated with that activity move with it.

 
Top of page

Adding activities

An activity represents a task in a pageflow. A pageflow activity can present an interface to the user or perform background functions.

 
Top of section

Pageflow activity types

Here is a summary of the activities in the Pageflow Modeler. For details about activity properties and usage, click the appropriate item:

Node

Toolbar Icon

Represents

Mode activity

ModeActivity

The starting point for a particular mode with a pageflow.

HTML activity

A presentation activity that specifies HTML content to display at runtime.

XML activity

A presentation activity that specifies XML content. The XML activity allows you to use portal styling to control the presentation, which is particularly useful when you want to perform transcoding for wireless applications.

Form activity

FormActivity

A presentation activity that specifies an XHTML file to display at runtime. The XHTML file defines a form for user interaction.

Pageflow activity

PageFlowActivity

Includes a separate pageflow within the current flow.

JSP activity

A presentation activity that calls a JSP page.

Servlet activity

A presentation activity that calls a servlet.

Initial Query activity

InitialQueryActivity

Obtains the keys of all records from the database that match the user's search criteria.

Get Page activity

GetPageActivity

Retrieves the summary data for a single page of records.

Get Record activity

Retrieves the detail fields for a single record.

Record Insert activity

Sends the data for the new record to the database by executing a SQL INSERT statement.

Record Update activity

Sends the updated data for one record to the database by executing a SQL UPDATE statement.

Record Delete activity

Deletes the records selected by the user by executing a SQL DELETE statement.

Apply Change Log activity

Applies all changes from the record cache to the database.

Rule activity

A system activity that executes a business rule at runtime.

CheckPoint activity

A directive activity that allows you to specify the processing required to refresh a page within a flow. The CheckPoint activity acts as a transaction marker, indicating the starting point for processing required to rerender the page.

Exception activity

A directive activity that acts as the safety net for a pageflow. Each Exception activity is the starting point for processing that handles one or more exceptions.

Java activity

A system activity that executes a Java class within the context of a pageflow.

XSL activity

InitialQueryActivity

A system activity that uses XSL to transform an XML document.

Web Service activity

A system activity that executes a Web Service.

Composer Service activity

A system activity that executes a exteNd Composer service.

Finish activity

A system activity that marks the end of a pageflow. The Finish activity is not required in a pageflow unless it is being used within another pageflow.

Workflow Return activity

WorkflowReturn

A system activity that tells a pageflow to forward its workitem to a workflow.

 
Top of section

Using activities

Procedure To add an activity:

  1. Click the Activities tab.

    The activity toolbar displays:

    PFActivities

  2. Select an activity type.

    For more information    See Pageflow activity types for more information about the activity types.

  3. Click anywhere on the graph to place the object.

Procedure To add a database activity:

  1. Click the Database tab.

    The activity tool bar displays:

    PFDBActivities

  2. Select an activity type.

    For more information    See Pageflow activity types for more information about the activity types.

  3. Click anywhere on the graph to place the object.

Procedure To delete an activity:

  1. Select the activity.

  2. Press the Delete key or right-click and select Delete.

Procedure To access activity properties:

  1. Select the activity.

  2. Right-click and select Properties, or click the Eye icon on the General tab.

  3. Click the appropriate tab in the property sheet.

    For more information    The properties are specific for the activity type. For more information, see Pageflow activity types.

Procedure To open the source file for an activity:

  1. Select the activity.

  2. Click the General tab.

    The General toolbar displays:

    PFGeneralTab

  3. Click the Open Primary Editor icon on the toolbar.

    PFOpenSourceToolbarOption

    The source file is displayed in an editor.

 
Top of page

Adding links

A link is a single logical path from one activity to another activity. Links are represented by arrows in the Pageflow Modeler.

 
Top of section

Pageflow link types

Below is a summary of the activities in the Pageflow Modeler. For details about usage and setting link properties, click on the appropriate item:

Link type

Toolbar icon

Represents

Simple link

A logical path from one activity to one or more other activities. On the link properties you specify the routing logic using the link expression builder.

Condition link

A logical path from one activity to one or more other activities. On the link properties you specify a Condition Macro that you created using the Rule Editor.

Button link

Creates a dynamic submit button on a form. It is used in conjunction with Form activities and must have a Form activity as its source. On the link properties you specify a name and a description for link. When you add a button link to a flow, the expression is created for you automatically using the name you assigned to the link.

Procedure To create a link:

  1. Click the Links tab.

    The link toolbar displays:

    PFLinks

  2. Select a link type.

  3. Click an activity and drag from the starting activity to the target activity, then release the mouse button.

    For more information    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.

Procedure To delete a link:

  1. Select the link.

  2. Press the Delete key or right-click and select Delete.

Procedure To access link properties:

  1. Select the link.

  2. Click the Eye icon on the General tab or right-click and select Properties.

  3. Click the appropriate tab in the property sheet.

    For more information    Properties are specific for the link type. For more information, see Pageflow link types.

 
Top of section

Drawing a link segment

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:

PFSegments

Procedure To draw a segment:

  1. Click any point on a link and drag in any direction.

    The point you drag becomes the bend in the link.

  2. Release the mouse button at the point you want to end the segment.

  3. Click again and drag to add another segment.

  4. For the final segment, drag to the destination activity and click it.

 
Top of page

Using scoped paths

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 more information    For background information about scoped paths, see the chapter on working with scoped paths in Developing exteNd Director Applications.

This section describes how to:

For more information    For information about scoped path usage with examples, see Using scoped paths in a pageflow.

 
Top of section

Associating a scoped path with an activity

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:

Procedure To associate a scoped path with an activity's primary property:

  1. Select the activity, then right-click and select Properties.

  2. 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.

  3. Click the primary property for the selected activity. For details, see Pageflow activity types.

    The Choose The Scope dialog displays:

    PFChooseScope

    The dialog displays the default predefined path for this activity type.

  4. Use one of these methods to specify the path:

  5. After you specify the path, click OK.

Editing a scope   To edit an existing scoped path, repeat the procedure.

 
Top of section

Copying scoped paths

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 more information    For design considerations that relate to copying scoped paths, see the section on copying scoped paths in Developing exteNd Director Applications.

Procedure To copy a scoped path before or after an activity:

  1. Select the activity, then right-click and select Properties.

  2. In the Property Inspector, click the Copy Scoped Paths tab:

    The appropriate Copy dialog (Copy Before or Copy After) displays:

    PFCopyBeforeDialog

  3. 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.

  4. 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:).

  5. Click the ellipsis for To scope. Repeat the procedure for specifying the From scope.

  6. Click Add and then OK to exit the Copy Scope dialog.

To edit a scope   To edit an existing scope, repeat the procedure—but click Update instead of Add.

Procedure To copy a scoped path after the execution of a link:

  1. Select the link, then right-click and select Properties.

  2. In the Property Inspector, click the link Edit Scoped Paths under Copy Scoped Paths.

    The Copy Scoped Paths dialog displays:

    PFCopyScopedXPathDialog

  3. 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.

  4. 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:).

  5. Click the ellipsis for To scope. Repeat the procedure for specifying the From scope.

  6. Click Add and OK to exit the Copy Scope dialog.

  7. 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 procedure—but click Update instead of Add.

 
Top of section

Accessing scoped paths

You can view all of the current paths used for a selected object in the flow or for all objects in the flow.

Procedure To access current scoped paths for an activity or link:

  1. Select the object.

  2. Right-click and choose Scoped paths.

    The Available Scoped Paths dialog displays.

Procedure To access all current paths in the flow:

  1. From the Pageflow menu

    The Available Scoped Paths dialog displays.

  2. Click a scoped path. Notice that the objects that use it are highlighted:

    PFAvailableScopedPaths

 
Top of section

Copying a scoped path to the clipboard

From the Available Scoped Paths dialog you can copy a selected path to the clipboard and paste it wherever you want.

Procedure To copy a scoped path to the clipboard:

  1. Access the scoped paths using one of the methods described in the preceding section.

  2. Select the path you want to copy.

  3. Double-click the path, or click Copy to Clipboard at the bottom of the dialog.

  4. Go to where you want to copy the path and press Ctrl+V.

 
Top of page

Creating link expressions

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    For more information on simple links, see Simple link. For more information on button links, see Button link.

Procedure To specify a link expression:

  1. Select a simple link or a button link, right-click, and select Properties.

  2. In the Property Inspector, select Edit Expression.

    The Expression dialog displays:

    PFExpressionDialog

  3. Click ... to access a scope.

  4. 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:.

  5. In the Value field, specify the value to test against the scoped data.

  6. Select the operator from the data operator dropdown list.

  7. Select the data type (which must match the scoped data) in the data type dropdown.

    The expression builder validates your entry.

  8. Click Add.

    This adds the expression to the text area at the bottom.

  9. 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.

  10. To edit or delete an expression, click Update or Delete.

  11. Click OK when you're done.

 
Top of page

Validating a process

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.

Procedure To validate a process:

 
Top of page

Adding and manipulating text labels

Labels are separate objects in the graphing environment and have their own property sheets. Labels have two forms:

 
Top of section

Floating labels

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.

Procedure To create a floating label:

  1. From the Pageflow Modeler toolbar, select the Text Block button:

    PFFloatingLabelIcon

  2. Click the location on the graph where you want the label to appear.

    The label appears as a box with the text Untitled inside.

  3. From the toolbar, select the arrow button.

  4. Double-click inside the new label and edit the text.

  5. Click outside the label to save your changes.

 
Top of section

Attached labels

Most labels are associated with an activity or link and are called attached labels. By default, activities and links start with a label.

Procedure To edit an attached label:

  1. Right-click an activity icon or link.

  2. From the popup menu, select Create Label.

    A label appears directly below the activity or link.

  3. Double-click inside the label and edit the text.

  4. Click outside the label to save your changes.

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.

Procedure To format any label:

  1. Right-click the label and select Properties.

    The Property Inspector displays showing the current formatting properties.

  2. Make your changes. Properties are described in Setting object display properties.

    Changes are saved as you make them.

Procedure To delete a label:

  1. Select the label.

  2. Press the Delete key.

 
Top of page

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:

Graphical properties

Description

Arrowhead Height

Customize the height (thickness) of the arrowhead for the selected links.

Arrowhead Width

Customize the width (length) of the arrowhead for the selected links.

Border Color

The color of the square outlining the activity. Click the color bar to display a standard color selection dialog.

Color

The background color of the activity. Click the color bar to display a standard color selection dialog.

Font

Click the data area to bring up a standard text formatting dialog.

Height

(Read-only) Height of the activity in pixels. You can enlarge or shrink the activity by dragging its handles.

Margin Height

For labels, the amount of space on the top and bottom between the text and the bounding box.

Margin Width

For labels, the amount of space on the left and right sides between the text and the bounding box.

Show Border

When enabled, displays a square outline around the activity, even when the background color is set to transparent.

Style

Choose a solid line or one of several dashed patterns from the dropdown list. Your choice affects only the currently selected link destination. To change several destinations at once, hold down the Shift key and then click each one. Select a style from the Property Inspector.

Text color

The font color of the label. Click the color bar to display a standard color selection dialog.

Transparent

Overrides the color setting and makes the activity background transparent.

Width

(Read-only) Width of the activity in pixels. You can enlarge or shrink the activity by dragging its handles.

X Center

When the pageflow process is first created, the origin (0, 0) is the bottom-left corner of the graph. The graph automatically resizes in all directions as you create and drag items around. When this happens, the origin does not reset itself to the new bottom-left corner; it remains fixed.

A positive value is the number of pixels above the origin the vertical center of the icon is currently located. A negative value indicates a position below the origin.

Enter a new value to have the Pageflow Modeler automatically move the activity to the vertical position specified.

Y Center

When the pageflow process is first created, the origin (0, 0) is the bottom-left corner of the graph. The graph automatically resizes in all directions as you create and drag items around. When this happens, the origin does not reset itself to the new bottom-left corner; it remains fixed.

A positive value is the number of pixels to the right of the origin the horizontal center of the icon is currently located. A negative value indicates a position to the left of the origin.

Enter a new value to have the Pageflow Modeler automatically move the activity to the horizontal position specified.

 
Top of page

Using the layout features

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.

 
Top of section

Full 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:

PFLayout1

This figure shows the result of applying a full layout to the hand-arranged layout:

PFLayout2

Procedure To apply a full layout:

 
Top of section

Incremental 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:

PFLayout3

TIP:   Try a layout on your graph. Select Edit>Undo to back out of a layout you don't want.

Procedure To apply an incremental layout:

 
Top of section

Setting preferences

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.

Procedure To set layout preferences:

  1. Choose Pageflow>Layout Settings from the development environment menu.

    PFLayoutSettings

  2. Select an orientation.

  3. Select a link style.

  4. Click OK.

 
Top of page

Using the zoom features

The Pageflow Modeler gives you four ways to zoom:

Zoom type

Toolbar icon

Description

Standard zoom

iZoomPer

Allows you to pick from a list of common zoom percents

Marquee zoom

iMarq

Allows you to drag and select a portion of the graph area to be zoomed to fill the graph window

Interactive zoom

iZoonInt

Allows you to zoom up or down by dragging up or down on the graph

Fit in window

iFitWin

Allows you to zoom the graph window to show all the activities in the graph. To do this, it shrinks or enlarges the content of the current document to fit in the graph window.

 
Top of page

Using the grid features

The Pageflow Modeler includes a drawing grid that works much like the grid in any graphics program:

Procedure To turn the grid on or off:

Procedure To change the spacing of grid lines (grid size):

  1. Choose Pageflow>Grid Size from the exteNd Director menu.

    The Grid Size dialog displays:

    PFCustomGridSize

  2. Enter a value in pixels from 7.5 to 1000.

    The default is 10.

  3. Click OK.

 
Top of page

Using the Bird's Eye View

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:

You can use the blue outline box of the Bird's Eye View window to do several useful things:

Doing this

Has this effect

Clicking outside the outline box

Centers the outline box on the point clicked and pans the graph area to correspond to the new location of the outline box

Dragging outside the outline box

Draws the outline box in the new location and pans the graph area to correspond to the new location of the outline box

Dragging inside the outline box

Pans the outline box and pans the graph area to correspond to the new location of the outline box

Dragging a corner of the outline box

Resizes the outline box and zooms the graph area to correspond to the new size of the outline box

 
Top of page

Creating a resource view for a pageflow

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 structure—plus 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    For more information on views, see the chapter on working with views in Developing exteNd Director Applications.

Procedure To create a resource view for a pageflow process:

 
Top of page

Deleting a pageflow

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    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 ...