schemas/workflow.py
branchstable
changeset 4644 021035b9a7ab
parent 4589 cc3ec1423ead
child 4719 aaed3f813ef8
equal deleted inserted replaced
4643:921737d2e3a8 4644:021035b9a7ab
    95                                                                      _('workflow already have a transition of that name'))])
    95                                                                      _('workflow already have a transition of that name'))])
    96 
    96 
    97 
    97 
    98 class Transition(BaseTransition):
    98 class Transition(BaseTransition):
    99     """use to define a transition from one or multiple states to a destination
    99     """use to define a transition from one or multiple states to a destination
   100     states in workflow's definitions.
   100     states in workflow's definitions. Transition without destination state will
       
   101     go back to the state from which we arrived to the current state.
   101     """
   102     """
   102     __specializes_schema__ = True
   103     __specializes_schema__ = True
   103 
   104 
   104     destination_state = SubjectRelation(
   105     destination_state = SubjectRelation(
   105         'State', cardinality='1*',
   106         'State', cardinality='?*',
   106         constraints=[RQLConstraint('S transition_of WF, O state_of WF',
   107         constraints=[RQLConstraint('S transition_of WF, O state_of WF',
   107                                    msg=_('state and transition don\'t belong the the same workflow'))],
   108                                    msg=_('state and transition don\'t belong the the same workflow'))],
   108         description=_('destination state for this transition'))
   109         description=_('destination state for this transition'))
   109 
   110 
   110 
   111