InfoPath Initiation Form

A

Aki

Hi All,

Im working on creating a workflow initiation form for sharepoint . I
have form server 2007 installed and running with which I am browsing
the infopath forms .
my workflow.xml looks like this

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow Id="F487360C-097F-42A2-B417-95F180C23B70"
Name="OR Workflow"
Description="Orange WFs "
CodeBesideClass="OrangeWfs.Workflow1"
CodeBesideAssembly="OrangeWfs,Version=1.0.0.0, Culture=neutral,
PublicKeyToken=5e79cbf3cd5e0489"
InstantiationUrl ="_layouts/InitWf.aspx">
<MetaData>
<Instantiation_FormURN>
urn:schemas-microsoft-com:eek:ffice:infopath:KoreNew:-
myXSD-2007-07-23T08-24-23
</Instantiation_FormURN>
</MetaData>
</Workflow>
</Elements>


and feature.xml looks like this

<?xml version="1.0" encoding="utf-8"?>

<Feature Id="C31B9019-27FE-4BF3-8F44-FF3B189A401A"
Title="Orange Workflows"
Description="Click to ACtivate OS WFs"
Version="1.0.0.0"
Scope="Site"
Hidden="false"
xmlns="http://schemas.microsoft.com/sharepoint/">

<ElementManifests>
<ElementManifest Location="workflow.xml" />
</ElementManifests>
<Properties>
<Property Key="GloballyAvailable" Value="true" />
</Properties>
</Feature >

for the workflow initaition I have created a InitWf.aspx that has a
webpart called xmlformview which hosts the infopath form ( some .xsn
form that has some input fields) . I have also created a class file
of this infopath from using the xsd.exe tool .

my workflow1.cs file looks like this

private void onWorkflowActivated1_Invoked(object sender,
ExternalDataEventArgs e)
{
workflowId = workflowProperties.WorkflowId;

XmlSerializer serializer = new
XmlSerializer(typeof(myFields));
if (workflowProperties.InitiationData != null)
{
XmlTextReader reader = new XmlTextReader(new

System.IO.StringReader(workflowProperties.InitiationData));
myFields initform =
(myFields)serializer.Deserialize(reader);

toname = initform.to;
fromemail = initform.from;
subject = "Test";
}
}

where myFields is the name of the class that was created from the
xsd.exe tool.

I have installed the feature and activated it for a site
colllection . Wen I activate the workflow by checking the box labelled
"Start Workflow when new Item is added " and Associate that to a
particular workflow , the workflow getts actuvated and the Page_Load
of workflow1.cs fires but the InitWf.aspx that I had created did not
even load . What could be the reason for this . At the same time when
I manually trigger the workflow the InitWf.aspx opens up and the
later on the forms gets closed the data I entered is not present in
workflow.InitiationData . It is alawys null for me

Could anyone help me in this regard . Banging my head for a long time

Akhila :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top