On Wed, Jul 21, 2010 at 11:31:25AM -0700, I. E. Smith-Heisters wrote: > > I have a process wherein a user performed a task incorrectly, and I > need to send the process back several steps so that the user can redo > their job. > > I've seen mention in a few places (eg. > http://ruote.rubyforge.org/process_administration.html > and > http://groups.google.com/group/openwferu-users/search?group=openwferu-users&q=re_apply&qt_g=Search+this+group) > of rewinding a process using re_apply. Unfortunately I can't quite > figure out how to do it. > > I have the fei I want to rewind to: > > > hh = > > Workflow.engine.context.history.by_process("20100721-bepuhoyoni").detect{|h|Ruote.lookup(h, > > "workitem.fields.params.task")} > > hh["workitem"]["fei"] > => {"sub_wfid"=>"01040310107000", "wfid"=>"20100721-bepuhoyoni", > "engine_id"=>"engine", "expid"=>"0_0_0_0"} > > Of course, one can't fetch the FlowExpression because the expressions > storage only stores current expressions: > > > exp = Ruote::Exp::FlowExpression.fetch(Workflow.engine.context, > > hh["workitem"]["fei"]) > => nil > > And trying to re_apply does nothing: > > > Workflow.engine.re_apply(Ruote::FlowExpressionId.new(hh["workitem"]["fei"])) > => nil > > But I'm not even sure that's the right way to go about it.
Hello Ian, I've tried to cook up a decent re_apply example, less trivial than the one found in the tests : http://github.com/jmettraux/ruote/blob/ruote2.1/test/functional/ft_14_re_apply.rb#L197-221 but I encountered an issue while cooking up : http://gist.github.com/485410 The issue is also present with the current [stable] 2.1.10 gem. Please give me some time to fix that. Thanks, -- John Mettraux - http://jmettraux.wordpress.com -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
