So, what I think you should do is instead generate a series of paramaters in policy_ids (:policyid1 :policyid2, .... ) and then add those params to the paramaters hash that is presently empty in the execute.