Revisions of Slots

Hello,

Is there any specific way to find out the previous revision relationships (that have been added to a slot) of a content item?

Long story short, when ever a user saves a content item, I would like to check the items in the slot, compare them to the previous revision’s slot and find out which items have been added or deleted from the slot.

Regards
Ravi

The API can do this (by specifying the parent revision in the PSRelationshipFilter), but I don’t believe that we have any “user interface” that exposes this. Maybe somebody else can think of someplace we expose this.

Dave

What do you mean by Save, is it clicking on the update button on the Editor or Check in the item in the CX/AA.
Slot relationships can be changed without even opening the editor (AA Table Editor/AA). The item gets saved automatically each time you change the slot items.

By save I mean, when a user saves a content item. I will look into PSRelationshipFilter as this might help us.

How can we capture the event when Slot relationships are changed without even opening the editor (AA Table Editor/AA). Can we trigger any extension for that action?

Ravi

Ravi,

When relationships are changed, any “Effects” registered for that relationship type are run.

You can create and register new extensions that implement the IPSEffect interface.

The effect can be triggered in a number of different circumstances, including when the item is updated or transitioned in the workflow.

Unfortunately, Effects were part of the old 5.x API, and they use the IPSRequestContext, not the Java Services API. This makes them a little hard to deal with unless you understand how the older API works.

You have to be careful in your code to detect that something is actually changed, and to exit immediately if you don’t detect any change (otherwise your effect will have negative performance implications). Most of the calls to your effect will happen for reasons unrelated to any change in the relationships.