Previous Topic

Book Contents

Book Index

Next Topic

Class Diagram and API

Progress bar is a transient property of GenericBOModel. It is supposed to be initialized by workflow script and it will not be saved to DB (i.e. within persistent workflows).

Help Image
Progress Bar class diagram

Progress bar is used to visualize information stored on object and on its surrounding objects. Transformation of information from object (e.g. from several status attributes and attributes of related object) is done by a workflow script.

On this account, the progress bar is customizable via the rich client only (not on the web client), too.

In the example below, the progress bar for a scenario of an object life-cycle is defined just before the object is displayed in a view.

Help Image

Script

Create the pbTicketProcessing Progress Bar:

pb = dlgWizard.createProgressBar("pbTicketProcessing")

Translations are defined in bundle "progressBars/Tasks"
Task Name is translated by a key = progressBar.Name + "." + task.Name
Task Tooltip is translated by a key = progressBar.Name + "." + task.Name + ".tooltip"

Define Tasks for the pbTicketProcessing Progress Bar:

pb.addTask("analyse", VM.PB_TASK_ACTIVE)
pb.addTask("approve", VM.PB_TASK_PLANED, ["Bert", "Peter"])
pb.addTask("implement", VM.PB_TASK_PLANED, ["Milos"], ["Milos", "Lukas"])

Force the progress bar to be refreshed on GUI:

pb.updateGUI()

Change the states of tasks analyze and approve:

pb.getTask("analyse").setState(VM.PB_TASK_DONE)
pb.getTask("approve").setState(VM.PB_TASK_ACTIVE)

Update the GUI:

dlgWizard.progressBar.updateGUI()

API

Publish in API only minimal set of methods of core Progressbar object.

Task

get/setState(int sState)

setNameTranslationArgs(String[] anArgs)

setTooltipTranslationArgs(String[] anArgs)

ProgressBar

clear()

addTask(String aName, int aState)

addTask(String aName, int aState, String[] aNameArgs, String[] aTooltipArgs)

removeTask(String aName)

ApiBObject

createProgressBar(String aName)

get/setProgressBar(ProgressBar aProgressBar)


# progressBar can be assigned to other object

pb = dlgWizard.getProgressBar()

# setProgressBar() updates GUI immediately

dlgWizard2.setProgressBar(pb)

See Also

Progress Bar Introduction

General Process Example