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
The difference between workitem and stored_workitem
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
  6 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
 
ddeng  
View profile  
 More options Jun 19 2012, 2:38 pm
From: ddeng <dengtians...@gmail.com>
Date: Tue, 19 Jun 2012 11:38:13 -0700 (PDT)
Local: Tues, Jun 19 2012 2:38 pm
Subject: The difference between workitem and stored_workitem

Hi, In the ProcessStatus class, there are two methods: workitems and
stored_workitems

What is the difference?


 
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 Jun 19 2012, 2:45 pm
From: John Mettraux <jmettr...@gmail.com>
Date: Wed, 20 Jun 2012 03:45:03 +0900
Local: Tues, Jun 19 2012 2:45 pm
Subject: Re: [ruote:3618] The difference between workitem and stored_workitem

On Tue, Jun 19, 2012 at 11:38:13AM -0700, ddeng wrote:

> In the ProcessStatus class, there are two methods: workitems and
> stored_workitems

> What is the difference?

Hello,

copying the rdoc...

---8<---
  # An array of the workitems currently in the storage participant for this
  # process instance.
  #
  # Do not confuse with #workitems
  #
  attr_reader :stored_workitems

  # Returns a list of the workitems currently 'out' to participants
  #
  # For example, with an instance of
  #
  #   Ruote.process_definition do
  #     concurrence do
  #       alpha :task => 'clean car'
  #       bravo :task => 'sell car'
  #     end
  #   end
  #
  # calling engine.process(wfid).workitems will yield two workitems
  # (alpha and bravo).
  #
  # Warning : do not confuse the workitems here with the workitems held
  # in a storage participant or equivalent.
  #
  def workitems
--->8---

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.
ddeng  
View profile  
 More options Jun 19 2012, 2:49 pm
From: ddeng <dengtians...@gmail.com>
Date: Tue, 19 Jun 2012 11:49:08 -0700 (PDT)
Local: Tues, Jun 19 2012 2:49 pm
Subject: Re: [ruote:3618] The difference between workitem and stored_workitem

I tried this example, but in this case, stored_workitems will also returns
2 wokitems. Doesn't it?


 
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 Jun 19 2012, 2:53 pm
From: John Mettraux <jmettr...@gmail.com>
Date: Wed, 20 Jun 2012 03:53:16 +0900
Local: Tues, Jun 19 2012 2:53 pm
Subject: Re: [ruote:3621] The difference between workitem and stored_workitem

On Tue, Jun 19, 2012 at 11:49:08AM -0700, ddeng wrote:

> I tried this example, but in this case, stored_workitems will also returns
> 2 wokitems. Doesn't it?

What example, what case?

--
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.
ddeng  
View profile  
 More options Jun 19 2012, 3:06 pm
From: ddeng <dengtians...@gmail.com>
Date: Tue, 19 Jun 2012 12:06:36 -0700 (PDT)
Local: Tues, Jun 19 2012 3:06 pm
Subject: Re: [ruote:3621] The difference between workitem and stored_workitem

def test_misc
      pdef = Ruote.process_definition do
         concurrence do
           alpha :task => 'clean car'
           bravo :task => 'sell car'
         end
      end

    @dashboard.register_participant ".+", Ruote::StorageParticipant
    wf...@dashboard.launch(pdef)
    sleep(3)
    puts @dashboard.process(wfid).workitems.inspect
    puts "-----------"
    puts @dashboard.process(wfid).stored_workitems.inspect

  end

I this example, stored_workitems and workitems will both return two
workitems


 
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 Jun 19 2012, 3:12 pm
From: John Mettraux <jmettr...@gmail.com>
Date: Wed, 20 Jun 2012 04:12:38 +0900
Local: Tues, Jun 19 2012 3:12 pm
Subject: Re: [ruote:3623] The difference between workitem and stored_workitem

Yes, since stored_workitems returns all the workitems for the process
instance that are "in the storage participant" and workitems returns all the
workitems that are currently being handled by participants (that include
storage participants).

If you have participants that, for example, dispatch work over AMQP and then
wait for an answer to come, the stored_workitems count will be lesser than
the workitems count (actually the stored_workitems count is always inferior
or equal to the workitems count).

If your participants are all storage participants, then the two counts are
equal.

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.
End of messages
« Back to Discussions « Newer topic     Older topic »