lib/ruote/part/storage_participant.rb in ruote-2.1.2 vs lib/ruote/part/storage_participant.rb in ruote-2.1.3
- old
+ new
@@ -116,9 +116,15 @@
hwi = fetch_all.first
hwi ? Ruote::Workitem.new(hwi) : nil
end
+ # Clean this participant out completely
+ def purge!
+
+ fetch_all.each { |hwi| @context.storage.delete( hwi ) }
+ end
+
protected
def fetch_all
key = @store_name ? /^wi\_#{@store_name}::/ : nil