First Previous Next Last

Rules Guide  

Chapter 6   Pipeline and Binding Editors

This chapter describes how to use the Pipeline and Binding Editors in Workbench to set up a rules pipeline. It has these sections:

 
Top of page

How to set up a pipeline

A pipeline is a mechanism for running a set of rules that are associated with specific users or groups, or for running any set of rules in a prescribed sequence.

Basic procedure   Here is the basic procedure for setting up a pipeline:

  1. Use the Pipeline Editor to create a pipeline and associate it with one or more of the three binding steps: User, Group, and Pipeline.

  2. Use the Binding Editor to bind rules to a user, group, or pipeline.

Using a pipeline   After you set up a pipeline, you fire the rules defined in the pipeline by calling the validate() method in your application component, supplying the pipeline ID:

What's here   The rest of this chapter describes how to create a pipeline in the Pipeline Editor and define a rule binding in the Binding Editor.

For more information    For background information about using pipelines in Director applications, see Rule Development Basics.

 
Top of page

Creating and editing a pipeline

You use the Pipeline Editor in Workbench to create a pipeline and associate it with a step or steps.

Procedure To create a pipeline:

  1. From the Workbench main menu select File>New.

  2. In the New File dialog, select the Rules Engine tab.

  3. Select the Pipeline icon:

    wbREpipeNew

    The General tab of the Pipeline Editor displays:

    wbREpipeEditor

  4. Enter information on the General tab:

    Field

    What to do

    ID

    Enter a pipeline ID. This is the string you supply for Director API method calls, including the validate() method.

    Description

    (Optional) Add a description.

    Active?

    Click to make active. Only active pipelines can be validated.

    Generate log info?

    (Optional) Click to generate pipeline processing and debugging messages to your server console.

  5. Select the Steps tab.

  6. In the Available steps section, select a step and click Add to Selected.

    wbREpipeSteps

    The step is added to the Selected steps section.

    wbREpipeSteps2

  7. Add other steps as needed.

    If you add more than one step, the rules defined in the corresponding binding will fire in the order of the steps in the Selected steps section.

  8. Select File>Save or press Ctrl-S.

    The contents of the pipeline definitions folder display in your project resource set.

    The resource set provides access to application resources that are not stored within a subsystem's database or within its configuration and services elements. Such resources include pipeline and rule binding XML definitions.

    For more information    For more information about resource sets, see the chapter on application architecture in the Core Development Guide.

  9. Select Save.

  10. Exit the editor by choosing the exit icon in the upper-right corner.

 
Top of section

Editing a pipeline

Procedure To edit a pipeline:

  1. In your project Source or Archive layout in Workbench, navigate to the pipeline XML file.

    The default location in your project layout is:

    ResourceSet/WEB-INF/lib/resource.jar/data/rule-pipeline.

  2. Double-click the file to open it in the Pipeline Editor.

Editing the pipeline XML source

You can also edit the XML descriptor directly outside the Rule Editor. For more information you can access the DTD and sample XML in your Director project source directory at:

 
Top of page

Binding rules to a user, group, or pipeline

You use the Binding Editor to bind a rule to a selected user, group, or pipeline.

 
Top of section

Creating a rule binding

Procedure To define a rule binding:

  1. From the Workbench main menu select File>New.

  2. In the New File dialog, select the Rules Engine tab.

  3. Select the Group Bindings, Pipeline Bindings, or User Bindings icon.

    The appropriate binding editor displays. The text box at the top of the editor depends on which icon you selected.

  4. Make the appropriate entry in the text box:

    Binding text box

    What you do

    User

    Enter a valid user ID in the User text box.

    NOTE   To avoid any conflict or inconsistency, you are limited to one binding per user.

    Group

    Enter a valid group ID in the Group text box.

    NOTE   To avoid any conflict or inconsistency, you are limited to one binding per group.

    Pipeline

    Select a pipeline ID from the dropdown list.

    NOTE   To avoid any conflict or inconsistency, you are limited to one binding per pipeline ID.

  5. In the Available rules section, select a rule and click Add to Selected.

    The rule is added to the Selected rules section.

  6. Add other rules as needed. Rules will fire in the order they appear in the list.

  7. Choose File>Save or press Ctrl-S.

    This displays a dialog with the contents of the appropriate binding definitions in your project resource set.

    The resource set provides access to application resources that are not stored within a subsystem's database, or within its configuration and services elements. Such resources include pipeline and rule binding XML definitions.

    For more information    For more information about resource sets, see the chapter on application architecture in the Core Development Guide.

  8. Select Save.

  9. Exit the editor by choosing the exit icon in the upper-right corner.

 
Top of section

Editing a rule binding

Procedure To edit a binding:

  1. In your project Source or Archive layout in Workbench, navigate to the location of the binding XML definition in your project resource set.

    Here are the default locations in your project layout:

    Binding

    Default resource set location

    User

    ResourceSet/WEB-INF/lib/resource.jar/data/rule-user-binding

    Group

    ResourceSet/WEB-INF/lib/resource.jar/data/rule-group-binding

    Pipeline

    ResourceSet/WEB-INF/lib/resource.jar/data/rule-pipeline-binding

  2. Double-click the file to open it in the Binding Editor.

Editing the rule binding XML sources

You can also edit the XML descriptor directly outside the Rule Editor. For more information, you can access the DTD and sample XML in your Director project source directory at:

    First Previous Next Last

Rules Guide  

Copyright © 2002, SilverStream Software, LLC, a wholly owned subsidiary of Novell, Inc. All rights reserved.