rule elements. Each of the rule element defines one rule which must be applied by the module. A rule has three parts:nextWaypoint service is received and the waypointID value is "WP10":<trigger name="nextWaypoint"> <data name="waypointID" value="WP10" /> </trigger>It is not mandatory to declare all the datas in the Service. You may even not declare any data at all, in that case it will mean that the rule will be triggered each time the service is received. For example, this declaration for the same service is valid:
<trigger name="nextWaypoint"/>Note that if you want to use more elaborate conditions for data values in the service to be triggered, you can define them in the conditions.
dataStruct element declares that the data you specify is a structure and that you look for something inside this structuredataArray element declares that the data you specify is an array and that you look for something inside this arrayfield element declares a field in a structureindex element declares an index in an arraymyData data exists and its value is "WP10":<valueTrigger name="myData" value="WP10"/>If you don't specify a value, the trigger will be triggered if the internal data is created. For example:
<valueTrigger name="myData"/>Note that if you want to use more elaborate conditions for internal data values, you can define them in the conditions.
exists: the data existsnotExists: the data does not existequals: the data is equal with a specified valuenotEquals: the data is not equal with a specified valuegreater: the data is greater than a specified valueless: the data is less than a specified valuegreaterOrEqual: the data is greater or equal than a specified valuelessOrEqual: the data is less or equal than a specified valuebetween: the data is between two values<conditions> <equals name="waypointID" value="WP10" /> <equals name="myData" value="true" type="boolean" /> </conditions>
event: an internal data value is setservice: the datas for a provider service are set and the service is invokedcopyService: the content of the service trigger is copied to an output service, and this service is invokedcopyValue: the value of a data of the service trigger is copied to an internal datastartTimer: a timer is started. At the end of the timer a value will be setdataStruct element declares that the data you specify is a structure and that you look for something inside this structuredataArray element declares that the data you specify is an array and that you look for something inside this arrayfield element declares a field in a structureindex element declares an index in an arraymyData:myData already existed before the application of the event, its value will be set to 10myData did not already existed before the application of the event, it will be created and its value will be set to 10<event name="myData" value="10" type="int" />It is possible to use internal datas in:
invokeBlock specifies that the service invocation is blockingcloneService specifies that the service will be cloned prior to the invocation<rules invokeBlock="true" cloneService="true"> <rule> <trigger name="trigger"> <data name="boolData" value="true" /> </trigger> <copyService name="triggeredEvent"/> </rule> </rules>and:
<rules> <rule> <trigger name="trigger"> <data name="boolData" value="true" /> </trigger> <copyService name="triggeredEvent" invokeBlock="true" cloneService="true"/> </rule> </rules>
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence