This is in continuation of previous blog where I promised to highlight more on process of relaunching workflows.
When a new version of workflow is republished, the approval task item links get broken for the workflows already started. Instances of the workflows that are started after the workflow is re-published will use the updated custom task edit forms.
Restarting workflow consists of steps to
- Terminate existing workflow – This will also ensure deleting any tasks created for the workflow
- Start new workflow
- Disabling outgoing email alert notifications on Tasks list (if any)
- Our custom workflow utilises a configuration list where sending custom emails on task creation was one of the turn on and turn off kind of parameter.
- [Microsoft.SharePoint.Workflow.SPWorkflowManager]::CancelWorkflow($wf);
- $SPList.Parentweb.site.workflowmanager.startworkflow($item, $WFAssociation, $WFAssociation.AssociationData)
- SPWorkflowManager.RemoveWorkflowFromListItem(SPWorkflow workflow)
- SPWorkflowManager.StartWorkflow(SPListItem item, SPWorkflowAssociation association,string eventData)
No comments:
Post a Comment