Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 6 Working with Microagents : Viewing Microagents and Invoking a Microagent Method

Viewing Microagents and Invoking a Microagent Method
The following example invokes the getMicroAgentInfo() method of the Self microagent:
1.
Click an agent listed in the Agent portlet on the Hawk Dashboard. The Agent tab opens. The name of the Agent tab is same as the selected agent name <agent_name>. The following tabs are available on the top right corner of the screen:
a.
b.
c.
d.
2.
Click the Microagents tab. The Microagent Info screen is displayed. This screen is divided in four panels.
Microagent Info : Lists the microagents you can access on the current agent.
Methods: List the methods supported by the selected microagent and the mode of operation.
Description: Provides detailed help description for the selected method.
Arguments: Provides the arguments required for the microagents.
Figure 17 Microagent Info Screen
 
3.
Click Self from the microagent list to display the list of methods in the Methods panel. The Self microagent represents the TIBCO Hawk agent itself. Its methods generally provide information about the agent.
4.
Click the getMicroagentInfo method from the list displayed in the Methods panel. A detailed help description is displayed in the Description panel.
 
Methods can return information about a managed object, take an action that modifies the managed object, or both.
The getMicroAgentInfo method returns the names of microagents currently active on this agent. It takes a test string for microagent name as an optional argument, but if no name is specified it returns a list of all microagents for this agent. Invoking this method without arguments returns a list similar to the microagent list in the dialog. For detailed descriptions of default microagent methods, see the TIBCO Hawk Microagent Reference.
5.
Invoke: Use the Invoke mode to immediately view the results. Invoking is useful when you want to test a method before using it in a rule, or to check a return value for troubleshooting purposes. This example demonstrates the Invoke mode of operation.
Subscribe: Use the Subscribe mode to view microagent method results over time. Creating a subscription is useful when you want to test a range of return values before specifying boundaries in a rule, or to identify general patterns of activity. The example for Subscribe mode is demonstrated in section Subscribing to a Microagent Method.
Select the Invoke radio button from the Methods panel title bar. For more information on any synchronous and asynchronous methods, see the TIBCO Hawk Microagent Reference.
6.
The Invocation Results window displays the results returned by the method:
Figure 18 Invocation Results Window
Methods can return either a single record with one or more fields, or tabular data with one or more columns and rows. This method returns tabular data with each row corresponding to a separate component.
7.
Click the button in the Microagent Info panel to refresh the list of microagents.
8.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved