Support Temporal Values
A web service connector can support Policy Modeling attributes with temporal values (different values at different points in time). The date when the value changes is called a 'change point'. Accordingly, in both Load and Save actions, a field can be set to different values at different points in time by using change-point elements.
Each change-point needs to be in chronological order by date, and the element representing the new value must be compatible with the field type described in the metadata.
The following example will set the number value of ‘Ticket Price’ to 79.99 prior to 2014/05/04, 100.00 between 2014/05/04 and 2014/06/20, and 140.00 after 2014/06/20.
<field name="Ticket Price">
<number-val>79.99</number-val>
<change-point date="2014-05-04Z">
<number-val>100.00</number-val>
</change-point>
<change-point date="2014-06-20Z">
<number-val>140.00</number-val>
</change-point>
</field>
Note that there are some limitations when using attributes with temporal values in interviews. You should be aware of these limitations when selecting attributes for loading from fields or saving to fields via your web service connector. In particular, do not input-map (Load) an attribute likely to have a temporal value if it is used in the policy modeling project:
- as an input control on an interview screen, or
- to govern the state of an interview screen control. In other words, it is used:
- as a visibility attribute (to govern whether a control on an interview screen is displayed or hidden).
- to govern whether an interview screen control is read-only or enabled
- to govern whether an interview screen control is optional or mandatory.