Returns Workflow definitions of the specified folder

Syntax

Visual Basic (declaration)
Public Function GetFolderFlows( _ 
ByVal AuthenticationTicket as String, _ ByVal Path as String, _ ByVal IncludeInheritedFlows as boolean) as XmlNode

C# (declaration)
public XmlNode GetFolderFlows( 
string AuthenticationTicket, String Path, boolean IncludeInheritedFlows)

Parameters

AuthenticationTicket
    string infoRouter ticket
Path
    String The path of the folder
IncludeInheritedFlows
    boolean If the parameters set to the True all flows to be retrived that applies to this folder.

Return Value

returns xml fragment.
<response success="true" error="">
if success = "true", the function returns the <FlowDefs> subnode.
if success = "false", the error attribute returns the error description.


<response success="true" error="">
    <FlowDefs>
        <FlowDef FlowDefID="1003" FlowName="Standard Approval" RequiresStartUpPlayers="false"/>
    </FlowDefs>
</response>

Remarks


minus gif Example

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;
            }

        }

See Also