I have configured a workflow, starts with \"Draft\" state as usual. And I have configured the workflow for standard values of the template. It works perfect in Content edito
I looked all over for a good answer to this. I was creating a new item and wanted to start its workflow. jRobbins's answer didn't work for me because it throws an exception if the current workflow state of the item is null and it didn't offer a good way of setting the initial workflow state.
The following worked for me:
var workflow = Factory.GetDatabase("master").WorkflowProvider.GetWorkflow(workflowId);
workflow.Start(item);
This sets the workflow of my new item plus sets its workflow state to the initial state.