WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

createRuleInstance

Purpose

Rules are created in the Location Awareness Services for WebSphere® Premises Server database, but will not take affect until they are deployed.

Important: To use createRuleInstance for LasRuleServices, you must provide the Web service interface with internal information on zone IDs, class IDs, group IDs, and item IDs. You can obtain this information by browsing the following ATLASDB tables and by invoking another Web service.
  • For zone IDs: Browse the ATLASDB.ZONES table for information on zone IDs.
  • For class IDs: Browse the ATLASDB.CLASSES table for information on class IDs.
  • For group IDs: Browse the ATLASDB.GROUPS table for information on group IDs.
  • For item IDs: Invoke the Web service viewItem of LasItemDetailServices to obtain the item IDs.
createRuleInstance type name description attributes deploy
type: For a description of each of the rule types, see Business Rules. The following is a list of valid rule types:
  • Visitor Escorting
  • Duration of Stay in Zone
  • Maximum Items per Zone Threshold
  • 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 values. 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 0 or 1.

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

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

Table 1. Keyword-values for createRuleInstance for Visitor Escorting 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, and Zone Exit Restriction, Table 2 contains a list of valid keywords for the attributes parameter. However, 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. Keyword-values for createRuleInstance for rule types: Duration of Stay in Zone, Maximum Items per Zone Threshold, Zone Access Restriction, and Zone Exit Restriction
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 ID 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 ID 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 ID to be included or excluded. 3
exclZone
zoneType 6 Represents the zone class ID 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 30 This keyword is required but only valid for the following rule types:
  • Maximum Items per Zone Threshold. Specify the maximum number of actors.
  • Duration of Stay in Zone. Specify the maximum duration of stay in seconds.
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, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.