Creating a Knowledge Advisor
Reaction: Inserted Event
|
This task explains how to use the Inserted
event in a reaction
feature. In the scenario below, the user inserts an element into the
CATProduct document, which displays a message. |
|
The Reaction capabilities require the Knowledge Advisor product. |
|
- Create a CATProduct file called Container.CATProduct and insert
the KwrSyringeContainer.CATPart
file by using the Insert->Existing Component...
command. Save your file.
- Create a CATProduct file called Plunger.CATProduct, rename the
root of the specification tree to Plunger, and insert the KwrSyringePiston.CATPart
file by using the Insert->Existing Component...
command.
- From the Start->Knowledgeware menu, access the Knowledge Advisor workbench and click the Reaction icon
()
to create a reaction. The reaction dialog box opens.
|
| In the Source type field, select Selection
for the Reaction to be applied to the element you select
(plunger in this example). |
|
| In the Available events list, select Inserted
if you want the action to be launched when the Plunger
is inserted into
the CATProduct. |
|
| In the Action field, select Knowledgeware
action and enter the following message: Message("Plunger
inserted"). This message will be
displayed after the plunger is inserted. |
|
| Click OK. A reaction is added to the Relations node in
the specification tree. |
|
| Save the file and close it. |
|
- In the Container.CATProduct file, select the Insert->Existing
Component... command. The File Selection dialog box opens. Select the
Plunger.CATProduct
file and click Open.
- The message specified step 3 displays.
|
|
To know more about the Reaction feature
window, see Using
the Reaction Feature Window. |
|