12 name = String(required=True, indexed=True, internationalizable=True, |
12 name = String(required=True, indexed=True, internationalizable=True, |
13 maxsize=256) |
13 maxsize=256) |
14 description = RichString(fulltextindexed=True, default_format='text/rest', |
14 description = RichString(fulltextindexed=True, default_format='text/rest', |
15 description=_('semantic description of this state')) |
15 description=_('semantic description of this state')) |
16 |
16 |
17 state_of = SubjectRelation('EEType', cardinality='+*', |
17 state_of = SubjectRelation('CWEType', cardinality='+*', |
18 description=_('entity types which may use this state'), |
18 description=_('entity types which may use this state'), |
19 constraints=[RQLConstraint('O final FALSE')]) |
19 constraints=[RQLConstraint('O final FALSE')]) |
20 allowed_transition = SubjectRelation('Transition', cardinality='**', |
20 allowed_transition = SubjectRelation('Transition', cardinality='**', |
21 constraints=[RQLConstraint('S state_of ET, O transition_of ET')], |
21 constraints=[RQLConstraint('S state_of ET, O transition_of ET')], |
22 description=_('allowed transitions from this state')) |
22 description=_('allowed transitions from this state')) |
23 |
23 |
24 initial_state = ObjectRelation('EEType', cardinality='?*', |
24 initial_state = ObjectRelation('CWEType', cardinality='?*', |
25 # S initial_state O, O state_of S |
25 # S initial_state O, O state_of S |
26 constraints=[RQLConstraint('O state_of S')], |
26 constraints=[RQLConstraint('O state_of S')], |
27 description=_('initial state for entities of this type')) |
27 description=_('initial state for entities of this type')) |
28 |
28 |
29 |
29 |
42 'else the transition won\'t be available. ' |
42 'else the transition won\'t be available. ' |
43 'This query may use X and U variables ' |
43 'This query may use X and U variables ' |
44 'that will respectivly represents ' |
44 'that will respectivly represents ' |
45 'the current entity and the current user')) |
45 'the current entity and the current user')) |
46 |
46 |
47 require_group = SubjectRelation('EGroup', cardinality='**', |
47 require_group = SubjectRelation('CWGroup', cardinality='**', |
48 description=_('group in which a user should be to be ' |
48 description=_('group in which a user should be to be ' |
49 'allowed to pass this transition')) |
49 'allowed to pass this transition')) |
50 transition_of = SubjectRelation('EEType', cardinality='+*', |
50 transition_of = SubjectRelation('CWEType', cardinality='+*', |
51 description=_('entity types which may use this transition'), |
51 description=_('entity types which may use this transition'), |
52 constraints=[RQLConstraint('O final FALSE')]) |
52 constraints=[RQLConstraint('O final FALSE')]) |
53 destination_state = SubjectRelation('State', cardinality='?*', |
53 destination_state = SubjectRelation('State', cardinality='?*', |
54 constraints=[RQLConstraint('S transition_of ET, O state_of ET')], |
54 constraints=[RQLConstraint('S transition_of ET, O state_of ET')], |
55 description=_('destination state for this transition')) |
55 description=_('destination state for this transition')) |
99 |
99 |
100 class in_state(UserRelationType): |
100 class in_state(UserRelationType): |
101 """indicate the current state of an entity""" |
101 """indicate the current state of an entity""" |
102 meta = True |
102 meta = True |
103 # not inlined intentionnaly since when using ldap sources, user'state |
103 # not inlined intentionnaly since when using ldap sources, user'state |
104 # has to be stored outside the EUser table |
104 # has to be stored outside the CWUser table |
105 |
105 |
106 # add/delete perms given to managers/users, after what most of the job |
106 # add/delete perms given to managers/users, after what most of the job |
107 # is done by workflow enforcment |
107 # is done by workflow enforcment |
108 |
108 |