cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic property constraint

cpepe
Champ in-the-making
Champ in-the-making
Hello,

Quite new to Alfresco… here is my problem.

I have two constraint of type "LIST", so 2 diferrent sets of vaues.

I have to assign one of these 2 constraints to a property. The choice of the constraint depends of the value of an other property in the same model.

So, for example, I have two properties: DIRECTION and STATUS. If the value of DIRECTION =  "IN", the constraint A has to be assigned to STATUS. If DIRECTION = "OUT", the constraint B has to be assigned to status.

How can I model this ? I thought about implementing a new custom constraint, but how do I pass the value of "DIRECTION" as paramater ? Someone spoke me about "rules" but I didn't find information about the relation of a rule and the content model.

If someone can propose me a soluton…. cause I'm a little bit lost.

Thanks a lot
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
So, for example, I have two properties: DIRECTION and STATUS. If the value of DIRECTION = "IN", the constraint A has to be assigned to STATUS. If DIRECTION = "OUT", the constraint B has to be assigned to status.
You can't do this using the constraint supported by the content model of Alfresco.

I suggest you to implement a behaviour to check each time this type of low level constraint:
http://wiki.alfresco.com/wiki/Policy_Component#Binding_Behaviour_to_a_Policy
Hope this helps.