Hi all
Consider this example:
*
engine.register_participant :agent do |workitem|
puts 'Executing --> ' + workitem.params['task']
raise "ERROR" if workitem.params['task'] == 'fail'
end
engine.variables['handle_issue'] = Ruote.process_definition :name =>
'handle_issue' do
sequence do
agent :task => 'handle_issue'
end
end
engine.variables['delete'] = Ruote.process_definition :name => 'delete',
:on_cancel => 'handle_issue', :on_error => 'cancel' do
sequence do
agent :task => 'delete1'
agent :task => 'delete2'
end
end
engine.variables['create'] = Ruote.process_definition :name => 'create',
:on_cancel => 'handle_issue', :on_error => 'cancel' do
sequence do
agent :task => 'create1'
agent :task => 'fail'
agent :task => 'create2'
end
end
pdef=Ruote.process_definition :name => 'goforit', :on_cancel =>
'handle_issue', :on_error => 'cancel' do
cursor do
agent :task => 'start'
delete
create
agent :task => 'finish'
end
end
*
The code above executes well when having to call the subprocesses (delete
and create) via the engine_variables, as stated in the doc.
Now I'm trying to put error handling in a "common" subprocess so I try to
use a subprocess invocation in the *on_error* attribute.
And it does not work as I should see the task *handle_issue* in the output,
which is not the case.
Is it possible to do so or do I have to use the define 'handle_issue' in
all processes and subprocesses?
tx in advance
--
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