| <microservice> |
| <descriptions><!- -defines what the service does and describes tags |
| and address, which can be used to find it- -></description> |
| <input> |
| <source name=“src1”> <!- -name defines name for this source in the processing part- -> |
| <address><!- -this is direct access to the service, thus we already know it- -></address> |
| </source> |
| <source name=“src2”> |
| <discovery><!- -Search for all outdoor temperature values of Tampere- -> |
| <tag>location : tampere</tag> |
| <tag>location : outdoor</tag> |
| <tag>measurement : temperature</tag> |
| </discovery> |
| </source> |
| </input> |
| <output><!- -defines output(s) for this service- -></output> |
| <process> |
| <variable name=“avg”> |
| <assign> |
| <function type=“average”> |
| <parameter>src1</parameter> |
| <parameter>src2</parameter> |
| </function> |
| </assign> |
| </variable> |
| <if ><compare operator=“greater”><valueOf name=“avg”/>25.0 </compare> |
| <then> |
| <action type=“increase”><destination name=“dst”/> |
| </then> |
| </if> |
| <if><compare operator=“less”><valueOf name=“avg”/>20.0</compare> |
| <then> |
| <action type=“decrease”><destination name=“dst”/> |
| </then> |
| </if> |
| </process> |
| </microservice> |