1

I have a XSL file that sets property parameters and when uploaded and closed the WF reads the props and triggers (so WF works and parameters are OK)

I want the WF to trigger the event and continue to use the XSL file without the need to close.

My WF code below reads the Properties for Name, Projectname, Brand and Email1 properties. This only triggers when i have closed the file.... But i want to keep the file open AND trigger the WF. I guess the Start Options only apply when the file is closed and the edit is unlocked....

Maybe? Is there a way to trigger a manual start within the WF code????

If Current Item:Name contains Governance
and Current Item:Projectname does not contain EXAMPLE ONLY

If Current Item:Brand contains Convenient
and Current Item:Email1 equals 1
and value equals value
    Email Current Item:Created By

1 Answer 1

0

The below code will help you to manually start a workflow in Sharepoint

SPWorkflowManager wfManager = currentItem.Web.Site.WorkflowManager;

SPWorkflowAssociationCollection wfAssociation=
currentItem.ParentList.WorkflowAssociations;


foreach (SPWorkflowAssociation Association in wfAssociation)
{
  if (Association.Name == "WorkflowName")
  {
    wfManager.StartWorkflow(currentItem, Association,Association.AssociationData);break;
}
}

Ref : How to start your Workflow manually in Sharepoint?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.