public SPWorkflowAssociationInstance CreateWebContentTypeAssociation(SPWorkflowTemplateInstance template, string name, string taskListName, string historyListName) { if (template == null) { throw new JavaScriptException(this.Engine, "Error", "A workflow template must be supplied as the first argument."); } var result = SPWorkflowAssociation.CreateWebContentTypeAssociation(template.SPWorkflowTemplate, name, taskListName, historyListName); return(result == null ? null : new SPWorkflowAssociationInstance(this.Engine.Object.InstancePrototype, result)); }
public int CountWorkflowAssociations(SPWorkflowTemplateInstance template, SPSiteInstance site) { if (template == null) { throw new JavaScriptException(this.Engine, "Error", "An instance of a SPWorkflowTemplate object must be supplied as the first argument."); } if (site == null) { throw new JavaScriptException(this.Engine, "Error", "An instance of a SPSite object must be supplied as the second argument."); } return(m_workflowManager.CountWorkflowAssociations(template.SPWorkflowTemplate, site.Site)); }
public SPWorkflowAssociationInstance CreateWebAssociation(SPWorkflowTemplateInstance template, string name, SPListInstance taskList, SPListInstance historyList) { if (template == null) { throw new JavaScriptException(this.Engine, "Error", "A workflow template must be supplied as the first argument."); } if (taskList == null) { throw new JavaScriptException(this.Engine, "Error", "A task list must be supplied as the third argument."); } if (historyList == null) { throw new JavaScriptException(this.Engine, "Error", "A history list must be supplied as the fourth argument."); } var result = SPWorkflowAssociation.CreateWebAssociation(template.SPWorkflowTemplate, name, taskList.List, historyList.List); return(result == null ? null : new SPWorkflowAssociationInstance(this.Engine.Object.InstancePrototype, result)); }