Previous Topic

Book Contents

Book Index

Next Topic

Progress Bar Task States

Each Task of the Progress Bar can be set to one of three states. These represent the state/status of the task and are graphically differentiated on the GUI.

State

API Name

Task Color

Active

VM.PB_TASK_ACTIVE

Help Image

Planned

VM.PB_TASK_PLANNED

Help Image

Done

VM.PB_TASK_DONE

Help Image

 

The state of the Progress Bar can be changed either by adding a script to the current workflow or by using a second workflow which starts via a rule.

In both cases it is the script that changes the state.

Change the State of the Progress Bar

The state change can be done in a workflow executed by a rule.

Help Image

Script Contents

We have to get the Progress Bar from the BO first.

prb= system.getProgressBar()

Now let's define a condition, which lets the script continue only if the Name field of the BO is NOT empty. Now the script will continue only if the BO has been saved.

name = system.getBOField("name").getValue()
if (name != None):

Now let us change the states:

  pbTask = prb.getTask("Active")
  pbTask.SetState(VM.PB_TASK_DONE)

  pbTask = prb.getTask("Planned")
  pbTask.setState(VM.PV_TASK_ACTIVE)

The states are changed, but the GUI needs to be updated:

prb.updateGUI()

See Also

Customization in Valuemation

Progress Bar Initial Configuration

Progress Bar on Editor View

Progress Bar on Catalog View

Label Translations