Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extract Infopath xml from workflow tasks

17 views
Skip to first unread message

blevitt

unread,
Jun 16, 2009, 2:03:01 PM6/16/09
to
We have some infopath workflow forms associated to task items in sharepoint.
Unlike a form xml document associated to a document library, workflow task
data is stored in fields on the task or in an ExtendedProperty field. Using
an instance of the XmlFormView control and borrowing some ideas from the
WrkTaskIP.aspx page, I have been able to retrieve this data from the
XmlFormView by using:

XmlFormControl.XmlForm.DataSources[""].CreateNavigator();

However I can't help wondering if there is a better way? Loading a web
control to do this only to get the data out and throw the control away seems
like an indirect root.

spconsultant

unread,
Jun 18, 2009, 12:59:26 PM6/18/09
to
use the XML methods, then selct the information from the needed notes
(Select SIngle Node)

myListItem = workflowProperties.Item
myFormStream = myListItem.File.OpenBinaryStream
myXMLFormDocument = New XmlDocument
myXMLFormDocument.PreserveWhitespace = True
myXMLFormDocument.Load(myFormStream)

blevitt

unread,
Jun 18, 2009, 1:33:01 PM6/18/09
to
the 'File' property is null.

this is what the WrkTaskIPPage class does...

string workflowData = SPWorkflowTask.GetWorkflowData(this.m_task);
if (!string.IsNullOrEmpty(workflowData) &&
(IPPage.FindDataObject(this.XmlFormControl.XmlForm.DataSources,
"ItemMetadata") != null))
{

IPPage.PopulateDataObject(this.XmlFormControl.XmlForm.DataSources["ItemMetadata"], workflowData);
}

After the XmlFormControl is bound and goes thru it's lifecycle, the
recognizable xml data is the available thru...
XmlFormControl.XmlForm.DataSources[""].CreateNavigator();

However, in order to get this data, I'm wrapping the XmlFormView control in
a web service and overriding the render method which is less than ideal.

0 new messages