Open SanjayDasTezpur opened 2 years ago
` public void executeStoredProc(Item item) {
CosmosStoredProcedureRequestOptions options = new CosmosStoredProcedureRequestOptions(); options.setIfMatchETag(item.getEtag()); options.setPartitionKey(new PartitionKey(partitionKey)); List<Object> params = Arrays.asList(new ObjectMapper().writeValueAsString(item)); try { CosmosStoredProcedureResponse executeResponse = container.getScripts() .getStoredProcedure(updateInvstStoredProcId) .execute(params, options); if (null != executeResponse) { return executeResponse.getResponseAsString(); } } catch (Exception e) { log.error(e); }
} `
if the etag is mismatched, still executes the store proc successfully
` public void executeStoredProc(Item item) {
} `