Previous Topic

Book Contents

Book Index

Next Topic

Progress Bar on Editor View

In our example the state change is done in a separate workflow which is 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()

Create the Action

Create an action for the Workflow definition.

Help Image

Set the rule

Let us create a rule which will execute the action whenever the systemname field is changed.

Help Image

Add this rule to the View Rules.

Help Image

 

We have now finished setting up a rule, which will change the state of our Progress Bar tasks for this particular view.

See Also

Customization in Valuemation

Progress Bar Initial Configuration

Progress Bar on Catalog View

Progress Bar Task States

Label Translations