Workflow Guide

CHAPTER 5

Workflow Modeler

This chapter has general information about how to create workflow processes using the Workflow Modeler. It has these sections:

 
Top of page

About the Workflow Modeler

The Workflow Modeler allows you to create and save an XML document that can be executed by the workflow engine at runtime. Creating a workflow process is a three-step process:

  1. Use the graphing environment of the Workflow 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 Workflow Modeler converts it to a process definition that the workflow engine can execute.

 
Top of page

Starting the Workflow Modeler

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

Procedure To create a workflow process:

  1. In the development environment, select File>New.

  2. Click the Workflow tab:

    wdNewFileDg

  3. Select Workflow Process and click OK.

    The main window of the Workflow Modeler opens in the editing area. The flag icon represents the Start activity for the process:

    wdNewProcess

Procedure To save a workflow process:

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

    If the Workflow 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 workflow process definitions 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 workflow process:

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

  2. Navigate to the workflow process 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 UI properties.

Procedure To access process properties:

  1. Do one of the following:

    The Property Inspector displays the process properties:

    wdProcessProps

  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.

    Description

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

    Roles

    A semicolon-delimited list of existing security roles that are authorized to start a process and create workitems. For example:

      authors;developers;managers
    

    For more information    For more information, see the chapter on using security roles in the User Management Guide.

    Show Precedence Labels

    Specifies whether precedence labels should be displayed in the workflow graph. When an activity is linked to more than one other activity, the Workflow 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 workflow can be used as a template for the creation of other workflows.

    WorkName

    A descriptive name for the Workflow Modeler user.

 
Top of page

About the Modeler window

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

wdPanelViewSelector

Command features   Here are the command features of the Workflow Modeler:

wfModelerWindow

 
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.

Procedure To move objects:

  1. Select the object.

  2. Drag it to where you want it.

    When you move an activity, any associated links move with it.

 
Top of page

Adding activities

An activity represents a workitem in the workflow process. You associate the activity with a workitem and/or business logic by setting properties on the activity icon, or node.

 
Top of section

Workflow activity types

The following is a summary of the activities in the Workflow Modeler. For details about activity properties and usage, click on the appropriate item:

Node

Toolbar icon

Represents

Pageflow activity

tbPageflow

A pageflow created with the Pageflow Modeler

User activity

tbUser

A presentation activity for custom client implementations

Web Service activity

tbWebService

A system activity that executes a Web Service

Rule activity

tbRule

A system activity that executes a business rule at runtime

Java activity

tbJava

A system activity for executing custom business logic

Synchronize Merge activity

tbSynchMerge

A system activity that provides a synchronization point for parallel branches of execution

Start activity

tbStart

A system activity that marks the beginning of a workflow (required)

Composer Service activity

tbComposer

A system activity that executes an exteNd Composer service

Finish activity

tbFinish

A system activity that marks the end of a workflow (required)

Procedure To add an activity:

  1. Click the Activities tab.

    The activity toolbar displays:

    tbAll

  2. Select an activity type.

  3. Click anywhere on the graph to place the activity. Click and drag to move.

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 Workflow activity types.

 
Top of page

Adding links

A link is a single logical path from one activity to another activity. Each link represents a potential routing of workitems exiting a single activity. Links are represented by arrows in the Workflow Modeler.

 
Top of section

Workflow link types

There are two types of links:

Link type

Toolbar icon

Represents

Simple link

tbSimpleLink

A logical path from one activity to one or more other activities. On the link properties you specify:

  • Routing logic using the link expression builder

  • Destination addressee as a user or role

Condition link

tbConditionLink

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.

Procedure To create a link:

  1. Click the Links tab.

    The link toolbar displays:

    tbAllLinks

  2. Select a link type.

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

    For more information    See also 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 Workflow 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 process model:

segments

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 where 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 on it.

 
Top of page

Using scoped paths

Scoped paths allow you to associate data with workflow activities and links. exteNd Director provides a set of predefined scoped paths that you can access using 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:

 
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.

Activities you can associate   You can do this with any of the following types of activities:

Two procedures   Associating a scoped path with an activity requires two procedures:

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 Pageflow activity has a Pageflow tab where you can set the primary property.

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

    The Choose The Scoped XPath dialog displays showing the default predefined path for this activity type:

    WFChooseScope

    The Show XML File Content check box applies to the Browse option. If selected, the XPath Navigator will display the tree contents of the XML file. If not selected the contents will not display. For more information, see To browse to a new path:.

  4. Complete the next procedure to specify a scoped path.

