cancel
Showing results for 
Search instead for 
Did you mean: 

Disable a behaviour

rascio
Champ in-the-making
Champ in-the-making
Hi,
i've a problem on Alfresco Enterprise 3.1, i need to stop a Behaviour that modify a node while i'm working on it. I tried to use the BehaviourFilterImpl but it seems do nothing. I use it in this way:

BehaviourFilterImpl bfi = new BehaviourFilterImpl();
bfi.setDictionaryService(dictionaryService);
bfi.setTenantService(tenantService);
bfi.disableBehaviour(ContentModel.TYPE_CONTENT, myNodeRef);
the 'dictionaryService' and the 'tenantService' are injected by spring.
I'm doing something wrong? It is a bug? Can someone help me?

Thanks for answers….
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
I suspect that the problem is that you are updating the wrong instance of the "BehaviourFilter".

You should be injecting your "behaviourFilter" rather than creating a new one.    If you use Alfresco as an example it uses the spring bean named "policyBehaviourFilter".

rascio
Champ in-the-making
Champ in-the-making
ok, than now i'm trying to inject the policyBehaviourFilter instead of create it.
Thanks a lot for the rapid answer!