[REGRESSION 6x - 7x]Behavior Policies - Action when moving a document

cancel
Showing results for 
Search instead for 
Did you mean: 
jleman
Member II

[REGRESSION 6x - 7x]Behavior Policies - Action when moving a document

EDIT : After testing, this seems to be a regression between 6.x and 7.x (6.2 => 7.3)

 

Hello !

I have an issue on a Policy I try to create to detect and perform actions when a document is moved.

I have already implemented it for folders : 

        eventManager.bindClassBehaviour(
            NodeServicePolicies.OnMoveNodePolicy.QNAME,
            ContentModel.TYPE_FOLDER,
            new JavaBehaviour(
                this, "onMoveFolder",
                NotificationFrequency.TRANSACTION_COMMIT
            )
        );
And that is perfectly working, detecting well the changes. But for document I am unable to execute the exact same operation : 
        eventManager.bindClassBehaviour(
            NodeServicePolicies.OnMoveNodePolicy.QNAME,
            ContentModel.TYPE_CONTENT,
            new JavaBehaviour(
                this, "onMoveDocument",
                NotificationFrequency.TRANSACTION_COMMIT
            )
        );
It never calls onMoveDocument.
 
I also tried to replace "ContentModel.TYPE_CONTENT" by "ContentModel.TYPE_BASE" or by "this" and to try the 3 available "NotificationFrequency" values but nothing works (except it triggers on folders when I change the values to be less restrictive).
 
Does someone have an idea ?
 
Thank you !