Hi, Delete activity could be used to delete a node. Could you try using with only delete node and xpath having a integer. If that is working then you could work on with looping.
What do you mean by: "delete node and xpath having a integer" ??
Could you give an example?
Hi, I mean use the integer to select the <offers> which need to be deleted i.e. "v1:BodyMsgRespose/v1:Offers". Do not use with looping variable. If this works then the issue might be with the way of looping implementation.
ok, the solution is to do not use looping.
instead of this just simple DELETE action with:
It seems you already found your answer. This reminds me to something I found out a few years ago in 11g already.
There are two issues here:
- Although the Index variable is the result of a count/increment over list elements, OSB does not make it explicit that it's an integer variable:https://blog.darwin-it.nl/2014/03/osb-11g-for-each-is-index-variable.html
- When using the loop index variable for a Insert or Replace, you get a variable-scoping error: https://blog.darwin-it.nl/2015/07/osb11g-what-is-scope-of-for-each-loop.html . This might be also a problem with Delete (although I didn't try this to this day). I solved it by copying the Elements to a new variable. In your case, if you want looping, instead of deleting you can turn it around and only copy the list elements to keep to a new variable.
I don't know what validation error you're getting, but it could be one of the above mentioned issues.