public static XmlWorkflowItem start(Context context, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException, WorkflowConfigurationException, MessagingException, WorkflowException {
Item myitem = wsi.getItem();
Collection collection = wsi.getCollection();
Workflow wf = WorkflowFactory.getWorkflow(collection);
XmlWorkflowItem wfi = XmlWorkflowItem.create(context);
wfi.setItem(myitem);
wfi.setCollection(wsi.getCollection());
wfi.setMultipleFiles(wsi.hasMultipleFiles());
wfi.setMultipleTitles(wsi.hasMultipleTitles());
wfi.setPublishedBefore(wsi.isPublishedBefore());
wfi.update();
removeUserItemPolicies(context, myitem, myitem.getSubmitter());
grantSubmitterReadPolicies(context, myitem);
context.turnOffAuthorisationSystem();
Step firstStep = wf.getFirstStep();
if(firstStep.isValidStep(context, wfi)){
activateFirstStep(context, wf, firstStep, wfi);
} else {
//Get our next step, if none is found, archive our item
firstStep = wf.getNextStep(context, wfi, firstStep, ActionResult.OUTCOME_COMPLETE);
if(firstStep == null){
archive(context, wfi);
}else{
activateFirstStep(context, wf, firstStep, wfi);
}