def update(workitem)

      r = @context.storage.put(workitem.to_h, :update_rev => true)

      r.is_a?(Hash) ? Ruote::Workitem.new(r) : r
    end
def update(workitem)

      r = @context.storage.put(workitem.to_h, :update_rev => true)

      r.is_a?(Hash) ? Ruote::Workitem.new(r) : r
    end
Used by client code when "saving" a workitem (fields may have changed).
 Calling #update won't proceed the workitem.

 Returns nil in case of success, true if the workitem is already gone and
 the newer version of the workitem if the workitem changed in the mean
 time.