Skip to content

Instantly share code, notes, and snippets.

@ypz
ypz / gist:7459621
Created November 14, 2013 01:20
test pdef for repeat loop
#!/usr/bin/env ruby
require 'ruote'
class Alpha < ::Ruote::Participant
def on_workitem
n = workitem.fields["iteration"].nil? ? 1 : workitem.fields["iteration"] + 1
workitem.set_field("iteration", n)
workitem.set_field("completed", true) if n >= 10
@ypz
ypz / ack.rb
Created September 18, 2013 19:09
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'ruote'
require 'ruote/storage/fs_storage'
require 'pp'
abort("Usage: ack.rb <wfid>") if ARGV[0].nil?
wfid = ARGV[0]
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'ruote'
require 'ruote/storage/fs_storage'
@ruote = Ruote::Dashboard.new(Ruote::Worker.new(Ruote::FsStorage.new("/tmp/ruote_storage")))
class Alpha < ::Ruote::Participant