IWriteMetadataPlugin - OnObjectChangeSendEvent
Sends an event when the object is created or modified.
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 updates to be finished before the background task starts.
|
ForceLegacyDateTime | no | no | yes, no | Indicates whether to consider legacy Datetime format for date type fields or Zulu format. For example, with ForceLegacyDateTime set to no, dateTime is, say, 2023-12-31T23:12:31.789Z, otherwise dateTime is, say, 01/01/2024 01:12:31. |
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
RequiredMetadataparameter
- An
ishchangessection with the original and current values of the changed fields in theRequestedMetadataparameter. This section is omitted if none of theRequestedMetadataparameter's fields have been modified.
<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>
<ishchanges>
<ishchange sequence="2">
<ishfieldchange name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSTOBEREVIEWED</ishfieldchange>
</ishchange>
<ishchange sequence="1">
<ishfieldchange name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSDRAFT</ishfieldchange>
</ishchange>
</ishchanges>
</ishobject>
This plugin will synchronize the language object when it is created or modified. Note the condition on
ISHLevel:
<plugin name="RaiseLanguageSyncUpdateEvent" handler="ObjectChangeSendEvent" ishcondition="ISHLevel='lng'">
<description>Raises an event when 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">yes</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>
<ishchange sequence="2">
<ishfieldchange name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSTOBEREVIEWED</ishfieldchange>
</ishchange>
<ishchange sequence="1">
<ishfieldchange name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSDRAFT</ishfieldchange>
</ishchange>
</ishchanges>
</ishobject>