server/test/data/migration/postcreate.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 25 Sep 2009 11:57:31 +0200
changeset 3484 52e6c8d62ac6
parent 3363 d3736311d0c4
child 4191 01638461d4b0
child 4212 ab6573088b4a
permissions -rw-r--r--
fix some actions selectors

"""cubicweb post creation script, set note's workflow

:organization: Logilab
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""

wf = add_workflow(u'note workflow', 'Note')
todo = wf.add_state(u'todo', initial=True)
done = wf.add_state(u'done')
wf.add_transition(u'redoit', done, todo)
wf.add_transition(u'markasdone', todo, done)
checkpoint()

wf = add_workflow(u'affaire workflow', 'Affaire')
pitetre = wf.add_state(u'pitetre', initial=True)
encours = wf.add_state(u'en cours')
finie = wf.add_state(u'finie')
bennon = wf.add_state(u'ben non')
wf.add_transition(u'abort', pitetre, bennon)
wf.add_transition(u'start', pitetre, encours)
wf.add_transition(u'end', encours, finie)
checkpoint()