</obsolescence>
状态未定义(= no value = ISNULL)的对象在默认情况下不视为作废。如果您希望将未定义状态视为过时,请使用以下条件:
<obsolescence _delta="redefine">
<condition><![CDATA[status='inactive' OR ISNULL(status)=1]]></condition>
</obsolescence>
例子
基于对象状况:
<classes><class id="Organization"><properties><obsolescence><condition>
<![CDATA[status = 'inactive']]>
</condition></obsolescence></properties></class><classes>
基于对象状态加上父级的状态(如果存在父级):
<classes><class id="Hypervisor"><properties><obsolescence><condition> <![CDATA[status
= 'obsolete' OR (server_id != 0 AND server_id_obsolescence_flag)]]> </condition>
</obsolescence></properties></class><classes>
状况和延迟的组合:
<classes><class id="Ticket"><properties><obsolescence><condition>
<![CDATA[operational_status='closed' AND (close_date < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 15 MONTH),'%Y-%m-%d 00:00:00') OR (ISNULL(close_date) AND last_update < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 15 MONTH),'%Y-%m-%d 00:00:00')))]]>
</condition></obsolescence></properties></class><classes>