Status Control
Customising Status Control using PML
: Using the StatusData PML Object
Using the StatusData PML Object
The PML object statusData.pmlobj is provided in the pmllib\common\objects folder to allow easy manipulation of status data from PML. It encapsulates a number of core objects that are documented below and that can be used directly if preferred.
Note:
The statusData object can hold status data for a single object and status definition combination, or it can hold an array of statusData objects for multiple objects and status definition combinations (see the constructor methods below).
Members
Member
Type
Description
status
ARRAY
Status objects for internal usage
list
ARRAY
StatusData objects for multiple object/definition combinations
bulk
BOOLEAN
True if object holds list of StatusData objects
False if object holds status information directly
definition
DBREF
Status definition
statusName
STRING
Name of status definition
elements
ARRAY
Model objects controlled by status definition
elementNames
ARRAY
Model object names
values
ARRAY
Status value objects
valnames
ARRAY
Status value names
descriptions
ARRAY
Status value descriptions
numbers
ARRAY
Status value numbers
comments
ARRAY
Status value comments
validValues
ARRAY
Status values are currently valid
validValues
BOOLEAN
First status value is currently valid
users
ARRAY
Status last modification dates
modifieds
ARRAY
Status last modified by users
transitions
ARRAY
Available transitions as array of arrays of strings
element
DBREF
First element in array
elementName
STRING
First element name in array
value
DBREF
First status value in array
valname
STRING
First status value name in array
description
STRING
First status value description in array
number
REAL
First status value number in array
comment
STRING
First status value comment in array
user
STRING
First status last modification date in array
modified
STRING
First status last modified by user in array
steps
ARRAY
First array of available transitions
debug
BOOLEAN
Debug flag
refreshMode
STRING
Refresh mode - None/Part/Full (set to None by default for best performance)
Constructors
Method
Description
statusData()
Constructor for all status definitions on CE
statusData(
STRING name of status definition )
Constructor for single status definition on CE
statusData(
DBREF of object )
Constructor for all status definitions on a single object
statusData(
ARRAY of DBREF of objects )
Constructor for all status definitions on array of objects
statusData(
DBREF of object,
DBREF of status definition )
Constructor for single object and single status definition
statusData(
DBREF of object,
STRING name of status definition )
Constructor for single object and single status definition
statusData(
ARRAY of DBREF of objects,
DBREF of status definition )
Constructor for array of objects and single status definition
statusData(
ARRAY of DBREF of objects,
STRING name of status definition )
Constructor for array of objects and single status definition
Methods Intended for the User
Method
Description
output() is ARRAY of STRING
Return one line status summary per object (automatically does a refresh with refresh mode part)
outputAll() is ARRAY of STRING
Return multi line status details per object (automatically does a refresh with refresh mode full)
print()
Print one line status summary per object
printAll()
Print multi line status details per object
refresh()
Reread status data
refreshModeFull()
Set refresh mode to full (slows performance)
refreshModeNone()
Set refresh mode to none (best performance)
refreshModePart()
Set refresh mode to part
Methods to Assign and Remove Status
Method
Description
assign()
Assign stored status definition to object(s)
assign (
STRING comment )
Assign stored status definition to object(s) and set comment
assignStatus(
DBREF of status definition )
Assign status definition to object(s)
assignStatus(
STRING name of status definition )
Assign status definition to object(s)
assignStatus(
DBREF of status definition,
Assign status definition to object(s) and set comment
STRING comment )
assignStatus(
STRING name of status definition,
STRING comment )
Assign status definition to object(s) and set comment
remove()
Remove stored status definition from object(s)
removeStatus(
DBREF of status definition)
Remove status definition from object(s)
removeStatus(
STRING name of status definition )
Remove status definition from object(s)
Methods to Promote and Demote Status
Method
Description
promote()
Promote stored status for object(s)
promote(
STRING comment )
Promote stored status for object(s) and set comment
promoteStatus(
DBREF of status definition )
Promote status for object(s)
promoteStatus(
STRING name of status definition )
Promote status for object(s)
promoteStatus(
DBREF of status definition,
STRING comment )
Promote status for object(s) and set comment
promoteStatus(
STRING name of status definition,
STRING comment )
Promote status for object(s) and set comment
demote()
Demote stored status for object(s)
demote(
STRING comment )
Demote stored status for object(s) and set comment
demoteStatus(
DBREF of status definition )
Demote status for object(s)
demoteStatus(
STRING name of status definition )
Demote status for object(s)
demoteStatus(
DBREF of status definition,
STRING comment )
Demote status for object(s) and set comment
demoteStatus(
STRING name of status definition,
STRING comment )
Demote status for object(s) and set comment
Methods to Set Status
Method
Description
set(
STRING name of status value)
Set stored status for object(s)
set(
STRING name of status value,
STRING comment )
Set stored status for object(s) and set comment
setStatus(
DBREF of status definition,
STRING name of status value )
Set status for object(s)
setStatus(
STRING name of status definition,
STRING name of status value)
Set status for object(s)
setStatus(
DBREF of status definition,
STRING name of status value,
STRING comment )
Set status for object(s) and set comment
setStatus(
STRING name of status definition,
STRING name of status value,
STRING comment )
Set status for object(s) and set comment
Internal Methods not Intended to be Called by User
Method
Description
init()
Internal method to initialise member data
clear()
Internal method to clear member data
debugOff()
Internal method to clear debug flag
debugOn()
Internal method to set debug flag
refreshMode( STRING )
Internal method to set refreshMode
sortSteps()
Internal method to return available transitions
Example to Set and Get Status Data
The example is for the case where there is one available status definition for the current element. The set of commands assigns that status to the current element, promotes it, prints out the data, and gets the current status value description into a string variable.
!myStatus = object statusData()
!myStatus.assign()
!myStatus.promote()
!myStatus.print()
!currentStatus = !myStatus.description
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.