Status Control
Status Control
Status Control
Disclaimer
Information of a technical nature, and particulars of the product and its use, is given by AVEVA Solutions Ltd and its subsidiaries without warranty. AVEVA Solutions Ltd and its subsidiaries disclaim any and all warranties and conditions, expressed or implied, to the fullest extent permitted by law. Neither the author nor AVEVA Solutions Ltd, or any of its subsidiaries, shall be liable to any person or entity for any actions, claims, loss or damage arising from the use or possession of any information, particulars, or errors in this publication, or any incorrect use of the product, whatsoever.
Copyright
Copyright and all other intellectual property rights in this manual and the associated software, and every part of it (including source code, object code, any data contained in it, the manual and any other documentation supplied with it) belongs to AVEVA Solutions Ltd or its subsidiaries. All other rights are reserved to AVEVA Solutions Ltd and its subsidiaries. The information contained in this document is commercially sensitive, and shall not be copied, reproduced, stored in a retrieval system, or transmitted without the prior written permission of AVEVA Solutions Ltd. Where such permission is granted, it expressly requires that this Disclaimer and Copyright notice is prominently displayed at the beginning of every copy that is made. The manual and associated documentation may not be adapted, reproduced, or copied, in any material or electronic form, without the prior written permission of AVEVA Solutions Ltd. The user may also not reverse engineer, decompile, copy, or adapt the associated software. Neither the whole, nor part of the product described in this publication may be incorporated into any third-party software, product, machine, or system without the prior written permission of AVEVA Solutions Ltd, save as permitted by law. Any such unauthorised action is strictly prohibited, and may give rise to civil liabilities and criminal prosecution. The AVEVA products described in this guide are to be installed and operated strictly in accordance with the terms and conditions of the respective license agreements, and in accordance with the relevant User Documentation. Unauthorised or unlicensed use of the product is strictly prohibited. First published September 2009 AVEVA Solutions Ltd, and its subsidiaries AVEVA Solutions Ltd, High Cross, Madingley Road, Cambridge, CB3 0HB, United Kingdom
Trademarks
AVEVA and Tribon are registered trademarks of AVEVA Solutions Ltd or its subsidiaries. Unauthorised use of the AVEVA or Tribon trademarks is strictly forbidden. AVEVA product names are trademarks or registered trademarks of AVEVA Solutions Ltd or its subsidiaries, registered in the UK, Europe and other countries (worldwide). The copyright, trade mark rights, or other intellectual property rights in any other product, its name or logo belongs to its respective owner.
Status Control
Status Control
Contents
Page
Status Control
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1 Guide Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
Configuring Status Definitions in Lexicon . . . . . . . . . . . . . . . . . . . . 3:1 Status Controller in Design and other Constructor Modules . . . . . 4:1
Status Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:1 Edit Status Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:4 Status History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:6 Statistical Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:7 Status Controller Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:10 Drag and Drop into Graphical View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:10
12.0
Status Control
Example to Prevent Modification of an Object of a Certain Status. . . . . . . . . . . . . . . . . . . . Example to Catch when the Dictionary Database has been Deferred . . . . . . . . . . . . . . . . . Example to Prevent Change of Status after a Certain Level . . . . . . . . . . . . . . . . . . . . . . . . Example to Prevent Removal of Status from an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example where a User may only Amend Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
12.0
Status Control
Distributing Customised Status Layouts . . . . . . . . . . . . . . . . . . . . 10:1 Upgrading Model Manager Status Data . . . . . . . . . . . . . . . . . . . . . 11:1
iii
12.0
Status Control
iv
12.0
Status Control
Introduction
Introduction
Status Control is the ability to control and report on the status of individual model objects as they progress through their lifecycles. It can be applied to any model objects, e.g. tagged items, catalogue components, drawings, etc. It can be expressed in a variety of ways, e.g. Approved for Construction, 80% Complete, Clash Free, etc. The desired project configuration is created by administrators as Status Definitions in Lexicon. It is applied to model objects by end users in any of the constructor modules Design, Outfitting, Paragon, Spooler, Diagrams, Hull, Draft and Hull Drafting - using the Status Controller. Status Control can be tightly coupled with Data Access Control. For example, it can be configured so that only certain users may approve an object. It can also be configured to prevent changes to an object once it has achieved a particular status. A core concept for Status Control is that of a Controlled Object. A Controlled Object is defined as any model object that has one or more Status Values assigned to it. A Controlled Object may be controlled for multiple statuses to suit processes for design, manufacturing, fabrication, construction, etc.
1.1
Assumptions
End users have a basic knowledge of PDMS/Marine. Administrators have a reasonable knowledge of Lexicon, and if required can use the Access Control Assistant in Admin. Developers have a reasonable knowledge of PML and/or C# (.NET).
1.2
Guide Structure
This guide is structured as follows. Introduction Example Workflow Configuring Status Definitions in Lexicon Status Controller in Design and other Constructor Modules presents some concepts and overview illustrates a worked example used throughout this guide and explains the underlying data model describes how administrators can set up the status definitions for their project describes how end users can control the status of their model objects
1:1
12.0
Status Control
Introduction
Attributes
and
provides details of syntax available to application writers gives examples for administrators to extend control of data integrity gives examples for administrators to customise graphical views shows developers how to add functionality from PML shows developers how to add functionality from C# shows where Status Layout files are stored describes an approach to convert existing status values in Model Management projects.
Using Status Control with Data Access Control Using Status Control with Auto Colours Customising Status Control using PML Customising Status Control using C# (.NET) Distributing Layouts Customised Status
1:2
12.0
Status Control
Example Workflow
Example Workflow
Consider the following simple workflow for a Design Status definition which will be used as a worked example.
This example has a primary route from starting work through to releasing, with stages for checking and approving, and options at various stages to put back for rework.
2:1
12.0
Status Control
Example Workflow
2.1
Status Link objects reside in the same database as the model objects they reference, so that they are globally distributed with those model objects. The Status Link holds references to the model object and to the Status Value, along with attribute data for comments and history. So status data is not stored directly on the model object and the user does not need write access to the model object in order to set its status. The Status Link objects are not visible to the end user, but the status data is available on the model object as pseudo attributes. Administrators need to know of their existence for purposes of Data Access Control.
2:2
12.0
Status Control
Configuring Status Definitions in Lexicon
Right click on the new Status World in the Explorer and select New Status Definition (the user can also create Status Groups to contain Status Definitions). Enter a Name and Description in the Editor Note: These will typically be similar but the description can include spaces and will be used in the Status Controller if it is set.
3:1
12.0
Status Control
Configuring Status Definitions in Lexicon
The next step is to define the Controllable element types for this Status Definition. Click on the selection button to show the Select element types form.
3:2
12.0
Status Control
Configuring Status Definitions in Lexicon
Select EQUIPMENT, click Add to list, and then click OK. The user can add other types if the definition is to apply to multiple types of elements. Right click on the Status Definition in the Explorer and select New Status Value. Enter a Name, Description and Numerical value in the Editor. Note: Numerical value is optional and may be used as a percentage or a simple value.
3:3
12.0
Status Control
Configuring Status Definitions in Lexicon
Note: Status Value name uniqueness applies only within the owning Status Definition. So you can use repeat names such as Preliminary and Released in different definitions. Repeat this process to create the rest of the Status Values. You can then go to each Status Value and set its Valid transitions. Click on the selection button to show the Select valid status transitions window.
Select the status values that will be valid transitions from this value and click OK. In the drop down selection for Promote and Demote, select the appropriate values. Note: Promote and demote are optional and simply denote a main route through the workflow - any valid transitions not marked as promote or demote will still be available in the Status Controller.
3:4
12.0
Status Control
Configuring Status Definitions in Lexicon
Select the Status Definition again in the Explorer and note its Initial status. Note: It will be set to the first status value by default but the user can change this if required.
The Status Definition is now complete and ready for use. Save work and exit Lexicon.
3:5
12.0
Status Control
Configuring Status Definitions in Lexicon
3:6
12.0
Status Control
Status Controller in Design and other Constructor Modules
4.1
Status Layout
To display particular status data, click in the drop down list for Status Layout and select New Status Layout.
Alternatively right click in the empty grid area and select Status Layout.
4:1
12.0
Status Control
Status Controller in Design and other Constructor Modules
The Select Status Columns window will be displayed. For the example, check the columns for Design Status.
The Status Controller will display the status data columns. The rows will be populated with those objects that are or could be controlled by the selected status definitions. If more than one Status Definition has been selected, one can be selected as the Focus Status in the drop down list, and this will be used for Edit Status operations.
4:2
12.0
Status Control
Status Controller in Design and other Constructor Modules
The user can display other attribute columns by right clicking in one of the column titles and selecting Column Setup. The pseudo attribute expressions for the status columns already added will be shown in this window.
Note: The user can show the status of a related object in its own column. For example, if the user is managing status of schematic equipment (SCEQUI), they can show the status of a linked EQUI using an expression like STVDSC( /DesignStatus ) of Deslnk numb 1 See Pseudo Attributes for details of status pseudo attributes. The chosen column layout can be saved by right clicking in one of the column titles and selecting Save Status Layout.
4:3
12.0
Status Control
Status Controller in Design and other Constructor Modules
This name will then appear in the Status Layout dropdown list on the Status Controller. Use Save Status Layout As to save the layout with a different name. Note: The other options available on the right click menu from the column titles, including Settings and Export to Excel, which function similarly to in the Search Results.
4.2
4:4
12.0
Status Control
Status Controller in Design and other Constructor Modules
This will display the form to edit values of the Focus Status for the selected objects. Initially the objects are Not Controlled, i.e. they have not been assigned a status value (for this status definition - they may have status values for other status definitions). Click on the drop down list and select Assign to the initial value, enter a Comment (optional), and then click on OK or Apply.
The available options for status values will then reflect the valid transitions in the status definition. For example, from Work Completed, there are two transitions.
If Promote and Demote transitions have been defined, these can be selected directly.
4:5
12.0
Status Control
Status Controller in Design and other Constructor Modules
This will display a variant of the Edit Status window showing appropriate options. Note: Actual values will be shown if all selected objects share the same values, otherwise they will be displayed as mixed.
The Remove Status option will delete the status data for the selected objects, so that they will no longer be controlled. The Navigate To option will be enabled for a single row selection and will set the current element.
4.3
Status History
The Status History option displays the Status History window for the selected objects which lists the status transitions along with other session history.
4:6
12.0
Status Control
Status Controller in Design and other Constructor Modules
The Status History also has right click options including Export to Excel.
4.4
Statistical Reports
The Statistical Report option displays the Statistical Report window which display data and charts for the Focus Status on the selected objects.
Hovering the cursor over one of the regions on the chart gives some figures for the objects it represents.
4:7
12.0
Status Control
Status Controller in Design and other Constructor Modules
A right click context menu is available while the cursor is over a region on the chart. The selected option is applied to the objects represented by that region.
For example, selecting List Elements displays a list of the elements for that region (you can copy and paste from this window).
4:8
12.0
Status Control
Status Controller in Design and other Constructor Modules
A right click menu in the background of the window offers various options, including a range of Chart Types.
4:9
12.0
Status Control
Status Controller in Design and other Constructor Modules
The Chart Legend option controls positioning of the legend, e.g. left, right, etc.
4.5
The icons represent Promote, Demote, Edit Status, Remove Status, Status History, Statistical Report and Save Status Layout.
4.6
4:10
12.0
Status Control
Status Pseudo Attributes and Commands
5.1
Pseudo Attributes
The following pseudo attributes are available on any controlled object. Attribute STVPRO STVDEM STVLST STVNUM STVDSC STVCOM STVNAM STVVAL STVLNK STVASD STVTRV STVUNR STADEF STADEF STADEF STADEF STADEF STADEF Qualifier STADEF STADEF Returns STAVAL STAVAL STADEF array integer string string string STAVAL STALNK STADEF array STADEF array REF array Remark Get the promote STAVAL element for the assigned STADEF Get the demote STAVAL element for the assigned STADEF Get all assigned STADEFs Get the numerical value for the assigned STAVAL The description of assigned STAVAL The current comment from the latest status command The name of the assigned STAVAL The current STAVAL for the STADEF Ref to the STALNK element (internal) Get all eligible STADEFs, may include currently assigned Get valid transitions from current STVVAL Get a list of unresolved STAVAL references from associated STALNKs
5:1
12.0
Status Control
Status Pseudo Attributes and Commands
The following pseudo attributes are available on Status Definitions (STADEF). Attribute STVREF STVUSD Qualifier string/number Returns STAVAL REF array Remark Get the STAVAL with the given name or number (NUMVAL) All elements controlled by this STADEF
The following pseudo attributes are available on Status Values (STAVAL). Attribute STVUSD STVPRO STVDEM Qualifier Returns REF array STAVAL STAVAL Remark All elements controlled by this STADEF and with this STAVAL current Get the promote STAVAL element from this STAVAL Get the demote STAVAL element from this STAVAL
5.2
Commands
STM ASS[ign] /Definition [to SELELE] ['comment'] Assigns Status /Definition to current element or SELELE making it controlled by this status and sets the current status value to INIVAL. If a comment is given, it will be set otherwise any current comment is cleared. STM REM[ove] /Definition [from SELELE] Removes Status /Definition from current element or SELELE making it uncontrolled by this status. STM RESET /Definition [on SELELE] ['comment'] Resets current value of status /Definition on current element or SELELE to INIVAL. There does not need to be a valid transition from current value to initial value. If a comment is given, it will be set otherwise any current comment is cleared. STM DE[mote] /Definition [on SELELE] ['comment'] Sets current value of status /Definition on current element or SELELE to the value defined as demote (STVDEM). If a comment is given, it will be set otherwise any current comment is cleared STM PRO[mote] /Definition [on SELELE] ['comment'] Sets current value of status /Definition on current element or SELELE to the value defined as promote (STVPRO). If a comment is given, it will be set otherwise any current comment is cleared
5:2
12.0
Status Control
Status Pseudo Attributes and Commands
STM SET /Definition [/Value] [on SELELE] ['comment'] Sets current value of status /Definition on current element or SELELE to /Value. There need to be a valid transition from current value to /Value. If a comment is given, it will be set otherwise any current comment is cleared.
5:3
12.0
Status Control
Status Pseudo Attributes and Commands
5:4
12.0
Status Control
Using Status Control with Data Access Control
6.1
6.1.1
Examples
Example to Prevent Modification of an Object of a Certain Status
This is to prevent changes to an object once it has reached a level of completion. Create a PEROP that denies modify and delete operations on equipment for all attributes once the Design Status is greater than or equal to 50%. Here is the condition to use. COND ( ATTRIB STVNUM(ID /DesignStatus ) GE 50 ) A suitable error message would be: DAC: You may not modify object that has status Work Completed
6.1.2
6.1.3
6:1
12.0
Status Control
Using Status Control with Data Access Control
6.1.4
6.1.5
6:2
12.0
Status Control
Using Status Control with Auto Colours
7.1
7.1.1
Examples
Example Rule for Equipment with Design Status Pending
Rule Name: Equipment Pending Types: EQUI Rule: attrib stvnum( /DesignStatus ) eq 0
7.1.2
7.1.3
7:1
12.0
Status Control
Using Status Control with Auto Colours
7:2
12.0
Status Control
Customising Status Control using PML
8.1
8.1.1
Description Before a status is assigned to an object After a status is assigned to an object Before a status is removed from an object After a status is removed from an object Before a status is changed/promoted/demoted on an object After a status is changed/promoted/demoted on an object
Arg No 1 2 3
Description Reference number of controlled object Reference number of status definition Reference number of from status value (may be =0/0)
8:1
12.0
Status Control
Customising Status Control using PML
4 5
STRING STRING
Reference number of to status value (may be =0/0) Return message aborts operation if set but only on Before operations
8.1.2
Description Before savework when there are changes to status data After savework when there are changes to status data Before flush when there are changes to status data After flush when there are changes to status data
Description Reference number of status definition String reference numbers of objects that had status assigned String reference numbers of objects that had status changed String reference numbers of objects that had status removed Return message aborts operation if set but only on Before operations
8.2
8.2.1
Debug Mode
The user can switch ON or OFF a debug mode with the following commands. !!statusProjectHandler.debugOn() !!statusProjectHandler.debugOff() In debug mode a line of text is output to the command line for each event. For example here is the output for object P1501A when promoted from Work Suspended to Work Started. statusProjectHandler.beforeStatusChange(/P1501A, /DesignStatus, /WorkSuspended, /WorkStarted) statusProjectHandler.afterStatusChange(/P1501A, /DesignStatus, /WorkStarted, /WorkStarted)
8:2
12.0
Status Control
Customising Status Control using PML
8.2.2
-- End of customisation --========================================================== Important: Other parts of the statusProjectHandler PML object should not be modified. A number of examples are provided (commented out). These make use of the statusData PML object documented below.
8.2.3
8.2.4
8.2.5
8.3
8:3
12.0
Status Control
Customising Status Control using PML
8.3.1
Members
Member status statusValue element definition list bulk value valname description number comment steps debug refreshMode
Type ARRAY ARRAY DBREF DBREF ARRAY BOOLEAN DBREF STRING STRING REAL STRING ARRAY BOOLEAN STRING
Description Holds a single core Status object for internal usage Holds a single core AssignedStatus object for internal usage Model object Status definition Array of statusData objects for multiple object/ definition combinations True if object holds a list of statusData objects False if object holds status information directly Status value Status value name Status value description Status value number Status comment Available transitions as strings Debug flag Refresh mode - None/Part/Full (set to None by default for best performance)
8.3.2
Constructors
Method statusData()
statusData( Constructor for single status definition on CE STRING name of status definition ) statusData( DBREF of object ) statusData( ARRAY of DBREF of objects ) statusData( DBREF of object, DBREF of status definition ) Constructor for all status definitions on a single object Constructor for all status definitions on array of objects Constructor for single object and single status definition
8:4
12.0
Status Control
Customising Status Control using PML
statusData( Constructor for single object and single status DBREF of object, definition STRING name of status definition ) statusData( ARRAY of DBREF of objects, DBREF of status definition ) Constructor for array of objects and single status definition
statusData( Constructor for array of objects and single status ARRAY of DBREF of objects, definition STRING name of status definition )
8.3.3
Method output() is ARRAY of STRING outputAll() is ARRAY of STRING print() printAll() refresh() refreshModeFull() refreshModeNone() refreshModePart()
Description Return one line status summary per object (automatically does a refresh with refresh mode part) Return multi line status details per object (automatically does a refresh with refresh mode full) Print one line status summary per object Print multi line status details per object Reread status data Set refresh mode to full (slows performance) Set refresh mode to none (best performance) Set refresh mode to part
8.3.4
Description Assign stored status definition to object(s) Assign stored status definition to object(s) and set comment Assign status definition to object(s)
assignStatus( Assign status definition to object(s) STRING name of status definition ) assignStatus( DBREF of status definition, STRING comment ) Assign status definition to object(s) and set comment
8:5
12.0
Status Control
Customising Status Control using PML
assignStatus( STRING name of status definition, STRING comment ) remove() removeStatus( DBREF of status definition)
Remove stored status definition from object(s) Remove status definition from object(s)
removeStatus( Remove status definition from object(s) STRING name of status definition )
8.3.5
Description Promote stored status for object(s) Promote stored status for object(s) and set comment Promote status for object(s)
promoteStatus( Promote status for object(s) STRING name of status definition ) promoteStatus( DBREF of status definition, STRING comment ) promoteStatus( STRING name of status definition, STRING comment ) demote() demote( STRING comment ) demoteStatus( DBREF of status definition ) Promote status for object(s) and set comment
Demote stored status for object(s) Demote stored status for object(s) and set comment Demote status for object(s)
demoteStatus( Demote status for object(s) STRING name of status definition ) demoteStatus( DBREF of status definition, STRING comment ) demoteStatus( STRING name of status definition, STRING comment ) Demote status for object(s) and set comment
8:6
12.0
Status Control
Customising Status Control using PML
8.3.6
Method set( STRING name of status value) set( STRING name of status value, STRING comment ) setStatus( DBREF of status definition, STRING name of status value ) setStatus( STRING name of status definition, STRING name of status value) setStatus( DBREF of status definition, STRING name of status value, STRING comment ) setStatus( STRING name of status definition, STRING name of status value, STRING comment )
Description Set stored status for object(s) Set stored status for object(s) and set comment
8.3.7
Method init() clear() debugOff() debugOn() getStatus() queryStatus() refreshMode( STRING ) sortSteps()
Description Internal method to initialise member data Internal method to clear member data Internal method to clear debug flag Internal method to set debug flag Internal method to get status data using core object Internal method to get status data using queries Internal method to set refreshMode Internal method to return available transitions
8.3.8
8:7
12.0
Status Control
Customising Status Control using PML
8.4
8.4.1
Object STATUSMANAGEMENT
Holds systems information relating to Status Control. Methods include: Method statuses() Description Returns the available statuses as an array of STATUS
8.4.2
Object STATUSEVENTS
Holds information relating to status events. Methods include: Method statusEvents( STRING name of status definition ) Initialise( STRING name of status definition ) addEventHandler( STRING event name, ANY object name, STRING method name) Description Constructor that initialises for the status definition Initialises for the status definition Adds an event for the stored status definition that will call the method on the object
8.4.3
8:8
12.0
Status Control
Customising Status Control using PML
8.4.4
Object STATUS
Represents a status definition. Methods include: Method status( STRING name of status definition ) assign( STRING name of object ) assign ( ARRAY of names of objects ) assign ( STRING name of object, STRING comment ) assign ( ARRAY of names of objects, STRING comment ) controlledElements() demote( STRING name of object ) demote ( ARRAY of names of objects ) demote ( STRING name of object, STRING comment ) demote ( ARRAY of names of objects, STRING comment ) description() initialValue() name() promote( STRING name of object ) promote ( ARRAY of names of objects ) Description Constructor Assign status to object Assign status to objects Assign status to object and set comment
Returns an array of names of objects controlled by this status Demote status on object Demote status on objects Demote status on object and set comment
Returns description of status definition Returns STATUSVALUE initial value of status definition Returns name of status definition Promote status on object Promote status on objects
8:9
12.0
Status Control
Customising Status Control using PML
promote ( STRING name of object, STRING comment ) promote ( ARRAY of names of objects, STRING comment ) remove( STRING name of object ) remove ( ARRAY of names of objects ) set ( STRING name of object, STRING name of status value) set ( STRING name of object, STATUSVALUE status value) set ( ARRAY of names of objects, STRING name of status value ) set ( ARRAY of names of objects, STATUSVALUE status value) set ( STRING name of object, STRING name of status value, STRING comment ) set ( STRING name of object, STATUSVALUE status value, STRING, comment ) set ( ARRAY of names of objects, STRING name of status value, STRING comment ) set ( ARRAY of names of objects, STATUSVALUE status value, STRING comment ) values()
Remove status from object Remove status from objects Set status on object
8:10
12.0
Status Control
Customising Status Control using PML
8.4.5
Object STATUSVALUE
Represents a status value. Methods include: Method statusValue( STRING name of status definition, STRING valname of status value ) statusValue ( STATUS status definition, STRING valname of status value ) description() name() number() validTransitions() Description Constructor
Constructor
Returns description of status value Returns valname of status value Returns number of status value Returns array of STATUSVALUE that are valid transitions
8.4.6
Object ASSIGNEDSTATUS
Represents the status link data for an object. Methods include: Method assignedStatus( STRING name of status definition, STRING name of model object ) comment() currentValue() definition() thisElement() Description Constructor
Returns comment from status link Returns STATUSVALUE status value that status link refers to Returns STATUS status definition that status value is owned by Returns STRING reference number of model object that status link refers to
8.4.7
8:11
12.0
Status Control
Customising Status Control using PML
8:12
12.0
Status Control
Customising Status Control using C# (.NET)
9.1
9.2
Classes in .NET
The following classes are available in C#. These correspond to and have similar functionality to the PML objects described above.
9.2.1
Class StatusManagement
This static class gives access to all the status definition elements in the current MDB. As a static class no instances of the class are created. The class has a single property, Statuses, which returns an array of Status objects (described below), used as follows: Status[] statuses = StatusManagement.Statuses;
9.2.2
Class Status
This class gives access to a named status definition determined in the constructor either by name or as a DbElement: Status status = Status("/DesignStatus"); DbElement statusDefinitionElement; // ... Status status = Status(statusDefinitionElement);
9:1
12.0
Status Control
Customising Status Control using C# (.NET)
The screenshot below of the Visual Studio Object Browser details the public interface of the Status class:
9.2.3
Class StatusValue
This class gives access to the data relating to a Status Value (STAVAL element). This represents one of the legal states that an element controlled for a given status definition may have. The status definition and value can be determined via the class constructors: Status status = Status("/DesignStatus"); StatusValue statusValue = StatusValue(status, "/Approved"); Or: DbElement statusValueElement; // ... StatusValue statusValue = StatusValue(statusValueElement);
9:2
12.0
Status Control
Customising Status Control using C# (.NET)
Alternatively, the array of all StatusValues for a given status definition can be obtained directly from a Status object: Status status = Status("/DesignStatus"); StatusValue[] statusValues = status.Values; The remaining functions of the StatusValue class are displayed in the Visual Studio Object Browser below:
9.2.4
Class StatusCommand
This static class gives access to all the status functionality. As a static class no instances of the class are created. This class effectively duplicates the functionality otherwise available through instances of the Status class. The Visual Studio Object Browser display is as follows:
9.2.5
Class StatusEvents
This class gives access to all the status change events. An instance of the class cannot be instantiated directly by constructor. Instead an instance can be created from the
9:3
12.0
Status Control
Customising Status Control using C# (.NET)
Status.Events property, or from the static functions StatusEvent.GetStatusEventObject(Status s) or StatusEvent.GetStatusEventObject(). The following example shows the registration of an event handler for the BeforeStatusChange event together with a sample implementation of the registered event handler: Status status = Status("/DesignStatus"); StatusEvent statusEvent = status.Event; statusEvent.BeforeStatusChange += new StatusEvent.BeforeStatusChangeEventHandler(My_BeforeStatusChange ); // ... // Event handler private void My_BeforeStatusChange (object sender, CancelStatusEventArgs e) { // Do any extra actions and check status change is allowed if ( /* abort status change required */ ) { e.Cancel = true; e.Message = "reason not to proceed"; } }
The list of available status events is displayed in the Visual Studio Object Browser display as follows:
9:4
12.0
Status Control
Customising Status Control using C# (.NET)
9.2.6
CancelStatusEventArgs Name Model Status From To Cancel Message Type DbElement Status StatusValue StatusValue Bool String Description The element to be controlled The Status object The from StatusValue object The to StatusValue object Cancel the ongoing operation With this as the message
9.2.7
9:5
12.0
Status Control
Customising Status Control using C# (.NET)
BeforeFlush AfterFlush DBChangeEventArgs Name Status Assigned Changed Removed Type Status DbElement[] DbElement[] DbElement[]
Description The Status object Array of DbElements that had Status assigned Array of DbElements that had Status changed Array of DbElements that had Status removed
CancelDBChangeEventArgs Name Status Assigned Changed Removed Cancel Message Type Status DbElement[] DbElement[] DbElement[] Bool String Description The Status object Array of DbElements that had Status assigned Array of DbElements that had Status changed Array of DbElements that had Status removed Cancel the ongoing operation With this as the message
9:6
12.0
Status Control
Distributing Customised Status Layouts
10
10:1
12.0
Status Control
Distributing Customised Status Layouts
10:2
12.0
Status Control
Upgrading Model Manager Status Data
11
11:1
12.0
Status Control
Upgrading Model Manager Status Data
11:2
12.0
Status Control
Index
C
Change Events Database . . . . . . . . . . . . . . . . . 8:2, 9:5 Status . . . . . . . . . . . . . . . . . . . . . . . . 9:5 Class Status . . . . . . . . . . . . . . . . . . . . . . . . 9:1 StatusCommand . . . . . . . . . . . . . . . . 9:3 StatusEvents . . . . . . . . . . . . . . . . . . 9:3 StatusManagement . . . . . . . . . . . . . 9:1 StatusValue . . . . . . . . . . . . . . . . . . . 9:2 Classes .NET . . . . . . . . . . . . . . . . . . . . . . . . . 9:1 Commands . . . . . . . . . . . . . . . . . . . . . . . 5:2 Customising StatusProject Handler PML Object . . 8:2
L
Lexicon Configuring Status Definitions . . . . . 3:1
M
Methods Abort Changes . . . . . . . . . . . . . . . . . Add Checks . . . . . . . . . . . . . . . . . . . Assign and Remove . . . . . . . . . . . . . Dependent Changes . . . . . . . . . . . . Intended for User . . . . . . . . . . . . . . . Internal . . . . . . . . . . . . . . . . . . . . . . . Promote and Demote . . . . . . . . . . . . Set Status . . . . . . . . . . . . . . . . . . . . Synchronise External Systems . . . . 8:3 8:3 8:5 8:3 8:5 8:7 8:6 8:7 8:3
D
Data Model Status Control . . . . . . . . . . . . . . . . . . 2:2
N
Namespaces and Assemblies . . . . . . . . 9:1
E
Example Add Event Handler . . . . . . . . . . . . . . 8:8 Set and Get Status Data . . . . 8:7, 8:11
O
Object Assignedstatus . . . . . . . . . . . . . . . 8:11 Status . . . . . . . . . . . . . . . . . . . . . . . . 8:9 Statusevents . . . . . . . . . . . . . . . . . . 8:8 Statusmanagement . . . . . . . . . . . . . 8:8 Statusvalue . . . . . . . . . . . . . . . . . . 8:11
G
Graphical View Drag and Drop . . . . . . . . . . . . . . . . 4:10
P
PML Core Status Objects . . . . . . . . . . . . . 8:8
Index page 1
12.0
Status Control
R
Reports Statistical . . . . . . . . . . . . . . . . . . . . . 4:7
S
Status Controller Toolbar . . . . . . . . . . . . . . 4:10 Distributing Customised Layouts . . 10:1 Edit Operations . . . . . . . . . . . . . . . . . 4:4 History . . . . . . . . . . . . . . . . . . . . . . . 4:6 Layout . . . . . . . . . . . . . . . . . . . . . . . . 4:1 Status Change Events . . . . . . . . . . . . . . . . . . . . . . . 8:1 Status Control Auto Colours . . . . . . . . . . . . . . . . . . . 7:1 C# . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:1 Data Access Control . . . . . . . . . . . . . 6:1 Examples . . . . . . . . . . . . . . . . . 6:1, 7:1 using PML . . . . . . . . . . . . . . . . . . . . 8:1 Status Controller Constructor Modules . . . . . . . . . . . . 4:1 Design . . . . . . . . . . . . . . . . . . . . . . . 4:1 Status Events PML . . . . . . . . . . . . . . . . . . . . . . . . . 8:1
W
Workflow Example . . . . . . . . . . . . . . . . . . . . . . 2:1
Index page 2
12.0