diff -r 1b0dbcf4b214 -r 559cad62c786 schemas/workflow.py --- a/schemas/workflow.py Wed Oct 07 12:38:30 2009 +0200 +++ b/schemas/workflow.py Fri Oct 09 16:39:26 2009 +0200 @@ -92,9 +92,10 @@ """ __specializes_schema__ = True - destination_state = SubjectRelation('State', cardinality='1*', - constraints=[RQLConstraint('S transition_of WF, O state_of WF')], - description=_('destination state for this transition')) + destination_state = SubjectRelation( + 'State', cardinality='1*', + constraints=[RQLConstraint('S transition_of WF, O state_of WF')], + description=_('destination state for this transition')) class WorkflowTransition(BaseTransition): @@ -103,18 +104,23 @@ subworkflow = SubjectRelation('Workflow', cardinality='1*', constraints=[RQLConstraint('S transition_of WF, WF workflow_of ET, O workflow_of ET')]) - subworkflow_exit = SubjectRelation('SubWorkflowExitPoint', cardinality='+1', + # XXX use exit_of and inline it + subworkflow_exit = SubjectRelation('SubWorkflowExitPoint', cardinality='*1', composite='subject') class SubWorkflowExitPoint(EntityType): """define how we get out from a sub-workflow""" - subworkflow_state = SubjectRelation('State', cardinality='1*', - constraints=[RQLConstraint('T subworkflow_exit S, T subworkflow WF, O state_of WF')], - description=_('subworkflow state')) - destination_state = SubjectRelation('State', cardinality='1*', - constraints=[RQLConstraint('T subworkflow_exit S, T transition_of WF, O state_of WF')], - description=_('destination state')) + subworkflow_state = SubjectRelation( + 'State', cardinality='1*', + constraints=[RQLConstraint('T subworkflow_exit S, T subworkflow WF, O state_of WF')], + description=_('subworkflow state')) + destination_state = SubjectRelation( + 'State', cardinality='?*', + constraints=[RQLConstraint('T subworkflow_exit S, T transition_of WF, O state_of WF')], + description=_('destination state. No destination state means that transition ' + 'should go back to the state from which we\'ve entered the ' + 'subworkflow.')) class TrInfo(EntityType):