Thanks for your reply John - response inline below.
On Fri, Jan 20, 2012 at 9:31 AM, John Mettraux <[email protected]> wrote:
>
> > Another issue, which I suspect is related is that a workitem may become
> > "stuck" as I mentioned above. We can often "re-apply" the expression and
> > have it resume. However, sometimes after we "reapply", the "_ruote" web
> > interface will show the expression as "cancelling" and it will just stay
> in
> > that state. Once it shows "cancelling" we cannot reapply, nor kill it.
> > Any suggestions about how to further investigate this problem would be
> > appreciated.
>
> "re-apply" will cancel an expression and its children and once it's done,
> it
> will apply the expression again (with the same tree and workitem or with a
> new tree and/or workitem).
>
> So at its heart "re-apply" uses the cancel mechanism. An expression begin
> re-applied shows as "cancelling" and cannot be further cancelled. Killing
> should go over and place the expression (and its children) in the "dying"
> state.
>
> Is that related to that participant:
>
> On Thu, Dec 15, 2011 at 03:26:28PM -0800, David Powell wrote:
> >
> > We have a simple participant that touches a file, waits 20s, then
> > "rewinds".
>
We have noticed this type of issue with different participants, so does not
seem participant specific. It also occurs with this participant which is
the simplest one so perhaps is the best to focus on for now.
> May I see the code of this participant ?
>
Sure:
module Participant
class FileToucher
include Ruote::LocalParticipant
def initialize(opts = {})
end
def consume(workitem)
@workitem = workitem
FileUtils.touch [File.join(Rails.root, 'public', 'ruote_speed.txt')]
reply_to_engine workitem
rescue => e
Rails.logger.error "Error in FileToucher : #{e}"
end
def cancel(fei, flavour)
# do nothing
end
end
end
>
> What does the expression/tree you're re-applying look like ? Is the
> re-applied expression a parent expression to the call to the participant
> mentioned above ?
>
>
>
The reapply expression :
fields:
{
}
tree:
[
"cursor",
{
},
[
[
"participant",
{
"file_toucher": null
},
[
]
],
[
"wait",
{
"20s": null
},
[
]
],
[
"rewind",
{
},
[
]
]
]
]
An example of /_ruote output:
feiexpidexpappliedstate20111207-bonuhopidi
0<http://staging.jasperdocs.trikeapps.com/_ruote/expressions/0!e09f1e2466873a8e57a6e9410b3d825a!20111207-bonuhopidi>
0define2012/01/19 15:18:5420111207-bonuhopidi
0_0<http://staging.jasperdocs.trikeapps.com/_ruote/expressions/0_0!220b230a1cad6a7ad3cf5ab68edcff04!20111207-bonuhopidi>
0_0cursor2012/01/19 15:18:56cancelling
Thanks again for your help with this.
-- David Powell
--
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