Open topic with navigation

# Basic Progress

`ISynchronizeTask` has a member called `TaskStage` that allows you to report progress for the synchronize action. The following example demonstrates basic progress reporting:

       task.TaskStage.Maximum = 20;
       for (int ii = 0; ii < 20; ++ii)
       {
          // Do work
          task.TaskStage.IncrementProgress();
       }

The first line indicates that the maximum “progress” for a stage is 20. This means that when 20 units of progress have been made the task is 100% complete.

The code after that calls `IncrementProgress()` to increment the progress 20 times. If you put this code in the body of the `Synchronize` method you would therefore see progress increase by 5% increments, eventually reaching 100%.

If you knew that the synchronize action would involve retrieving 425 documents (for example) you could set `task.TaskStage.Maximum` to 425 and then call `IncrementProgress()` after processing each document. The connector keeps track of how quickly progress is being made and automatically calculates the remaining time based on this.

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm