{{run.percentComplete}} - is 100% complete 1 or 1.0 or 100?

Options

Through some test runs, I have figured that a run that is 50% complete shows as as 0.5, when using the run.percentComplete global field.
What is the actual value when the run is 100% complete? I am guessing it is 1 ?
What I am using this for, is to check if the bot is stopped or stuck after say 5 minutes. It would then send the user an email.
So I have Field Formulas with
result = run.percent Complete
output field = percent-complete
Then in the conditions of the Send Email task, I have
If fields["percent-complete"] is less than 1
starting after a 5 minute delay
(The percent complete status will only register 100% after the bot has ended, so I would have to start another pushbot and look up the percent complete of a certain runID that I know ran to 100% complete, but I am having trouble finding the syntax for that. So I am just asking here.)
Is 1 correct?
thanks!

Tagged:

Best Answers

Answers

  • Kevin_579059
    Kevin_579059 Posts: 67
    edited May 2020
    Options

    Thank you, Kalin and Dylan!
    I realized percentComplete will not work because it will never get to 100% (1) until all tasks are completed, including the two "dummy" tasks for checking the status and sending the email!
    I also tried to check number of tasks completed versus total tasks, but that didn't work either because skipped tasks are not counted as completed (though when you look at the Instance, a skipped task is counted as completed).
    So hence my question in the other post about task status. That will work!
    thanks again