private void NWFObjectLoader() { using (MemoryStream memoryStream = new MemoryStream()) { NWFXmlDocument.Save(memoryStream); memoryStream.Position = 0; XmlSerializer serializer = new XmlSerializer(typeof(NintexWorkflowDocument)); var externalDoc = (NintexWorkflowDocument)serializer.Deserialize(memoryStream); PluginHelper.NintexWorkflowExternalContext = externalDoc; NintexWorkflowExternalContext = externalDoc; } using (MemoryStream memoryStream = new MemoryStream()) { NWFXmlInternalDocument.Save(memoryStream); memoryStream.Position = 0; XmlSerializer serializer = new XmlSerializer(typeof(ExportedWorkflow), new Type[] { typeof(NWAutoStartCondition) }); var internalDoc = (ExportedWorkflow)serializer.Deserialize(memoryStream); PluginHelper.NintexWorkflowInternalContext = internalDoc; NintexWorkflowInternalContext = internalDoc; } }
/// <summary> /// Workflow Type Site/List /// </summary> public string WorkflowType() { var selectSingleNode = NWFXmlDocument.SelectSingleNode(@"/ExportedWorkflowWithListMetdata/WorkflowType"); if (selectSingleNode != null) { return(selectSingleNode.InnerText); } return(string.Empty); }
/// <summary> /// List Associated with Workflow. /// </summary> public string AssociatedListName() { var selectSingleNode = NWFXmlDocument.SelectSingleNode("/ExportedWorkflowWithListMetdata/ListReferences/ListReference/ListName"); if ( selectSingleNode != null) { return(selectSingleNode.InnerText); } return(string.Empty); }
/// <summary> /// Version of Nintex Workflow the export is from. /// </summary> public int VersionOfNintexWorkflow() { try { var selectSingleNode = NWFXmlDocument.SelectSingleNode("/ExportedWorkflowWithListMetdata/Version"); if (selectSingleNode != null) { return(int.Parse(selectSingleNode.InnerText)); } return(0); } catch { return(0); } }
public XmlNodeList GetNWFNodeListByXPath(String Query) { return(NWFXmlDocument.SelectNodes(Query)); }