Source: THALES ( Thomas Vergnaud)
Technical policies can have configuration parameters, and can manage component
features (i.e. they can intercept them). However, it is not possible to
associate a specific configuration with a given component feature.
Technical policy definitions can specify configuration parameters. In the
following example, technical policy definition watchdog specifies a
configuration parameter for the timeout. It also declares an interface named
watchdog_intf that must be provided by components. The policy calls method
timeout if no activity has been detected on the intercepted component
features for some time.
One can set the value max_delay when declaring such a policy. In the
following, we declare an atomic component named calculation_impl that has
two input ports input1 and input2. It is associated with technical
policy watcher that monitors both ports. Policy watcher triggers an
alert after 2 seconds of inactivity on both ports.
The problem is, it is impossible to set a specific timeout value for each
intercepted port. Thus, one cannot specify that policy watcher shall
trigger an alert after 2 seconds of inactivity on port input1, or 3 seconds
of inactivity on port input2.
Having two separate policies (one for each intercepted port) is not convenient
because the component business code would then have to implement two different
methods timeout (one for each policy).
Technical policy definition should be extended to declare configuration
parameters that apply to particular managed component features. Thus, the
declaration of watchdog may be something like this:
An additional section named featureConf allows the declaration of per-feature configuration parameters.
Technical policy watcher may then be declared as follows:
Here, the policy triggers an alert after 2 seconds of inactivity on input1
(default policy configuration) or after 3 seconds of inactivity on input2
Reported: UCM 1.2 — Tue, 7 Jan 2020 15:17 GMT
Updated: Tue, 7 Jan 2020 15:18 GMT