Map<String, Object> inputData = Maps.newHashMap();
if (rir.inputId != null)
inputData.put("input_id", rir.inputId);
else
inputData.put("input_id", new ObjectId().toHexString());
inputData.put("title", rir.title);
inputData.put("type", rir.type);
inputData.put("creator_user_id", rir.creatorUserId);
inputData.put("configuration", rir.configuration);
inputData.put("created_at", Tools.iso8601());