Change information from media assets marking PIM objects
This new feature makes a contribution to updating the modification information of the corresponding PIM objects in the Product Manager in time with the change of an image in the Media Manager. This feature allows to export valid deltas of products/items depending on the modification date/time even the assigned image has changed only.
If the user changes an image in the Media Manager (e.g. change any attribute of this image), a corresponding Media Portal workflow will create an entry with the id (PKOM_PNR) of the image in the message queue.
The following picture shows a Media Manager workflow as example: it should contain a watchpoint and an actionpoint.
The watchpoint is event based and reacts on the modification of the dataset of an asset.
The actionpoint creates an entry in the message queue with the id (F_IMGKOMP.PKOM_PNR) from the modified asset.
The next screenshot shows the definition of the notification actionpoint:
A new process (named "Update modification date") of Product Manager works like a listener. It checks the notification queue (with the name "heiler.hmm.backend.event" and the Topic "AssetModified") for new entries. As soon as such a new entry is in the queue, the listener picks it out, reads the “ID” (PKOM_PNR in the Media Portal) and then updates corresponding objects where this ID (PKOM_PNR) is assigned to.
The following table indicates the objects to update.
Object to update |
table in DB |
filed1 to update |
field2 to update |
MediaAssetDocument whose "Id" is assigned |
MediaAssetDocument |
ModificationUserID |
ModificationTimestamp |
mapped media asset |
MediaAssetAuditLog |
ModificationUserID |
ModificationTimestamp |
item(product)-mediaAsset map |
ArticleMediaAssetMap |
ModificationUserID |
ModificationTimestamp |
mapped item(product) |
ArticleAuditLog |
ModificationUserID |
ModificationTimestamp |
structureGroup-mediaAsset map |
StructureGroupMediaAssetMap |
ModificationUserID |
ModificationTimestamp |
mapped structureGroup |
StructureGroupAuditLog |
ModificationUserID |
ModificationTimestamp |
At the moment the users between Media Portal and Product Manager aren't synchronized, because of this reason we take the id of the system user as " ModificationUserID ". Maybe we change this in the fut ure .
And the value of ModificationTimestamp is from the JMS message util the PIM 7.0.02, but since the PIM 7.0.03 it is updated with the current Product Manager system timestamp when the message is processed, in order to avoid a fatal java.lang.IllegalStateException like "Creation date is after the modification date which is not allowed".