Has anybody come across a situation were an assign activity fails with an
"Exception is thrown because the to-spec at line 113 is evaluated to multiple nodes"
The problem is that an element in a variable appears more than once although it is restricted to maxOccurs="1".
<part name="payload" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
The result element has a maxOccurs="1" in the xsd and the operation in the assign activity is a copy not an append!
The problem is not consistent and happens randomly with the same set of data.
Unfortunately I have the exactly same error. BPEL engine replicates the elements in the bpel variable without any apparent reason.
After restarting the composite this problem disappear and return randomly in the future. I was not able to understand the conditions when the abnormal behavior returns.
Putting the 'index'  in xpath is indeed a workaround, but i ask if someone has solved this situation and understood the situation in depth.
Thanks in advance.
Hi I understand the workaround here (adding  to the to-spec expression) - but what about the extra empty nodes, when we move to the next step in our process will those empty nodes still exist - since our XSD sets that node to maxOcurrs="1" this would cause issues down stream if these empty nodes are carried forward - we are thinking of putting in a XSLT to remove them, but wanted to see if anyone has input on if they will be carried forward - since this is a random issue ware not able to reproduce it in our dev/test environment, it seems to only happen in our Production environment.