WebSphere brand IBM WebSphere Sensor Events, Version 6.2

updateRuleInstance

Purpose

This Web service allows you to update an already existing rule. When a rule instance is updated, the old version is deleted and a new instance is created.

Syntax

void updateRuleInstance(String type,String name,String description,KeywordValuePair[] attributes,boolean deploy)

Input

type: For a description of each of the rule types, see Business Rules. The following is a list of valid rule types:
  • Duration of Stay in Zone
  • Items Association
  • Man Down Detection
  • Maximum Items per Zone Threshold
  • Visitor Escorting
  • Zone Access Restriction
  • Zone Exit Restriction

name: The unique name for this rule. The maximum name length size is 64 bytes. Quotation marks cannot be used.

description: A description of the rule.

attributes: Attributes for the rule that are specified by keyword and value pairs. For more information on attributes for specified rule types, see Table 1 and Table 2.

deploy: Indicates whether the rule is to be deployed. Valid values are true or false.

The following tables contain lists of keywords and example values for the attributes variable. For additional information on defining rules, see Business Rules.

Table 1 for Visitor Escorting and Items Association contains a list of valid keywords and values. It is important to note that all the keywords are required.

Table 1. Attributes for Visitor Escorting and Items Association rules
Keyword Example value Value description
zoneType 1
The following are valid values for zoneType:
  • 1 : Indicates that the value for the zone parameter represents the zone ID.
  • 2 : Indicates that the value of the zone parameter represents a zone class ID.
zone 2 Depending on zoneType, this value represents either the zone ID or a zone class ID.
alertActions 3 This value is a sum of the following possible values:
  • 1 = log alert
  • 2 = display alert
  • 4 = custom notification

In this example, the resulting value 3 is the sum of the value for a log alert (1) and a display alert (2).

itemType1 3 Keyword itemType1 corresponds to the Visitor. Keyword itemType2 corresponds to the Escort. Possible values can be one of the following:
  • 1 = item ID
  • 3 = class ID
  • 4 = group ID
itemType2 1
item1 1 Depending on itemType, this value represents either an item ID, a class ID, or a group ID.
item2 4343
additionalParameter1 30 This value is the maximum tolerated distance, in units, that the visitor can be away from the escort.
Note: Currently, the edge length of the visitor (who is in the container class) determines the maximum tolerated distance.
additionalParameter2 400 This value is the tolerated rule violation time, in seconds.

For Duration of Stay in Zone, Maximum Items per Zone Threshold, Zone Access Restriction, Zone Exit Restriction, and Man Down Detection, Table 2 contains a list of valid keywords and values for the attributes variable. Only activityPattern is required by all the specified rule types. The additionalParameter1 keyword is required but only valid for Duration of Stay in Zone and Maximum Items per Zone Threshold.

Table 2. Attributes for Duration of Stay in Zone, Maximum Items per Zone Threshold, Zone Access Restriction, Zone Exit Restriction, and Man Down Detection.
Keyword Example value Value description
activityPattern A:
This keyword is required. The activityPattern specifies the time frame when the rule should be applied. The following is a list of values for the rule's activity pattern:
  • A:Always active.
  • D:2008/02/17-19:26:00;2008/02/25-19:26:00;Discretely active. For this example, the rule is active only for the specified time from February 17, 2008, at 7:26:00 p.m. through February, 25, 2008 at 7:26:00 p.m.
  • R:2+[08:00:00-09:00:00];3-[08:00:00-09:00:00];Repetitively active. For this example, the rule is repetitively active on Tuesdays from 8:00:00 a.m. to 9:00:00 a.m. and on Wednesdays except from 8:00:00 a.m. to 9:00:00 a.m.
class1 1 This value represents the class name to be included or excluded.

Class parameters are used to define the actor for a rule. 1

exclClass1
group1 3 This value represents the group name to be included or excluded.

Group parameters are used to define the actor for a rule. 1

exclGroup1
attrName1 TagID, Label This value represents the name of the attribute used for the inclusion or exclusion filter.

Attribute name parameters are used to define the actor for a rule. 1 2

exclattrName1
attrOperator1 endsWith

>=

contains

This value represents the operator used for the inclusion or exclusion filter.
The supported operator values are:
  • equals
  • equalsIgnoreCase
  • unequals
  • unequalsIgnoreCase
  • >
  • >=
  • <
  • <=
  • startsWith
  • endsWith
  • contains

Attribute operator parameters are used to define the actor for a rule. 1 2

exclattrOperator1
attrValue1 133 The attribute value used for the inclusion or exclusion filter.

Attribute value parameters are used to define the actor for a rule. 1 2

exclattrValue1
Zone 2 Represents the zone name to be included or excluded. 3
exclZone
zoneType 6 Represents the zone class name to be included or excluded. 3
exclZoneType
alertActions 3 This value is a sum of the following possible values:
  • 1 = log alert
  • 2 = display alert
  • 4 = custom notification

In this example, the resulting value 3 is the sum of the value for a log alert (1) and a display alert (2).

additionalParameter1 varies depending on the rule This keyword is required but only valid for the following rule types:
  • Maximum Items per Zone Threshold. Specify the maximum number of actors, such as 30.
  • Duration of Stay in Zone. Specify the maximum duration of stay in seconds.
  • Specify the down time in seconds, such as 120. This keyword is only valid for the Man Down Detection rule type.

Output

This Web service returns nothing.

1 The following applies when defining an actor:
2 When filtering by attribute, the name, operator, and value keywords all need to be defined for the rule.
3 When filtering by using the zone related keywords, you can only define Zone or zoneType, but not both keywords for the rule.

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2009. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.