C H A P T E R 1 8
About the Assistant
Your task template designates one action template as its primary action. The
primary action is the one that the Assistant associates with a specified verb in its
input string. The primary action is represented by an action template that resides in
the task template's
slot. Because task templates do not provide
lexicons, the designation of a primary action provides the Assistant with a way to
associate a verb in the input string with a task template.
In addition to items required by the Assistant, your task template can hold any
additional methods or data structures you require to perform the task.
Recall that the Assistant creates an action frame or target frame for each word in
the input string that matches a lexicon item in a registered template. If the Assistant
can match an action frame with the
slot in a task template, it uses
that template to create a task frame. The task frame holds all the information defined
in the task template, as well as some additional slots that the Assistant provides.
The Assistant creates slots in the task frame to hold action frames and task frames
that are created as templates in the
slot are matched. These slots are
named using symbols that reside in a
slot that your task
Each element of the
array specifies the name of the slot that is
to hold the frame created from the template in the corresponding element of
array. For example, presume that the fourth element of the
array holds the
template and the fourth element of the
array holds the
symbol. When the
template is matched, the Assistant creates in a slot named
in the task frame and places in that slot the action frame created
template. Later in this chapter, the section "The Signature and
PreConditions Slots" (page 18-10) discusses this process in more detail.
If the Assistant cannot match an action frame with any of the task templates
currently registered, it displays the Assist slip, which prompts the user to specify
If the Assistant matches more than one action frame with a currently registered task
slot, it attempts to resolve the conflict by determining
whether additional frames required by the task template are present. The conflict
resolution process is described in "Resolving Template-Matching Conflicts"
Once the Assistant has matched as many templates as possible and stored the
resulting frames in the task frame, it sends the
message to the
Figure 18-4 illustrates a simple example of how the Assistant builds a task frame
by matching user input strings with registered templates.