Submits specified document to the specified workflow.

Syntax

Visual Basic (declaration)
Public Function SubmitDocumentToFlow( _ 
ByVal AuthenticationTicket as String, _ ByVal Path as String, _ ByVal FlowDefID as String) as XmlNode

C# (declaration)
public XmlNode SubmitDocumentToFlow( 
string AuthenticationTicket, string Path, string FlowDefID)

Parameters

AuthenticationTicket
    string infoRouter ticket
Path
    string The path of a document
FlowDefID
    string Workflow Definition ID

Return Value

returns xml fragment.
<response success="true" error="">
if success attribute is "true", the document has been submitted to workflow successfully.
if success attribute is "false", the error attribute indicates the encountered error.

Remarks

The caller must have at least "Change" right to the document.

minus gif Example

Visual Basic Example
Public Sub SubmitDocumentToFlow()
    Const  IRAuthenticationTicket As String = "sid-XXXXXXXXXXX"
    Const  IR_FolderPath As String = "/Public/DocumentName"
    Const  IR_FlowDefID As String = "1001"
    
    
    Dim IRWebService As srv
    
    Try
        IRWebService = New srv()
        
        Dim xmlResponse As XmlNode = IRWebService.SubmitDocumentToFlow(IRAuthenticationTicket, IR_FolderPath, IR_FlowDefID)
        
        If xmlResponse IsNot Nothing Then
            If xmlResponse.Attributes("success").Value = "true" Then
                'Document successfully submitted to Flow
            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 SubmitDocumentToFlow()
        {
            const string IRAuthenticationTicket = "sid-XXXXXXXXXXX";
            const string IR_FolderPath = "/Public/DocumentName";
            const string IR_FlowDefID = "1001";
             

            srv IRWebService;

            try
            {
                IRWebService = new srv();

                XmlNode xmlResponse = IRWebService.SubmitDocumentToFlow(IRAuthenticationTicket, IR_FolderPath, IR_FlowDefID);

                if (xmlResponse != null)
                {
                    if (xmlResponse.Attributes["success"].Value == "true")
                    {
                        //Document successfully submitted to Flow
                    }
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine("error:" + ex.Message);
                //rethrow exception
                throw;
            }
            finally
            {
                IRWebService = null;
            }
        }