I have been working on a sharepoint project for a month now and it seems nothing just works right off the bat even if I go online and copy from someone's implementation.
I read about starting workflows programmatically from this site and I am currently using the following code to start my workflow.
SPListItem item = workflowProperties.Item;
SPWorkflowManager objWorkflowManager = item.Web.Site.WorkflowManager;
SPWorkflowAssociationCollection associatedWorkflows = item.ParentList.WorkflowAssociations;
SPWorkflowAssociation workflow = associatedWorkflows.GetAssociationByName(
//Find the GUID for the workflow association
string strSerializedParams = Utils.Serialize(r, new XmlSerializer(typeof(MyType)));
View Complete Post