Returns Workflow definitions of the specified folder
Visual Basic (declaration) |
---|
Public Function GetFolderFlows( _ |
C# (declaration) |
---|
public XmlNode GetFolderFlows( |
<response success="true" error="">
<FlowDefs>
<FlowDef FlowDefID="1003" FlowName="Standard Approval" RequiresStartUpPlayers="false"/>
</FlowDefs>
</response>
Visual Basic Example |
---|
Public Sub GetFolderFlows() Const IRAuthenticationTicket As String = "sid-XXXXXXXXXXX" Const IR_FolderPath As String = "/Public" Const IR_IncludeInheritedFlows As Boolean = True Dim IRWebService As srv Try IRWebService = New srv() Dim xmlResponse As XmlNode = IRWebService.GetFolderFlows(IRAuthenticationTicket, IR_FolderPath, IR_IncludeInheritedFlows) If xmlResponse IsNot Nothing Then If xmlResponse.Attributes("success").Value = "true" Then If xmlResponse.ChildNodes.Count > 0 Then Dim rootNode As XmlNode = xmlResponse.ChildNodes(0) If rootNode IsNot Nothing Then For Each child As XmlNode In rootNode.ChildNodes Dim flowName As String = child.Attributes("FlowName").Value Dim flowDefId As String = child.Attributes("FlowDefID").Value Dim requiresStartupUsers As String = child.Attributes("RequiresStartUpPlayers").Value Next End If End If End If End If Catch ex As Exception Console.WriteLine("error:" & ex.Message) 'rethrow exception Throw Finally IRWebService = Nothing End Try End Sub |
C# Example |
---|
public void GetFolderFlows() { const string IRAuthenticationTicket = "sid-XXXXXXXXXXX"; const string IR_FolderPath = "/Public"; const bool IR_IncludeInheritedFlows = true; srv IRWebService; try { IRWebService = new srv(); XmlNode xmlResponse = IRWebService.GetFolderFlows(IRAuthenticationTicket, IR_FolderPath,IR_IncludeInheritedFlows); if( xmlResponse != null ) { if (xmlResponse.Attributes["success"].Value == "true") { if (xmlResponse.ChildNodes.Count > 0) { XmlNode rootNode = xmlResponse.ChildNodes[0]; if (rootNode != null) { foreach (XmlNode child in rootNode.ChildNodes) { string flowName = child.Attributes["FlowName"].Value; string flowDefId = child.Attributes["FlowDefID"].Value; string requiresStartupUsers = child.Attributes["RequiresStartUpPlayers"].Value; } } } } } } catch (Exception ex) { Console.WriteLine("error:" + ex.Message); //rethrow exception throw; } finally { IRWebService = null; } } |