server/test/data/migration/postcreate.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Oct 2009 20:31:13 +0200
branchstable
changeset 3692 54aa8d13aab4
parent 3363 d3736311d0c4
child 4191 01638461d4b0
child 4212 ab6573088b4a
permissions -rw-r--r--
clear eschema caches on schema changes

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