schemas/workflow.py
changeset 4589 cc3ec1423ead
parent 4537 aff0f59ed6e3
child 4644 021035b9a7ab
equal deleted inserted replaced
4588:36b700c00d38 4589:cc3ec1423ead
   170         'add':    ('managers', 'users', 'guests',),
   170         'add':    ('managers', 'users', 'guests',),
   171         'delete': (),
   171         'delete': (),
   172     }
   172     }
   173     inlined = True
   173     inlined = True
   174 
   174 
       
   175 
   175 class workflow_of(RelationType):
   176 class workflow_of(RelationType):
   176     """link a workflow to one or more entity type"""
   177     """link a workflow to one or more entity type"""
   177     __permissions__ = META_RTYPE_PERMS
   178     __permissions__ = META_RTYPE_PERMS
   178 
   179 
   179 class state_of(RelationType):
   180 class state_of(RelationType):
   184 class transition_of(RelationType):
   185 class transition_of(RelationType):
   185     """link a transition to one or more workflow"""
   186     """link a transition to one or more workflow"""
   186     __permissions__ = META_RTYPE_PERMS
   187     __permissions__ = META_RTYPE_PERMS
   187     inlined = True
   188     inlined = True
   188 
   189 
   189 class subworkflow(RelationType):
   190 class destination_state(RelationType):
   190     """link a transition to one or more workflow"""
   191     """destination state of a transition"""
   191     __permissions__ = META_RTYPE_PERMS
   192     __permissions__ = META_RTYPE_PERMS
   192     inlined = True
   193     inlined = True
   193 
   194 
   194 class exit_point(RelationType):
   195 class allowed_transition(RelationType):
   195     """link a transition to one or more workflow"""
   196     """allowed transitions from this state"""
   196     __permissions__ = META_RTYPE_PERMS
   197     __permissions__ = META_RTYPE_PERMS
   197 
       
   198 class subworkflow_state(RelationType):
       
   199     """link a transition to one or more workflow"""
       
   200     __permissions__ = META_RTYPE_PERMS
       
   201     inlined = True
       
   202 
   198 
   203 class initial_state(RelationType):
   199 class initial_state(RelationType):
   204     """indicate which state should be used by default when an entity using
   200     """indicate which state should be used by default when an entity using
   205     states is created
   201     states is created
   206     """
   202     """
   207     __permissions__ = META_RTYPE_PERMS
   203     __permissions__ = META_RTYPE_PERMS
   208     inlined = True
   204     inlined = True
   209 
   205 
   210 class destination_state(RelationType):
   206 
   211     """destination state of a transition"""
   207 class subworkflow(RelationType):
   212     __permissions__ = META_RTYPE_PERMS
   208     __permissions__ = META_RTYPE_PERMS
   213     inlined = True
   209     inlined = True
   214 
   210 
   215 class allowed_transition(RelationType):
   211 class exit_point(RelationType):
   216     """allowed transitions from this state"""
   212     __permissions__ = META_RTYPE_PERMS
   217     __permissions__ = META_RTYPE_PERMS
   213 
       
   214 class subworkflow_state(RelationType):
       
   215     __permissions__ = META_RTYPE_PERMS
       
   216     inlined = True
       
   217 
       
   218 
       
   219 class condition(RelationType):
       
   220     __permissions__ = META_RTYPE_PERMS
       
   221 
       
   222 # already defined in base.py
       
   223 # class require_group(RelationType):
       
   224 #     __permissions__ = META_RTYPE_PERMS
   218 
   225 
   219 
   226 
   220 # "abstract" relations, set by WorkflowableEntityType ##########################
   227 # "abstract" relations, set by WorkflowableEntityType ##########################
   221 
   228 
   222 class custom_workflow(RelationType):
   229 class custom_workflow(RelationType):