equal
deleted
inserted
replaced
122 |
122 |
123 if 'initial_state' in wfdef: |
123 if 'initial_state' in wfdef: |
124 wf.cw_set(initial_state=states[wfdef['initial_state']]) |
124 wf.cw_set(initial_state=states[wfdef['initial_state']]) |
125 |
125 |
126 for trname, trdef in wfdef['transitions'].items(): |
126 for trname, trdef in wfdef['transitions'].items(): |
127 tr = (wf.transition_by_name(trname) or |
127 tr = (wf.transition_by_name(trname) |
128 cnx.create_entity('Transition', name=trname)) |
128 or cnx.create_entity('Transition', name=trname)) |
129 tr.cw_set(transition_of=wf) |
129 tr.cw_set(transition_of=wf) |
130 if trdef.get('tostate'): |
130 if trdef.get('tostate'): |
131 tr.cw_set(destination_state=states[trdef['tostate']]) |
131 tr.cw_set(destination_state=states[trdef['tostate']]) |
132 fromstates = get_tuple_or_list(trdef.get('fromstates', ())) |
132 fromstates = get_tuple_or_list(trdef.get('fromstates', ())) |
133 for stname in fromstates: |
133 for stname in fromstates: |