To add a custom Hawk Microagent to your adapter, you must edit the adapter’s
XML file.
The following example shows the elements and attributes required for a custom
Hawk Microagent. See the sdk/pubsub example for the actual XML:
+ hawk
- help=Java SDK Example pubsub
- microAgentName=hawkagent
- sessionName = hawkSession
+ method
- help = Retrieve Color Information
- name = getColor (this must match the method name in code)
- type = INFO
+ outputParameter
- help = Color Information
- name = color
- type = string (this must match the method's return
type in code)
+ method
- help = Set Color Information
- name = setColor (this must match the method name in code)
- type = ACTION
+ inputParameter
- help = set color Information
- name = color
- type = string (this must match the method parameter
type in code)
Global Variables
In many fields in the configuration panel, global variables surrounded by %% are
used. In most cases, you can change these global variables using the Global
Variables tab in the project panel.
Do not set values for the %%InstanceId%% and %%AppName%% global variables. The
variables are set at runtime by run-time adapters.
XML file.
The following example shows the elements and attributes required for a custom
Hawk Microagent. See the sdk/pubsub example for the actual XML:
+ hawk
- help=Java SDK Example pubsub
- microAgentName=hawkagent
- sessionName = hawkSession
+ method
- help = Retrieve Color Information
- name = getColor (this must match the method name in code)
- type = INFO
+ outputParameter
- help = Color Information
- name = color
- type = string (this must match the method's return
type in code)
+ method
- help = Set Color Information
- name = setColor (this must match the method name in code)
- type = ACTION
+ inputParameter
- help = set color Information
- name = color
- type = string (this must match the method parameter
type in code)
Global Variables
In many fields in the configuration panel, global variables surrounded by %% are
used. In most cases, you can change these global variables using the Global
Variables tab in the project panel.
Do not set values for the %%InstanceId%% and %%AppName%% global variables. The
variables are set at runtime by run-time adapters.
No comments:
Post a Comment