hooks/workflow.py
changeset 3629 559cad62c786
parent 3589 a5432f99f2d9
child 3654 e4bed64e0ad7
equal deleted inserted replaced
3590:1b0dbcf4b214 3629:559cad62c786
   240             wftr = forentity.subworkflow_input_transition()
   240             wftr = forentity.subworkflow_input_transition()
   241             if wftr is None:
   241             if wftr is None:
   242                 # inconsistency detected
   242                 # inconsistency detected
   243                 msg = session._("state doesn't belong to entity's current workflow")
   243                 msg = session._("state doesn't belong to entity's current workflow")
   244                 raise ValidationError(entity.eid, {'to_state': msg})
   244                 raise ValidationError(entity.eid, {'to_state': msg})
   245             tostate = wftr.get_exit_point(entity['to_state'])
   245             tostate = wftr.get_exit_point(forentity, entity['to_state'])
   246             if tostate is not None:
   246             if tostate is not None:
   247                 # reached an exit point
   247                 # reached an exit point
   248                 msg = session._('exiting from subworkflow %s')
   248                 msg = session._('exiting from subworkflow %s')
   249                 msg %= session._(forentity.current_workflow.name)
   249                 msg %= session._(forentity.current_workflow.name)
   250                 session.transaction_data[(forentity.eid, 'subwfentrytr')] = True
   250                 session.transaction_data[(forentity.eid, 'subwfentrytr')] = True