IDeleteMetadataPlugin - OnObjectDeleteSendEvent
Sends an event if the object is about to be deleted.
Plugin Configuration
The following workset fields need to be configured:
| Fields |
|---|
The names and levels of the fields specified in the RequestedMetadata parameter |
The following parameters can be configured:
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
EventType | yes | none | The event type indicates which handler executes the background task. The value must match the event type of the handler specified in the Background Task Configuration XML. | |
RequestedMetadata | no | none | an ishFields metadata XML structure | Defines the names and levels of the fields to pass as additional metadata of the event. |
SetHashId | no | yes | yes, no | When creating a background task, you can provide a HashId. Whenever the background task service picks up tasks, it will check if there are tasks with the same HashId. If there are tasks with the same HashId, it will only execute the last task and skip all the previous ones. The parameter SetHashId can be used to indicate if you want to set a HashId or not. |
WaitTime | no | 00:00:10 | a timespan | A time span indicating how long the background task service should wait before picking up this event. This allows synchronous actions to be finished before the background task starts.
|
Event data
The event data XML sent with the event contains:
- An
ishfieldssection with the current field values.VERSION,DOC-LANGUAGEandFRESOLUTIONare sent by default if their values are available.- Fields provided in the
RequestedMetadataparameter
<ishobject ishref="GUID-9CE31359-BBB9-41D6-9848-E2E3874D4AF1" ishtype="ISHModule" ishlogicalref="253985" ishversionref="253986" ishlngref="253987">
<ishfields>
<ishfield name="FTITLE" level="logical">Introduction</ishfield>
<ishfield name="DOC-LANGUAGE" level="lng">en</ishfield>
<ishfield name="VERSION" level="version">1</ishfield>
<ishfield name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSTOBEREVIEWED</ishfield>
</ishfields>
</ishobject>
This plugin will synchronize the language object if the language object itself is deleted. Note the condition on
ISHLevel and OriginalLevel :
<plugin name="RaiseLanguageSyncDeleteEvent" handler="OnObjectDeleteSendEvent" ishcondition="ISHLevel='lng' and OriginalLevel='lng'">
<description>Raises an event if the language object is created or modified</description>
<workingset>
<ishfields>
<ishfield name="FTITLE" level="logical" />
<ishfield name="VERSION" level="version" />
<ishfield name="DOC-LANGUAGE" level="lng" />
<ishfield name="FRESOLUTION" level="lng" />
<ishfield name="FSTATUS" level="lng"/>
</ishfields>
</workingset>
<initialize>
<parameters>
<parameter name="EventType">SYNCHRONIZELANGUAGEOBJECT</parameter>
<parameter name="RequestedMetadata">
<ishfields>
<ishfield name="FTITLE" level="logical" />
<ishfield name="VERSION" level="version" />
<ishfield name="DOC-LANGUAGE" level="lng" />
<ishfield name="FRESOLUTION" level="lng" />
<ishfield name="FSTATUS" level="lng"/>
</ishfields>
</parameter>
<parameter name="SetHashId">no</parameter>
<parameter name="WaitTime">00:05:00</parameter>
</parameters>
</initialize>
</plugin>The event data looks like this:
<ishobject ishref="GUID-9CE31359-BBB9-41D6-9848-E2E3874D4AF1" ishtype="ISHModule" ishlngref="253987">
<ishfields>
<ishfield name="FTITLE" level="logical">Introduction</ishfield>
<ishfield name="VERSION" level="version">1</ishfield>
<ishfield name="DOC-LANGUAGE" level="lng">en</ishfield>
<ishfield name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSTOBEREVIEWED</ishfield>
</ishfields>
<ishchanges>
</ishobject>