Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

unrelate/1—remove a relation of a related event to a source  event


The unrelate/1 function  removes a relation of a related event to a source  event. The syntax for this function is as follows:

unrelate($EVENT)

unrelate/1 arguments

Argument

Mode

Type

Description

$EVENT

Input

OBJECT

Specifies the event to be unrelated from a source event

Use the unrelate/1 to remove the relation of $EVENT to the source event as specified in the mc_relation_source slot for $EVENT. The relation information is removed from the mc_event_relations slot of the source event. The mc_relation_source slot is not modified.

Note

The rule that unrelates an event could also clear the mc_relation_source slot to clarify the fact that the event is not related anymore. The mc_relation_source slot is not cleared automatically by the unrelate/1 primitive.

unrelate/1 example

This example involves establishing a relation for trouble tickets. If an event results in a trouble ticket being created at the Help Desk, the trouble ticketing system generates a corresponding trouble ticket event that is related to the source event with relation tt_HD.

Definition of the relation:

MC_EVENT_RELATION; type=tt_HD; class=HD_TROUBLE_TICKET; END

When a trouble ticket event is received, the following rule will relate it to its source event:

refine HD_trouble_ticket_relate : HD_TROUBLE_TICKET($E)
{ relate($E); }
END

This rule assumes that the HD_TROUBLE_TICKET event contains the mc_ueid slot of the source event in its mc_relation_source slot. The type of the relation is tt_HD.

In this scenario, the following rule will undo the relation a trouble ticket event has with its source, when the trouble ticket event is not open anymore:

execute HD_trouble_ticket_unrelate : HD_TROUBLE_TICKET($E)
when $E.status != OPEN { unrelate($E); }
END

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*