Products | Versions |
---|---|
TIBCO Hawk | - |
Not Applicable | - |
Resolution:
Hawk agent has a messaging microagent using the configuration file at hawk/bin/msghma.xml. You can update the file to config a method that listens to RV messages sent on the Hawk default transport bus. Let's say you want to retrieve the content of the 'command' field in the following RV message:
2006-11-25 12:54:15 (2006-11-25 17:54:15.328000000Z): subject=rt10.voicert.algorithm.command, message={command="C:\WINDOWS\execAlgorithm.sh /mnt/dev/jobs/jobxyz"}
You can add a method onMessageCommand like below:
<method
name = "onMessageCommand"
help = "Receive a message with a 'command' field having a string value. "
handlerType = "SU"
>
<inputParameter
name = "Subject"
help = "Message subject"
type = "STRING"
>
<valueChoices
value = "_HAWK.${domainName}.msghma.data">
</valueChoices>
</inputParameter>
<outputParameter
name = "Subscription Subject"
help = "Subscription Subject"
type = "STRING"
>
</outputParameter>
<outputParameter
name = "Message Subject"
help = "Message Subject"
type = "STRING"
>
</outputParameter>
<outputParameter
name = "command"
help = "Command Field Data"
type = "STRING"
>
</outputParameter>
</method>
Make sure the handlerType="SU" not "DS".
The result is that you would get one of the output field containing: "C:\WINDOWS\execAlgorithm.sh /mnt/dev/jobs/jobxyz". If you use "DS" as handlerType, you would get 'command="C:\WINDOWS\execAlgorithm.sh /mnt/dev/jobs/jobxyz"' as content of the output field.