On Thu, Jul 08, 2010 at 08:59:01PM -0700, Don French wrote:
> On Jul 8, 1:43 pm, John Mettraux <[email protected]> wrote:
> > On Thu, Jul 08, 2010 at 12:54:05PM -0700, Don French wrote:
> >
> > > Using this example:
> >
> > > 1 sequence do
> > > 2 participant '${f:patient}'
> > > 3 participant '${f:doctor}'
> > > 4 end
> >
> > > Using patients: 'patient 1', 'patient 2', and physicians - 'physician
> > > 1', and 'physician 2'
> >
> > > I am assuming that I would need to register participants under each of
> > > those names. That seems like a lot of registered participants given a
> > > real world environment. Can you register the participant in the
> > > sequence and then unregister it before the end? What is the
> > > difference in using generic named participants like 'patient' and
> > > 'physician' as opposed to dynamic like above. Is one a better approach
> > > and why?
> >
> > Hello Don,
> >
> > you could go and register participant categories :
> >
> > engine.register_participant 'patient .+', PatientParticipant
> > engine.register_participant 'physician .+', PhysicianParticipant
> >
>
> would not this fill the registered participant table with lots of
> participants that were used once and possibly never again? Or does
> that just register one participant because of the register statement
> and then you get the name inside the actual participant?
Hello,
this only registers 2 participants, one under the regular expression /^patient
.+$/ and the other under /^physician .+$/.
Inside the actual participant, when receiving a workitem, you can do
p workitem.participant_name
# yields something like "patient 1" or "physician 12"
> > ( Ruote::StorageParticipant parenthesis ...
> >
> > For human participants, I tend to use a Ruote::StorageParticipant
> > (basically a kind of workitem [in]box)
> >
> > engine.register_participant 'patient .+', Ruote::StorageParticipant
> > engine.register_participant 'physician .+', Ruote::StorageParticipant
> >
> > I then query it like this
> >
> > sp = Ruote::StorageParticipant.new(engine)
> > patient_wi = sp.by_participant('patient 1')
>
> Where would you use that query? In a generic participant?
Sorry, this was a small digression about Ruote::StorageParticipant.
You would probably use it if you were building a worklist / taskbox / inbox /
workitem list based on Ruote::StorageParticipant. Probably your needs are
different, I was just showing that classical participant.
Best regards,
--
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