martin wrote:
    Can you show your code. I do not understand the problem. The assembly interface is synchronous.    
Below is the routine "ReindexDB" that I call from my code to reindex different databases.  So, I have 5 different databases that I call one at a time, hoping the current one finishes before the next reindex starts.  Some of these databases are big and for some reason it calls the next one before the other one is done.  All I want to ensure is how I can check to see if the process is complete before the next one starts.
    Public Sub ReindexDB()
        Dim mySessionOptions As New SessionOptions
        Dim strHostKey As String = ""
        Dim strReindexPath As String = "cd /opt/IBM/JazzTeamServer_" & strJazzVersion & "/server; "
        Dim strTime As DateTime = DateTime.Now
        Dim strNow As String = "MMMM, dddd d, yyyy HH:mm"
        frmMain.lblStatus.Text = strHeader + strStatus + "..."
        frmMain.lblStatus.Refresh()
        If strStatus = strCLMName Then strHostKey = strCLM
        If strStatus = strRTCDevName Then strHostKey = strRTCDev
        If strStatus = strCCM2Name Then strHostKey = strCCM2
        If strStatus = strCCM2DevName Then strHostKey = strCCM2Dev
        With mySessionOptions
            .Protocol = Protocol.Scp
            .HostName = strStatus
            .UserName = strUserName
            .Password = frmMain.txtPassword.Text
            .SshHostKeyFingerprint = strHostKey
        End With
        Using mySession As Session = New Session
            mySessionOptions.AddRawSettings("Shell", "pbrun su - vobadm")
            mySession.Open(mySessionOptions)
            Dim dumpCommand As String = String.Format(strReindexPath + strRunCommand + " >" + strDumpPath + "DB_Reindex/" + strStatus + strLogFile)
            mySession.ExecuteCommand(dumpCommand)
            strAttachment = strLogPath + "DB_Reindex/" + strStatus + strLogFile
        End Using
        frmMain.dgvInfo.Rows.Add(strHeader + strStatus + " @ " + strTime.ToString(strNow))
        frmMain.dgvInfo.Rows.Add(" ")
        For Each line As String In System.IO.File.ReadAllLines(strLogPath + "DB_Reindex/" + strStatus + strLogFile)
            frmMain.dgvInfo.Rows.Add(line)
        Next
        frmMain.dgvInfo.Rows.Add(" ")
        frmMain.dgvInfo.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
        frmMain.dgvInfo.AutoResizeColumns()
    End Sub