equal
deleted
inserted
replaced
903 'WHERE T eid %(x)s', |
903 'WHERE T eid %(x)s', |
904 {'x': treid, 'expr': expr}, 'x', ask_confirm=False) |
904 {'x': treid, 'expr': expr}, 'x', ask_confirm=False) |
905 if commit: |
905 if commit: |
906 self.commit() |
906 self.commit() |
907 |
907 |
|
908 def cmd_set_state(self, eid, statename, commit=False): |
|
909 self.session.set_pool() # ensure pool is set |
|
910 entity = self.session.eid_rset(eid).get_entity(0, 0) |
|
911 entity.change_state(entity.wf_state(statename).eid) |
|
912 if commit: |
|
913 self.commit() |
|
914 |
908 # EProperty handling ###################################################### |
915 # EProperty handling ###################################################### |
909 |
916 |
910 def cmd_property_value(self, pkey): |
917 def cmd_property_value(self, pkey): |
911 rql = 'Any V WHERE X is EProperty, X pkey %(k)s, X value V' |
918 rql = 'Any V WHERE X is EProperty, X pkey %(k)s, X value V' |
912 rset = self.rqlexec(rql, {'k': pkey}, ask_confirm=False) |
919 rset = self.rqlexec(rql, {'k': pkey}, ask_confirm=False) |