Procedure To specify a scoped path:

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

    To enter the path directly:

    To select another path or a path already defined for this flow:

    To browse to a new path:

  2. Click OK.

Editing a scoped path   To edit an existing scoped path, repeat the two procedures above (To associate a scoped path with an activity's primary property: and To specify a scoped path:).

 
Top of section

Copying scoped paths

With the exception of the Start and Finish activites, 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 XPaths tab.

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

    WFCopyBeforeDialog

  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 under To specify a scoped path:.

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

  6. On the Copy Scope dialog, click Add, then click OK to exit the dialog.

  7. To edit an existing scope, repeat the procedure and 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 XPaths under Copy Scoped XPaths.

    The Copy Scoped XPaths dialog displays:

    WFXPathDialog

  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 under To specify a scoped path:.

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

  6. On the Copy Scope dialog click Add, then click OK to exit the dialog.

  7. To edit an existing scope, repeat the procedure and 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 XPaths dialog displays.

Procedure To access all current paths in the flow:

  1. Do one of the following:

    The Available Scoped XPaths dialog displays.

  2. Click a scoped path. Notice that the objects that use it are highlighted, as shown with the Java activity in this example:

    WFAvailableScopedPaths

 
Top of section

Copying a scoped path to the clipboard

Form the Available Scoped XPaths 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 dynamically route work based on runtime workitem values. The expression builder allows you to test workitem properties in simple or compound expressions that evaluate to true or false. Expressions apply to the Simple link only.

For more information    For more information, see Simple link.

Procedure To specify a link expression:

  1. Select a Simple link, then right click and select Properties.

  2. In the Property Inspector select Edit Expression.

    The Expression dialog displays:

    wdExpressionBuilder

  3. Click Choose Scope to access a workitem.

  4. To specify the path, use one of the methods described under To specify a scoped path:.

  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 to add 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 for as many clauses as you need.

    NOTE:   Enable the Not check box to negate the current expression.

  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 Workflow 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 text labels

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

 
Top of section

Floating labels

Floating labels are simply text you place on your workflow graph and have no association with another workflow graph object. Titles, version numbers, notes, and legends are all good uses for floating labels.

Procedure To create a floating label:

  1. From the Workflow Modeler toolbar, select the Label button:

    iText

  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.

    Each click creates a new label.

  3. From the toolbar, select the arrow button.

  4. Double-click inside a 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. In the Workflow Modeler, 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 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. In the Workflow Modeler, right-click the label and select Properties.

    The Property Inspector displays showing the current formatting properties. (If the Property Inspector is already open, just click the label.)

  2. Select the Design UI tab.

  3. Make the changes you want.

    For more information    For a description of the UI properties, see Setting object display properties.

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 graphical properties associated with it. Select and right-click an element, and the properties of the element are displayed in the Design UI tab in the Property Inspector. The table below describes the graphical properties found on some or all of the elements:

Activity 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 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 workflow 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 Workflow Modeler automatically move the activity to the vertical position specified.

Y Center

When the workflow 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 Workflow 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 Workflow 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 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 Workflow Modeler great freedom to move activities, links, and labels around the graph.

For example, this figure displays a hand-arranged layout:

WFLayout1

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

WFLayout3

Procedure To apply a full layout:

 
Top of section

Incremental layout

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

WFLayout2

Procedure To apply an incremental layout:

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

 
Top of section

Setting preferences

You can set layout preferences for a workflow 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 Workflow>Layout Settings.

    WFLayoutSettings

  2. Select an orientation.

  3. Select a link style.

  4. Click OK.

 
Top of section

Undoing a layout

You can undo a layout selection and return to the previous layout.

Procedure To undo or redo a layout:

 
Top of page

Using the zoom features

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

Procedure To zoom using the toolbar:

 
Top of page

Using the grid features

The Workflow 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 Workflow>Grid Size.

    The Grid Size dialog displays:

    WFCustomGridSize

  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 workflow 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 process resource view

You can create a custom view of all resource files associated with a workflow. Once you've created the view, you can use display it on the View tab.

TIP:   To get to the View tab, you need to first click on the Resources tab in the Navigation Pane.

Procedure To create a custom view for a workflow process:



Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...