ConnectorLib C++ 25.2
ConnectorLib C++ SDK Programming Guide

# Basic Progress

`FetchTask` has a function called `taskStage()` that allows you to report progress for the synchronize action. The following example demonstrates basic progress reporting:

       task.taskStage().setMaximum(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 call `task.taskStage().setMaximum(425)` and then call `incrementProgress()`. The connector keeps track of how quickly progress is being made and automatically calculates the remaining time based on this.

Copyright 2025 Open Text
Version 25.2 | Last updated April 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery ConnectorLib C++ 25.2

Topic Title: Basic Progress