Skip to main content

Overview

The purpose of the progress task is to bind multiple tasks to a single progress bar. The progress task has the following features:
  • Chain together multiple tasks into a single progress bar.
  • Include tasks in the progress bar that don’t normally have a progress associated with them.
  • Custom progress bar allocation options:
    • Specify how much of the progress bar particular tasks consume.
    • Use automatic allocation of the progress bar to all tasks.
    • Combine specified and automatic allocation.
    • Specify tasks that do not affect your progress bar.

Task

The arguments for the progress task are listed below. Any sub-task run by the progress task can have the following arguments: Status Variables: Changes:
  • 5.2 - Added progressAggregate argument
  • 7.2 - Added progress status variable

Examples

Below is an example workflow that combines two tasks into a single progress bar. In this instance the progress bar will automatically allocate to each task an equal amount of the progress bar (50%).
When the progress task runs, it will internally construct a chain of tasks that make up the progress bar. It builds this task chain by analyzing all subsequent tasks in the workflow. It starts with the “actions” listed in the progress task and follows each task through it’s “complete” argument. You can specify other properties for the progress task to look for by changing the taskChainParameter argument of the progress task. The key points are:
  • The progress task consists of all tasks in the “actions” argument.
  • The progress task also consists of all sub-tasks of the tasks listed in the “actions” argument through the sub-task’s “complete” argument.
  • By default, all tasks in the progress bar’s task chain will show in the progress bar.
  • By default, all tasks in the progress bar’s task chain are given an equal part of the progress bar.
Below is a more complex example:
In the above example, we have five tasks listed in the progress task’s “actions” argument.
  • The progress bar will only go up to 95%, instead of the normal 100%.
    • This is controlled by the maxPercentage argument on the progress task. The remaining 5% might be handled by custom JavaScript outside of the workflow engine.
  • The progress bar allocation is customized, with each task making up a different percentage of the progress bar.
    • This is controlled by the progressWeight argument on the progress sub-task.
    • The firsttask is given 0.1 (10%) of the progress bar, the secondtask is given 0.2 (20%), the thirdtask is given 0 (0%), the fourth task is given 0.4 (40%), and the fifthtask is given the remaining unallocated percentage (30%).
    • You can use a progressWeight value of 0.0 to prevent a task from being used by the progress bar at all. This is an especially useful thing to do when a task has a neutral function, such as a “queue” type or check type task.
  • The launch task has a timed progress that simulates progress on a task based on time elapsed.
    • This is controlled by the progressWaitTime and progressWaitInterval properties on the progress sub-task.
    • Assigns an arbitrary amount of time, in this case 10 seconds (progressWaitTime) , in increments of 1 second (progressWaitInterval ) to fill up the 30% of the progress bar it has allocated to it.