server/test/data/migration/postcreate.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 15 Dec 2009 12:24:38 +0100
branchstable
changeset 4121 09622a18501c
parent 3363 d3736311d0c4
child 4191 01638461d4b0
child 4212 ab6573088b4a
permissions -rw-r--r--
backout a75a6e770717, unmeetable condition and introduce a bug with boolean values

"""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()