628
|
1 |
Messaging
|
|
2 |
=========
|
|
3 |
|
|
4 |
Currently the communication to external services (diamonds, ats, internal logging framework)
|
|
5 |
are done within helium as REST / SOAP client, which is not scalable and had limitations
|
|
6 |
and lot of overheads in terms communication with those external services.
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
Overview
|
|
11 |
--------
|
|
12 |
|
|
13 |
The messaging framework is aimed to address this issue by defining
|
|
14 |
the input using which the data is exchanged to the external system. Currently the
|
|
15 |
main focus is to define the input format for the messaging framework and to work with
|
|
16 |
existing framework. In the future directly interact with the messaging system to exchange
|
|
17 |
data to the external system.
|
|
18 |
|
|
19 |
Currently there are three types of messages could be defined, which works with
|
|
20 |
existing system to send data to diamonds.
|
|
21 |
|
|
22 |
Text Message
|
|
23 |
~~~~~~~~~~~~
|
|
24 |
|
|
25 |
Any text message to be sent to the diamonds could be possible with the message type
|
|
26 |
definition. Example to use it as below,
|
|
27 |
|
|
28 |
|
|
29 |
.. code-block:: xml
|
|
30 |
|
|
31 |
<hlm:textMessage id="initial-message" text="<diamonds-build>
|
|
32 |
<schema>21</schema><build>
|
|
33 |
<category>ido_BtDo_tb101-release_btservices_sbs-ec</category>
|
|
34 |
<name>IDO_BtDo_tb101-release_btservices_10.1.69</name>
|
|
35 |
<started>2010-08-04T13:23:54</started></build></diamonds-build>" />
|
|
36 |
|
|
37 |
File Message
|
|
38 |
~~~~~~~~~~~~
|
|
39 |
|
|
40 |
Any file which needs to be sent using messaging framework could be defined
|
|
41 |
using file message. Example to use it as below,
|
|
42 |
|
|
43 |
.. code-block:: xml
|
|
44 |
|
|
45 |
<hlm:fileMessage id="initial-message" file="${build.output.dir}/initial-message.xml" />
|
|
46 |
|
|
47 |
Here the the attribute value for file attribute pointing to the file to be sent is forwarded
|
|
48 |
to the destination.
|
|
49 |
|
|
50 |
|
|
51 |
FMPP Message
|
|
52 |
~~~~~~~~~~~~
|
|
53 |
|
|
54 |
Any message generated by processing the fmpp template data could be defined using
|
|
55 |
the fmpp message. Example is,
|
|
56 |
|
|
57 |
.. code-block:: xml
|
|
58 |
|
|
59 |
<hlm:fmppMessage target="diamonds" sourceFile="tool.xml.ftl">
|
|
60 |
<data expandProperties="yes">
|
|
61 |
ant: antProperties()
|
|
62 |
</data>
|
|
63 |
</hlm:fmppMessage>
|
|
64 |
|
|
65 |
The above definition format is similar to fmpp conversion task, except that it has
|
|
66 |
limitation to convert one file using the template. Before sending data, the input template
|
|
67 |
is converted and an internal file message is created with the converted file path and
|
|
68 |
sent to the diamonds.
|
|
69 |
|
|
70 |
TargetMessage Trigger
|
|
71 |
~~~~~~~~~~~~~~~~~~~~~
|
|
72 |
|
|
73 |
TargetMessageTrigger type maps a message to a particular target and could be used to
|
|
74 |
send the input message for the target execution. Example is as below,
|
|
75 |
|
|
76 |
|
|
77 |
.. code-block:: xml
|
|
78 |
|
|
79 |
|
|
80 |
<hlm:targetMessageTrigger id="codescanner.id" target="ido-codescanner">
|
|
81 |
<hlm:fmppMessage sourceFile="${helium.dir}/tools/common/templates/diamonds/codescanner.xml.ftl">
|
|
82 |
<data expandProperties="yes">
|
|
83 |
ant: antProperties()
|
|
84 |
doc: xml(${ido.codescanner.output.dir}/problemIndex.xml)
|
|
85 |
</data>
|
|
86 |
</hlm:fmppMessage>
|
|
87 |
</hlm:targetMessageTrigger>
|
|
88 |
|
|
89 |
|
|
90 |
In the above example, the target ido-codescanner contains an fmpp message. When
|
|
91 |
the target executes the target ido-codescanner at the end of execution which converts
|
|
92 |
the input file using template and the output file is sent to diamonds. |