John,

   I also think it would be great if there will be some option to re-
run killed long-running jobs. It makes the engine more reliable. I'm
playing with ruote at the moment and I already faced this problem.

   Please consider an example:
---
  # encoding: utf-8
  require 'rubygems'
  require 'ruote'
  require 'ruote/storage/fs_storage'

  engine = Ruote::Engine.new(
    Ruote::Worker.new(
      Ruote::FsStorage.new('ruote_stalled')))

  s = engine.register_participant 'sleepy' do |workitem|
      puts 'before'
      #here could be a call to web-service to put workitem in external
task system. So any kind of waitings are possible. If worker is killed
before it successfully sent information, there would be no item in
external task system and it never had a chance for run again.
      sleep 30
      puts "after"
    end

  # registering participants
  if engine.processes.count == 0 then
    puts 'No processes, launching...'
    s.do_not_thread = false
    # defining a process
    pdef = Ruote.process_definition :name => 'test' do
      sequence do
        sleepy
      end
    end
    wfid = engine.launch(pdef)
  else
    wfid = engine.processes[0].wfid
    puts "#{engine.processes.count} processes, waiting (#{wfid}) ..."
  end

  engine.wait_for(wfid)
--------

Run it first time and kill the process. Then run again. Stalled
participant never runs again.
If it's possible, please consider my request.

Best regards, Oleg

-- 
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

Reply via email to