WinWf, SharePoint and OnActivated  
Author Message
jmurray_mi





PostPosted: Windows Workflow Foundation, WinWf, SharePoint and OnActivated Top

We have an InfoPath form in SharePoint that is triggering a workflow. When referencing the InfoPath form as such:
private void OnActivated(object sender, ExternalDataEventArgs e)
{
// Read the association and initiation data.
XmlSerializer serializer = new XmlSerializer(typeof(WorkflowStages));
StringReader initReader = new StringReader(this.workflowProperties.InitiationData);
WorkflowStages initiationData = serializer.Deserialize(initReader) as WorkflowStages;
}

everything works fine

if it is instead coded as
public WorkflowStages initiationData;

private void OnActivated(object sender, ExternalDataEventArgs e)
{
// Read the association and initiation data.
XmlSerializer serializer = new XmlSerializer(typeof(WorkflowStages));
StringReader initReader = new StringReader(this.workflowProperties.InitiationData);
initiationData = serializer.Deserialize(initReader) as WorkflowStages;
}

the workflow will always fail. The cast "as WorkflowStages" works acceptably but the workflow fails with errors "Thread was being aborted" and then workflow status is "Failed to Start".

What is preventing me from having a public variable of the results of the InfoPath form vs having a local variable which I manipulate and discard in te OnActivated event Am I doing something improper in the second example

Jesse



Software Development for Windows Vista12  
 
 
Tom Lake





PostPosted: Windows Workflow Foundation, WinWf, SharePoint and OnActivated Top

You question is about Sharepoint's implementation of WF so you question should be directed to on of the newsgroups for Sharepoint questions that can be found at http://www.microsoft.com/office/preview/community/newsgroups.mspx.



 
 
jmurray_mi





PostPosted: Windows Workflow Foundation, WinWf, SharePoint and OnActivated Top

For my information, can you advise if the workflow being used within SharePoint is WinWf or a variant based on WinWf

Jesse


 
 
Tom Lake





PostPosted: Windows Workflow Foundation, WinWf, SharePoint and OnActivated Top

Windows Workflow Foundation (WF) is just that, a foundation. It is the building blocks needed to add workflow to an application, web service or ASP.NET site quickly. SharePoint has used WF for its workflow needs and as every host writer must do have decided how they expose it to the user.