Download Renque user`s guide

Transcript
Renque user's guide
Sweep(Operation)
Statement. Executes the script specified by the argument Operation consecutively on
all members of the assembly. The assembly members addressed by the Operation
argument are referenced by the global procedure Member. For example:
.RuleLinks.Sweep(if Member.Batch=3 then Member.Batch=2)
changes a Batch value of 3 into 2 for all member links in the referenced RuleLinks
assembly.
HasItem(Criterion="")
Function(Boolean). Verifies if the assembly has at least one member that meets the
requirement specified by the argument Criterion. The mandatory Criterion argument
has the same syntax structure and function as for the assembly procedure Count.
The function can be used as alternative to the procedure call
.Count(Criterion)<>0. It is considerably faster in case the assembly typically
has a large number of members which regularly, but not necessarily, meet the
Criterion requirement.
Assembly procedures for rule assemblies.
The server procedures RuleLinks and RuleResidents return assembly objects
representing a group of links or entities subjected to a selection routine directed by
the Passive rule, Collect rule or Dispatch rule properties of a server. The rule
assemblies share a number of procedures, in addition to the standard assembly
procedures, that allow control of the selection routine by incident scripting.
Exclude(Criterion)
Statement. Excludes items from the assembly that meet the requirement specified by
the Criterion argument. The Criterion argument has the same syntax structure and
function as for the assembly procedure Count. For example, the script command:
RuleLinks.Exclude(Member.Origin.Population < 3)
removes all links from the RuleLinks assembly with an origin server that has less
than 3 residents. If the Criterion argument does not return a boolean value for one or
more assembly members, the function creates an entry in the error viewer list, but
does not cause an actual runtime error. The same happens if an Exclude statement
call would result into exclusion of all members of the assembly, in which case the
exclusion is not applied. Multiple calls of the Exclude statement in the same scripting
incident result into additional exclusions.
SelectMember(Member)
Statement. Condenses the assembly to a single member by removing all members
other than the item specified by the argument Member. The Member argument is
either an object that represents a member of the assembly, or an integer number
specifying the position of the object in the assembly in the same way as the Index
argument of the Item assembly procedure. A runtime error is raised if the Member
argument represents an object than is not a member of the assembly. Passing Void
for the Member argument rebuilds the assembly and eliminates any prior exclusions
resulting from the above-mentioned Exclude statement.
CycleReset
Statement. Clears the reference to the previously selected link under application of
the Cycle value to the Collect rule or Dispatch rule server properties. Execution of
this statement causes the next link selection procedure governed by the affected
Cycle rule to pick the first link item in the RuleLinks assembly.
- 143 -