BackgroundTaskHandler failing while extracting the ISHFields from Out-Of-Box Implementation (BlobSendEvent)

Team,

I am suppose to trigger BackgroundTask on any action on the Tridion 14 SP1 WebClient. 

Here is my configuration of WritePlugin triggering BackGroundTask

WritePlugin Configuration:

<codeblock>

<plugin name="DellPubObjectRecordEdit" handler="BlobSendEvent" ishcondition="CurrentAction in ('Create', 'Update', 'Checkin','SetMetadata','CheckOut','UndoCheckOut')">
<description>Write Plugin Extracting the form properties information on the following set of events on Topics, Map and Libraries</description>
<workingset>
<ishfields>
<ishfield name="FTITLE" level="logical"/>
</ishfields>
</workingset>
<initialize>
<parameters>
<parameter name="EventType">MetaDataExportTask</parameter>
<parameter name="RequestedMetadata">
<ishfields>
<ishfield name="FTITLE" level="logical"/>
</ishfields>
</parameter>
</parameters>
</initialize>
</plugin>

</codeblock>

MetaDataExportTask is getting triggered for only on Create Events but not on any other actions. Also In Create actions, Background Task is getting failed throwing error

Event handling MetaDataExportTask failed with: A method call is invalid for the object's current state: Too many exports for handler MetaDataExportTask

Here is the BackgroundTask Connfiguration:


<handler eventType="MetaDataExportTask">
<scheduler executeSynchronously="false" />
<authorization type="authenticationContext" />
<execution timeout="01:00:00" recoveryGracePeriod="00:10:00" isolationLevel="None" useSingleThreadApartment="false" />
<activator>
<net name="MetaDataExportTask">
<parameters>
<parameter name="action">MetaDataExportTask</parameter>
<parameter name="description">Custom Plugin exporting the Object Type Meta data to Physical Storage System</parameter>
<parameter name="service_base_url">wmsvc-sha2-windows-2n12li2/.../</parameter>
<parameter name="requestedmetadata">
<ishfields>
<ishfield name="FTITLE" level="logical" />
</ishfields>
</parameter>
</parameters>
</net>
</activator>
<errorHandler maximumRetries="10">
<actions>
<!-- Retry on connection failures to the external system -->
<add errorNumber="-111001" action="Retry" delay="00:10:00" />
<!-- Retry on integration failures to the external system -->
<add errorNumber="-111002" action="Retry" delay="00:10:00" />
</actions>
</errorHandler>
</handler>

I am not sure where i am going wrong. It would be really helpful if anyone can help me out what i am doing wrong here and where i am going wrong. 

  • Dear SDL CMS Support,

    The IWritePlugin handler 'BlobSendEvent' is a handler implementing the IWriteMetadataAndBlobPlugin interface. This means that it only gets triggered in the business code if the blob is submitted with the action that is called.
    This might explain while only the Create action is triggering you event and not any of the other actions as the SetMetadata action is not containing the blob and hence not matching the criteria to trigger the plugin execution.

    Out of the box there is not generic SendEvent available which can be configured to enable registring the background task request on all you defined actions.
    You can how ever implement your own IWritePlugin which will match this requirement and enable you to trigger the MetadataExportTask for any combincation of actions you need.

    Information on how to write an IWritePlugin can be found on the following section of your documentation portal:
    - https://docs.sdl.com/796504/743522/sdl-tridion-docs-14-sp2/write-plugins (IWritePlugin information)
    - https://docs.sdl.com/796504/787966/sdl-tridion-docs-14-sp2/custom-plugins-and-extensions (Creating new extensions)



    The most plausible reason why the MetadataExportTask is failing with the error message

    Event handling MetaDataExportTask failed with: A method call is invalid for the object's current state: Too many exports for handler MetaDataExportTask

    is that the export name is not unique across the DLLs and/or class you provided in the plugins folder on the server.
    The SDL Tridion Docs framework will open each and every dll file in the plugins folder and aggregate from them the list of now Export names.

    These export names need to be unique on all the different classes, across the different interfaces that they implement.

    So you can not have the same export name on a class implementing the IBackgroundTaskHandler and another class implementing the IWriteMetadataPlugin interface.
    The export name also needs to be unique across the different DLLs available in the plugins folder. So please check that you do not have a backup copy of you DLL in the plugins folder as this will cause the duplication of the export name and conflict with the uniqueness constraint.

    Kind Regards,

    Raf