Rules tab  Rule processing

Chapter 12: Using Enterprise Portal Agents

Using rule operators

The Rules section of the Rule Editor lets you create and group rules together based on the Boolean operators AND or OR that tell the system which keywords the portlet’s content must include or exclude before the portlet’s agent executes.

The relational operators that appear in the 2nd rule box are:

StepsBasing rules on criteria

Basing a rule on criteria allows you to execute a rule on a selection of portlets that meet user-specified parameters; for example, to execute the rule on portlets owned only by a particular user.

This procedure describes how to set up an agent to find portlets in which one-click content capture has failed and the portlets are broken.

  1. In the Rule Editor, select Criteria and click Select. You see the Add Content by Criteria window.

  2. To complete the Criteria Parameters, select:

  3. Click OK to save the criteria and return to the Rule Editor, which populates the Name drop-down list for Preview Source with all items that meet the selected criteria at that moment.

  4. In the Rules section, select xpath and enter this execution statement:

    '//ContentDoc/Element/text( )' equals (text) 'ERROR'
    

    and click OK.

    The rule has been set up to check for a particular type of error by looking at the XML returned from the portlet when it fails. The XML for this portlet displays as:

    <?xml version="1.0" encoding="UTF-8 ?>
    -<ContentDoc>
    <Element name=”bonds2”>ERROR</Element>
    </ContentDoc>
    




Copyright © 2004. Sybase Inc. All rights reserved. Rule processing

View this book as PDF