Previous Topic

Book Contents

Book Index

Next Topic

Progress Bar on Catalog View

The progress bar can also be set inside the workflow by using the Progress Bar Holder on the "Open Catalog View" object.

Let us create the workflow Create_System_With_ProgressBarCatalog.

Help Image

Node details

The above shown nodes have the following properties:

1. New Object

  Object type: System
  Current transaction: false
  Generate key: false

2. Script

prb = system.createProgressBar("SystemWithProgressBarOnCatalog")
prb.addTask("1st Task", VM.PB_TASK_ACTIVE)
prb.addTask("2nd Task", VM.PB_TASK_PLANNED)
prb.addTask("3rd Task", VM.PB_TASK_PLANNED)
prb.addTask("4th Task", VM.PB_TASK_PLANNED)
_output.put("system", system)

3. Open Object in Editor

  modal: false
  Object Type: System
  View: Simple Create System
  Mode: Edit
  Title:
  Show editor mode: true
  Modified Object: true
  Read Only: false

4. Script

prb = system.getProgressBar()
pbTask = prb.getTask("1st Task")
pbTask.setState(VM.PB_TASK_DONE)

pbTask = prb.getTask("2nd Task")
pbTask.setState(VM.PB_TASK_ACTIVE)
prb.updateGUI()

objectType = "Location"
subWF = VM.getMetaWorkflows().find("SubWf_OpenCatalog_For_ProgressBar")
subWFparams = VM.createMap()
subWFparams.put("objectType", objectType)
subWFparams.put("bo", system)

subWFResult = subWF.runSubWorkflow(subWFparams, transaction, 0)
selLocation = subWFResult.get("objects")

pbTask = prb.getTask("2nd Task")
pbTask.setstate(VM.PB_TASK_DONE)
if (selLocation != None):
    system.getBOField("syslocation").setTRObject(selLocation,VM.getFunctionprovider().getCurrentDate(), VM.getFunctionProvider().getMaxDate(),0)
    pbTask = getTask("3rd Task")
    pbTask.setState(VM.PB_TASK_ACTIVE)
else:
    pbTask.setState(VM.PB_TASK_PLANNED)

prb.updateGUI()

_output.put("system", system)

5. SubWorkflow

Help Image
SubWf_OpenCatalog_For_ProgressBar

Open Catalog View properties:

Mode:Select
Leave everything else unchecked/not set.

Do not forget to check the "Allowed in SideBar" checkbox!

Test the Progress Bar on the Web

Help Image

See Also

Customization in Valuemation

Progress Bar Initial Configuration

Progress Bar on Editor View

Progress Bar Task States

Label Translations