I am trying to trigger a WF on an InfoPath form to delete a row from a Repeating Table within the form, when a certain condition is met.
The DeleteSelf() method does not throw any error/Exception, but does not execute as well. When I view the form after the WF completes (no exceptions again), all the rows in the repeating table are still there.
Note: The WF is being manually started, for testing purposes.
Am I missing something here?
Here is the code:
**************************************************************************************************
XmlDocument xml = new XmlDocument();
using (Stream s = workflowProperties.Item.File.OpenBinaryStream())
{
xml.Load(s);
}
XmlNamespaceManager man = new XmlNamespaceManager(xml.NameTable);
man.AddNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
man.AddNamespace("xhtml", "http://www.w3.org/1999/xhtml");
man.AddNamespace("xd", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-02-09T15:29:07");
man.AddNamespace("my", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-02-09T15:29:07");
root = xml.CreateNavigator();
XPathNodeIterator iter = root.Select("/my:myFields/my:grpRequest", man);
int nodesCount = iter.Count;
string app = GetSubstring(workflowProperties.Item["Title"].ToString(), "_", ".xml");
for (int i = 1; i