Share point Workflow is not able to read the data from infopath form

Hi,

I am facing issue with share point workflow. I am not able to read the data from Web enabled infopath form into the Share point Custom workflow.

Please find the following steps which I have followed.

1. I have created a Infopath form with four texboxes.
2. I have published it to Document library in Sharepoint Site so that when ever select New on the Form library I will get my infopath in Web browser.
3. When I enter the data and saved into Form Library as a document a Custom work flow will invoke and read the content from InforPath and then it has to call another webservice.

I am getting Null values to when this work flow invokes.

Steps followed for implementing Custom workflow.

1. I have created Class file against Published Infopath form and added to my work flow soultion. Please find the following code i have written.

privatevoid onWorkflowActivated1_Invoked(object sender,ExternalDataEventArgs e)

{

workflowId = workflowProperties.WorkflowId;

// Deserialize the xml data from the InfoPath initiation form.

// The workflow stores the xml into workflowProperties.InitiationData

// The InitForm class (see Opportunity.cs) was generated by .NET tool xsd.exe

// on the IP form's xsd.

XmlSerializer serializer =newXmlSerializer(typeof(Opportunity));

XmlTextReader reader =newXmlTextReader(new System.IO.StringReader(workflowProperties.InitiationData));

Opportunity initform = (Opportunity)serializer.Deserialize(reader);

// initform now contains the data that came from the form. We can store this data into local variables.

OpportunityName = initform.OpportunityName;

OpportunityID = initform.OpportunityID;

CurrencyCode = initform.CurrencyCode;

PRCloseDate =Convert.ToString(initform.PRCloseDate);

//Call the .NET Wrapper to Insert the Data into Siebel

SiebelWorkflow.SiebelWebReference.SiebelWebServices obj =new SiebelWorkflow.SiebelWebReference.SiebelWebServices();

obj.InsertNewOpportunity(OpportunityID, OpportunityName, PRCloseDate, CurrencyCode);

}

2. I have created a Feature.xml and Workflow.xml file and deployed it.

3. I have configured the work flow for above Form Library.

Please correct me where if I made a mistake on this. If possible give me the reference where i can get the solution for similar scenario.

Advanced Thanks,

Venkat

[3535 byte] By [VenkatGurrala] at [2008-1-10]

SharePoint Products and Technologies

Site Classified