All,
I see what I was doing wrong. I didn't understand that calling
Participant#by_xxxx actually removed the workitem from the context and
that I needed to grab it. Now that I'm doing that, I have other,
simpler problems that have nothing to do with ruote.
FWIW, a more explicit StorageParticipant example might be appropriate.
Wes
On 5/26/10 2:39 PM, Wes Gamble wrote:
All,
Here's the definition for my first workflow:
@pdef = Ruote.process_definition :name => 'test_workflow' do
cursor do
participant 'koached'
participant 'rules_engine'
participant '${to}'
'${message}' == 'STOP' ? _break : rewind
end
end
and the definition of my participants:
#Register the rules_engine
@engine.register_participant 'rules_engine',
Rufus::Decision::Participant,
:table => %{
in:message,out:message
,"Here's a random number between 1 and 15: #{rand(15)}"
}
#Register the participants as participants who store their
workitems in the same storage as the engine
@participants = @engine.register_participant '.+',
Ruote::StorageParticipant
After launch, I print out the workitem, it's participant (destined
for), and the process status of my workflow instance, which are as
follows:
Workitem: {"from"=>"koached", "to"=>"[email protected]",
"dispatched_at"=>"2010-05-26 19:32:38.461265 UTC",
"params"=>{"koached"=>nil}, "message"=>"Welcome to Koached,
[email protected]!!!"}
Destined for: koached
== Ruote::ProcessStatus ==
expressions : 3
0!!20100526-bijejejada :
#<Ruote::Exp::SequenceExpression:0x104eb9fb0>
0_0!!20100526-bijejejada :
#<Ruote::Exp::CursorExpression:0x104eb6658>
0_0_0!!20100526-bijejejada :
#<Ruote::Exp::ParticipantExpression:0x104eb0de8>
errors : 0
I was under the impression that when I launched my workflow that the
first participant would immediately get the workitem, but that doesn't
seem to be the case. Do I need to call "consume" or "fetch" to get
the workitem to belong to 'koached'?
Thanks,
Wes
--
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
--
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