Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
is it possible to sleep in the participants?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jordi  
View profile  
 More options Aug 2 2012, 3:38 am
From: jordi <jcar...@mdsol.com>
Date: Thu, 2 Aug 2012 00:38:31 -0700 (PDT)
Local: Thurs, Aug 2 2012 3:38 am
Subject: is it possible to sleep in the participants?

I have ruote working with one worker in an independent process using
 RuoteKit.run_worker Ruote::Sequel::Storage.new(db_settings)

It seems to be working fine in most of my tests.

I am trying to write some tests, to emulate an participant that takes time
to finish, I have the following test participant:

class SlowActivity
  include Ruote::LocalParticipant

  def consume(workitem)
    sleep 50
  end

  def on_cancel
    # empty
  end
end

The problem is that the workflow with this participant will get stuck on
this participant forever (I launched 20 minutes ago), I have tested the
current participant with  engine.process and through RuoteKit.

Any light on what may be the problem here?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Mettraux  
View profile  
 More options Aug 2 2012, 3:41 am
From: John Mettraux <jmettr...@gmail.com>
Date: Thu, 2 Aug 2012 16:41:25 +0900
Local: Thurs, Aug 2 2012 3:41 am
Subject: Re: [ruote:3739] is it possible to sleep in the participants?

On Thu, Aug 02, 2012 at 12:38:31AM -0700, jordi wrote:

> The problem is that the workflow with this participant will get stuck on
> this participant forever (I launched 20 minutes ago), I have tested the
> current participant with  engine.process and through RuoteKit.

> Any light on what may be the problem here?

Hello Jordi,

your participant never replies to the engine. It should read:

  def on_workitem
    sleep 50
    reply
  end

or

  def consume(workitem)
    sleep 50
    reply_to_engine(workitem)
  end

Best regards,

--
John Mettraux - http://lambda.io/jmettraux


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jordi  
View profile  
 More options Aug 2 2012, 4:03 am
From: jordi <jcar...@mdsol.com>
Date: Thu, 2 Aug 2012 01:03:41 -0700 (PDT)
Local: Thurs, Aug 2 2012 4:03 am
Subject: Re: [ruote:3739] is it possible to sleep in the participants?

Thank you!
You are absolutely right. It works now.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »