Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.
SOLVED

.NET API progress callback

vlad_hadzhiyski
5 - Atom

Hello folks,

 

I am using the v11.3 .NET API to run wizards and it`s working fine except the Progress Callback. In the documentation is described that the progress value is between 0 and 1. The problem is that I get random values. 

Sample values:

0
0
0.0625
0.1875

 

 Snippet

Wizard wizard = new Wizard(wizardFilePath);
wizard.ToolProgress += Wizard_ToolProgress;
wizard.Run(RunnableDocument.RunMode.OutOfProcess, wizardParameters, null, jobId);

Snippet

private void Wizard_ToolProgress(object sender, ToolProgressEventArgs e)
        {
            // Progress comming directly from the Alteryx Engine
            if (e.ToolId == -1)
            {
                // update progress
            }
            e.Cancel = false;
        }

 

Am I doing something wrong?

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

I believe it is just telling you the percentage of tools which have completed.

 

It sends an update once a second I believe. So at first, you had none then some and then a few more before it finally completed and exited.

vlad_hadzhiyski
5 - Atom

Thanks for the details.