58
Status Control

Status Control

Embed Size (px)

DESCRIPTION

STT

Citation preview

  • Status Control

  • DisclaimerInformation 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.

    CopyrightCopyright 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

    TrademarksAVEVA 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.

    AVEVA Solutions Ltd

  • Status Control Status Control

    Contents Page

    Status ControlIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1Guide Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1

    Example Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1Status Control Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2

    Configuring Status Definitions in Lexicon . . . . . . . . . . . . . . . . . . . . 3:1

    Status Controller in Design and other Constructor Modules . . . . . 4:112.0i 2009 AVEVA Solutions Ltd

    Status Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:1Edit Status Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:4Status History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:6Statistical Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:7Status Controller Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:10Drag and Drop into Graphical View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:10

    Status Pseudo Attributes and Commands . . . . . . . . . . . . . . . . . . . . 5:1Pseudo Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:1Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:2

    Using Status Control with Data Access Control . . . . . . . . . . . . . . . 6:1Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:1

  • Status ControlExample to Prevent Modification of an Object of a Certain Status. . . . . . . . . . . . . . . . . . . . 6:1Example to Catch when the Dictionary Database has been Deferred . . . . . . . . . . . . . . . . . 6:1Example to Prevent Change of Status after a Certain Level . . . . . . . . . . . . . . . . . . . . . . . . 6:1Example to Prevent Removal of Status from an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:2Example where a User may only Amend Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:2

    Using Status Control with Auto Colours. . . . . . . . . . . . . . . . . . . . . . 7:1Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:1Example Rule for Equipment with Design Status Pending. . . . . . . . . . . . . . . . . . . . . . . . . . 7:1Example Rule for Equipment with Design Work Completed or Higher . . . . . . . . . . . . . . . . 7:1Example Rule for Equipment with Design Status Not Controlled. . . . . . . . . . . . . . . . . . . . . 7:1

    Customising Status Control using PML . . . . . . . . . . . . . . . . . . . . . . 8:1Status Events in PML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:1Status Change Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:1Database Change Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:2

    Customising the StatusProjectHandler PML Object. . . . . . . . . . . . . . . . . . . . . . 8:2Debug Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:2Where to add Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:3Methods where you can Add Checks and Abort Changes. . . . . . . . . . . . . . . . . . . . . . . . . . 8:3Methods where you can make Dependent Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:3Methods where you can Synchronise External Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:3

    Using the StatusData PML Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:3Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:4Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:4Methods Intended for the User. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:5Methods to Assign and Remove Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:5Methods to Promote and Demote Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:6Methods to Set Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:7Internal Methods not Intended to be Called by User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:7Example to Set and Get Status Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:7

    Using the Core Status Objects from PML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:8Object STATUSMANAGEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:8Object STATUSEVENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:8Example to Add an Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:8Object STATUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:9Object STATUSVALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:11Object ASSIGNEDSTATUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:11Example to Set and Get Status Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8:1112.0ii 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using C# (.NET) . . . . . . . . . . . . . . . . . . 9:1Namespaces and Assemblies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:1Classes in .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:1Class StatusManagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:1Class Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:1Class StatusValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:2Class StatusCommand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:3Class StatusEvents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:3Status Change Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:5Database Change Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:5

    Distributing Customised Status Layouts . . . . . . . . . . . . . . . . . . . . 10:1

    Upgrading Model Manager Status Data . . . . . . . . . . . . . . . . . . . . . 11:112.0iii 2009 AVEVA Solutions Ltd

  • Status Control12.0iv 2009 AVEVA Solutions Ltd

  • Status ControlIntroduction1 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 AssumptionsEnd 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 StructureThis guide is structured as follows.

    Introduction presents some concepts and overview

    Example Workflow illustrates a worked example used throughout this 12.01:1 2009 AVEVA Solutions Ltd

    guide and explains the underlying data model

    Configuring Status Definitions in Lexicon

    describes how administrators can set up the status definitions for their project

    Status Controller in Design and other Constructor Modules

    describes how end users can control the status of their model objects

  • Status ControlIntroductionStatus Pseudo Attributes and Commands

    provides details of syntax available to application writers

    Using Status Control with Data Access Control

    gives examples for administrators to extend control of data integrity

    Using Status Control with Auto Colours

    gives examples for administrators to customise graphical views

    Customising Status Control using PML

    shows developers how to add functionality from PML

    Customising Status Control using C# (.NET)

    shows developers how to add functionality from C#

    Distributing Customised Status Layouts

    shows where Status Layout files are stored

    Upgrading Model Manager Status Data

    describes an approach to convert existing status values in Model Management projects.12.01:2 2009 AVEVA Solutions Ltd

  • Status ControlExample Workflow2 Example Workflow

    Consider the following simple workflow for a Design Status definition which will be used as a worked example.12.02:1 2009 AVEVA Solutions Ltd

    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.

  • Status ControlExample Workflow2.1 Status Control Data ModelThe Status Control data model defines an Example Workflow as a Status Definition (STADEF) object owning a set of Status Value (STAVAL) objects. Individual model objects reference the Status Values via Status Link (STALNK) objects, as illustrated below.

    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.12.02:2 2009 AVEVA Solutions Ltd

  • Status ControlConfiguring Status Definitions in Lexicon3 Configuring Status Definitions in Lexicon

    Lexicon uses a hierarchy of Status World, Status Definition and Status Value data types to define a Example Workflow. In the Lexicon Dictionary Explorer, right click on the Dictionary WORLD and select New Status World then enter a name in the Current Element Editor.

    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.12.03:1 2009 AVEVA Solutions Ltd

  • Status ControlConfiguring Status Definitions in LexiconThe 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.12.03:2 2009 AVEVA Solutions Ltd

  • Status ControlConfiguring Status Definitions in LexiconSelect 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.12.03:3 2009 AVEVA Solutions Ltd

  • Status ControlConfiguring Status Definitions in LexiconNote: 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.12.03:4 2009 AVEVA Solutions Ltd

  • Status ControlConfiguring Status Definitions in LexiconSelect 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.12.03:5 2009 AVEVA Solutions Ltd

  • Status ControlConfiguring Status Definitions in Lexicon12.03:6 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor Modules4 Status Controller in Design and other Constructor Modules

    The constructor modules such as Paragon, Design and Outfitting, use the Status Controller to interact with Controlled Objects. Click on Display > Status Controller to display the Status Controller window. Initially this will be empty.

    4.1 Status LayoutTo 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.12.04:1 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesThe 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.12.04:2 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesThe 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.12.04:3 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesThe user will be prompted to enter a name for the layout.

    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 Edit Status OperationsIn the Status Controller select the rows for the objects to be controlled, right click in the selected area, and click Edit Status.12.04:4 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesThis 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.12.04:5 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesThis 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 HistoryThe Status History option displays the Status History window for the selected objects which lists the status transitions along with other session history.12.04:6 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesThe Status History also has right click options including Export to Excel.

    4.4 Statistical ReportsThe 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.12.04:7 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesA 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).12.04:8 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesA right click menu in the background of the window offers various options, including a range of Chart Types.

    For example here is a 3D cylinder bar chart.12.04:9 2009 AVEVA Solutions Ltd

  • Status ControlStatus Controller in Design and other Constructor ModulesThe Chart Legend option controls positioning of the legend, e.g. left, right, etc.

    4.5 Status Controller ToolbarThe most commonly used functions are available in the Status Controller toolbar.

    The icons represent Promote, Demote, Edit Status, Remove Status, Status History, Statistical Report and Save Status Layout.

    4.6 Drag and Drop into Graphical ViewThe user can select one or more rows in the Status Controller and then drag and drop them into the 3D View to add them to the drawlist (provided they are suitable object types).12.04:10 2009 AVEVA Solutions Ltd

  • Status ControlStatus Pseudo Attributes and Commands5 Status Pseudo Attributes and Commands

    A number of pseudo attributes are available on controlled objects to return their current status data, and a set of commands are provided to set status data. These provide an alternative to using the object methods described above.

    5.1 Pseudo AttributesThe following pseudo attributes are available on any controlled object.

    Attribute Qualifier Returns Remark

    STVPRO STADEF STAVAL Get the promote STAVAL element for the assigned STADEF

    STVDEM STADEF STAVAL Get the demote STAVAL element for the assigned STADEF

    STVLST STADEF array Get all assigned STADEFs

    STVNUM STADEF integer Get the numerical value for the assigned STAVAL

    STVDSC STADEF string The description of assigned STAVAL

    STVCOM STADEF string The current comment from the latest status command

    STVNAM STADEF string The name of the assigned STAVAL

    STVVAL STADEF STAVAL The current STAVAL for the STADEF

    STVLNK STADEF STALNK Ref to the STALNK element (internal)

    STVASD STADEF array Get all eligible STADEFs, may include currently assigned

    STVTRV STADEF array Get valid transitions from current STVVAL

    STVUNR REF array Get a list of unresolved STAVAL 12.05:1 2009 AVEVA Solutions Ltd

    references from associated STALNKs

  • Status ControlStatus Pseudo Attributes and CommandsThe following pseudo attributes are available on Status Definitions (STADEF).

    The following pseudo attributes are available on Status Values (STAVAL).

    5.2 CommandsSTM 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

    Attribute Qualifier Returns Remark

    STVREF string/number STAVAL Get the STAVAL with the given name or number (NUMVAL)

    STVUSD REF array All elements controlled by this STADEF

    Attribute Qualifier Returns Remark

    STVUSD REF array All elements controlled by this STADEF and with this STAVAL current

    STVPRO STAVAL Get the promote STAVAL element from this STAVAL

    STVDEM STAVAL Get the demote STAVAL element from this STAVAL12.05:2 2009 AVEVA Solutions Ltd

  • Status ControlStatus Pseudo Attributes and CommandsSTM 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.12.05:3 2009 AVEVA Solutions Ltd

  • Status ControlStatus Pseudo Attributes and Commands12.05:4 2009 AVEVA Solutions Ltd

  • Status ControlUsing Status Control with Data Access Control6 Using Status Control with Data Access Control

    Status Control can be tightly coupled with Data Access Control to preserve data integrity. Below are some examples of what can be achieved. They have been created on the basis of Roles where the first PEROP grants all rights on all element and attribute classes, and then successive PEROPs deny some rights under specific conditions.

    6.1 Examples

    6.1.1 Example to Prevent Modification of an Object of a Certain StatusThis 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 Example to Catch when the Dictionary Database has been DeferredThis traps the situation where a user has tried to defeat the access control by deferring the dictionary database containing the status definitions.

    Create a PEROP that denies modify and delete operations on equipment for all attributes if the Design Status is not a valid reference. Here is the condition.

    COND ( BADREF ( ATTRIB STVVAL(ID /DesignStatus ) ) )

    A suitable error message would be: DAC: You may not modify an object with an unresolved status

    6.1.3 Example to Prevent Change of Status after a Certain LevelThis is to allow a user to move an object into a For Check state but prevent them from moving it out. A more privileged user will have the task of promoting it to Checked.12.06:1 2009 AVEVA Solutions Ltd

    Create a PEROP that denies modify and delete operations on STALNK (status link) elements for attribute VALREF (status value reference) if the current value of Design Status is For Check. Here is the condition.

    COND ( ATTRIB OWNER OF VALREF EQ ID /DesignStatus AND ATTRIB DESC OF VALREF EQ 'For Check' )

    A suitable error message would be: DAC: You may not change the Design Status of this object as it is awaiting Check

  • Status ControlUsing Status Control with Data Access Control6.1.4 Example to Prevent Removal of Status from an ObjectThis is to prevent a user from removing status from a controlled object.

    Create a PEROP that denies delete operations on STALNK (status link) elements if they are controlled by Design Status. Here is the condition.

    COND ( ATTRIB OWNER OF VALREF EQ ID /DesignStatus )

    A suitable error message would be: DAC: You may not remove Design Status from this object.

    6.1.5 Example where a User may only Amend StatusThis example illustrates how to prevent a user from making any changes, other than those related directly to status assignment and transition.

    Create a PEROP that grants all operations to the status hierarchy. The PEROP should be applied to the following element type:

    STLNKW HIERARCHY

    This will apply the PEROP to all objects in the status hierarchy. Assign this PEROP (and only this PEROP) to the user.

    This is a positive DAC. It grants access rights to objects. It is therefore not possible to define a specific DAC error message which will be shown if the user tries to carry out a forbidden action (for example an attempt to create an element). A generic DAC error message will be shown in these cases12.06:2 2009 AVEVA Solutions Ltd

  • Status ControlUsing Status Control with Auto Colours7 Using Status Control with Auto Colours

    Status values can be used in the Element Rules for Auto Colours.

    7.1 Examples

    7.1.1 Example Rule for Equipment with Design Status PendingRule Name: Equipment Pending

    Types: EQUI

    Rule: attrib stvnum( /DesignStatus ) eq 0

    7.1.2 Example Rule for Equipment with Design Work Completed or HigherRule Name: Equipment Completed

    Types: EQUI

    Rule: attrib stvnum( /DesignStatus ) ge 50

    7.1.3 Example Rule for Equipment with Design Status Not ControlledRule Name: Equipment Not Controlled

    Types: EQUI

    Rule: badref ( attrib stvval( /DesignStatus ) )

    If these Element Rules are defined, then Auto Colour rules can be added, for example to show completed equipment in green, pending equipment in yellow, and uncontrolled equipment in red.12.07:1 2009 AVEVA Solutions Ltd

  • Status ControlUsing Status Control with Auto Colours12.07:2 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML8 Customising Status Control using PML

    Status Control operations can be carried out using PML. All the operations that can be carried out using the Status Controller can also be done using the appropriate objects and syntax.

    Specific company and project requirements can be implemented using Status Events and a framework is provided for this purpose.

    8.1 Status Events in PMLStatus Control provides an event mechanism that can be customised for individual company and project requirements. User methods can be added as event handlers and will be called with a single array argument. The following events are supported.

    8.1.1 Status Change Events

    Event Description

    BeforeStatusAssign Before a status is assigned to an object

    AfterStatusAssign After a status is assigned to an object

    BeforeStatusRemove Before a status is removed from an object

    AfterStatusRemove After a status is removed from an object

    BeforeStatusChange Before a status is changed/promoted/demoted on an object

    AfterStatusChange After a status is changed/promoted/demoted on an object

    BeforeControlledElementDelete Before a controlled object is deleted12.08:1 2009 AVEVA Solutions Ltd

    Arg No Type Description

    1 STRING Reference number of controlled object

    2 STRING Reference number of status definition

    3 STRING Reference number of from status value (may be =0/0)

  • Status ControlCustomising Status Control using PML8.1.2 Database Change Events

    8.2 Customising the StatusProjectHandler PML ObjectA framework for customising events is provided in the PML object statusProjectHandler.pmlobj in the pmllib\common\objects folder. A global instance of this object is created on entry to the constructor module. It adds the event handlers and has methods for each event.

    8.2.1 Debug ModeThe 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)

    4 STRING Reference number of to status value (may be =0/0)

    5 STRING Return message aborts operation if set but only on Before operations

    Event Description

    BeforeSavework Before savework when there are changes to status data

    AfterSavework After savework when there are changes to status data

    BeforeFlush Before flush when there are changes to status data

    AfterFlush After flush when there are changes to status data

    Arg No Type Description

    1 STRING Reference number of status definition

    2 ARRAY String reference numbers of objects that had status assigned

    3 ARRAY String reference numbers of objects that had status changed

    4 ARRAY String reference numbers of objects that had status removed

    5 STRING Return message aborts operation if set but only on Before operations12.08:2 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML8.2.2 Where to add CodeEach event method processes its arguments and creates some variables that may be of use to the developer.

    Each place where customised code can be added is delimited as follows.

    --========================================================== -- Start of customisation

    -- 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 Methods where you can Add Checks and Abort ChangesAll of the Before methods can be used to make additional checks and can abort the operation by returning an error message, such as to prevent a status change if a particular condition is not met. A variable has been provided for this purpose, e.g.

    !returnMessage = |Status error: You may not delete a controlled object|

    By default, the only check made in the statusProjectHandler is to prevent a general user from deleting a controlled object.

    8.2.4 Methods where you can make Dependent ChangesThe methods AfterStatusAssign, AfterStatusRemove and AfterStatusChange can be used to make dependent changes when one of these operations is completed, e.g. to cascade a change of status on an assembly to its offspring in the assembly hierarchy.

    8.2.5 Methods where you can Synchronise External SystemsThe methods AfterSavework and AfterFlush can be used to synchronise data in external systems once the changes to status data have been committed in the Dabacon databases.

    8.3 Using the StatusData PML ObjectThe 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).12.08:3 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML8.3.1 Members

    8.3.2 Constructors

    Member Type Description

    status ARRAY Holds a single core Status object for internal usage

    statusValue ARRAY Holds a single core AssignedStatus object for internal usage

    element DBREF Model object

    definition DBREF Status definition

    list ARRAY Array of statusData objects for multiple object/definition combinations

    bulk BOOLEAN True if object holds a list of statusData objects False if object holds status information directly

    value DBREF Status value

    valname STRING Status value name

    description STRING Status value description

    number REAL Status value number

    comment STRING Status comment

    steps ARRAY Available transitions as strings

    debug BOOLEAN Debug flag

    refreshMode STRING Refresh mode - None/Part/Full (set to None by default for best performance)

    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 definition12.08:4 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML8.3.3 Methods Intended for the User

    8.3.4 Methods to Assign and Remove Status

    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

    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

    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 )12.08:5 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML8.3.5 Methods to Promote and Demote Status

    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)

    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 comment12.08:6 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML8.3.6 Methods to Set Status

    8.3.7 Internal Methods not Intended to be Called by User

    8.3.8 Example to Set and Get Status DataThe 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.

    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

    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

    getStatus() Internal method to get status data using core object

    queryStatus() Internal method to get status data using queries

    refreshMode( STRING ) Internal method to set refreshMode

    sortSteps() Internal method to return available transitions12.08:7 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML!myStatus = object statusData()!myStatus.assign()!myStatus.promote()!myStatus.print()!currentStatus = !myStatus.description

    8.4 Using the Core Status Objects from PMLAccess to status data is provided via a set of core objects as described below. These require the appropriate import and using namespace commands:

    import 'Aveva.Pdms.DataManagement.PML'handle any -- ignore if already loadedendhandleusing namespace 'Aveva.Pdms.DataManagement.PML'

    8.4.1 Object STATUSMANAGEMENTHolds systems information relating to Status Control. Methods include:

    8.4.2 Object STATUSEVENTSHolds information relating to status events. Methods include:

    8.4.3 Example to Add an Event HandlerThe example gets the available status definitions and sets an event handler for the first definition.

    !statusManagement = object statusManagement()!statusDefinitions = !statusManagement.statuses()!statusEvents = object statusEvents()

    Method Description

    statuses() Returns the available statuses as an array of STATUS

    Method Description

    statusEvents( STRING name of status definition )

    Constructor that initialises for the status definition

    Initialise( STRING name of status definition )

    Initialises for the status definition

    addEventHandler( STRING event name, ANY object name, STRING method name)

    Adds an event for the stored status definition that will call the method on the object12.08:8 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML!statusEvents.initialise(!statusDefinitions[1])!statusEvents.addEventHandler('BeforeStatusChange', !!handlerObject, 'beforeStatusChange')

    8.4.4 Object STATUSRepresents a status definition. Methods include:

    Method Description

    status( STRING name of status definition )

    Constructor

    assign( STRING name of object )

    Assign status to object

    assign ( ARRAY of names of objects )

    Assign status to objects

    assign ( STRING name of object, STRING comment )

    Assign status to object and set comment

    assign ( ARRAY of names of objects, STRING comment )

    Assign status to objects and set comment

    controlledElements() Returns an array of names of objects controlled by this status

    demote( STRING name of object )

    Demote status on object

    demote ( ARRAY of names of objects )

    Demote status on objects

    demote ( STRING name of object, STRING comment )

    Demote status on object and set comment

    demote ( ARRAY of names of objects, STRING comment )

    Demote status on objects and set comment

    description() Returns description of status definition

    initialValue() Returns STATUSVALUE initial value of status definition

    name() Returns name of status definition

    promote( STRING name of object )

    Promote status on object

    promote ( ARRAY of names of objects )

    Promote status on objects12.08:9 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PMLpromote ( STRING name of object, STRING comment )

    Promote status on object and set comment

    promote ( ARRAY of names of objects, STRING comment )

    Promote status on objects and set comment

    remove( STRING name of object )

    Remove status from object

    remove ( ARRAY of names of objects )

    Remove status from objects

    set ( STRING name of object, STRING name of status value)

    Set status on object

    set ( STRING name of object, STATUSVALUE status value)

    Set status on object

    set ( ARRAY of names of objects, STRING name of status value )

    Set status on objects

    set ( ARRAY of names of objects, STATUSVALUE status value)

    Set status on objects

    set ( STRING name of object, STRING name of status value, STRING comment )

    Set status on object and set comment

    set ( STRING name of object, STATUSVALUE status value, STRING, comment )

    Set status on object and set comment

    set ( ARRAY of names of objects, STRING name of status value, STRING comment )

    Set status on objects and set comment

    set ( ARRAY of names of objects, STATUSVALUE status value, STRING comment )

    Set status on objects and set comment

    values() Returns array of STATUSVALUE for this status definition12.08:10 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML8.4.5 Object STATUSVALUERepresents a status value. Methods include:

    8.4.6 Object ASSIGNEDSTATUSRepresents the status link data for an object. Methods include:

    8.4.7 Example to Set and Get Status DataThe example assigns Design Status to an equipment item then promotes it with a comment. Then it gets the status data and returns the status value, description, number and comment. The comment comes direct from the assigned status object, but the other values are via the reference to the status value object.

    !status = object status('/DesignStatus')!status.assign('/E1301')!status.promote('/E1301', 'Ready for checking')!currentStatus = object assignedStatus('/DesignStatus', '/E1301')

    Method Description

    statusValue( STRING name of status definition, STRING valname of status value )

    Constructor

    statusValue ( STATUS status definition, STRING valname of status value )

    Constructor

    description() Returns description of status value

    name() Returns valname of status value

    number() Returns number of status value

    validTransitions() Returns array of STATUSVALUE that are valid transitions

    Method Description

    assignedStatus( STRING name of status definition, STRING name of model object )

    Constructor

    comment() Returns comment from status link

    currentValue() Returns STATUSVALUE status value that status link refers to

    definition() Returns STATUS status definition that status value is owned by

    thisElement() Returns STRING reference number of model object that status link refers to12.08:11 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using PML!valueName = !currentStatus.currentValue().name()!description = !currentStatus.currentValue().description()!number = !currentStatus.currentValue().number()!comment = !currentStatus.comment()12.08:12 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using C# (.NET)9 Customising Status Control using C# (.NET)

    As an alternative to (or in combination with) PML customisation, customisation can also be undertaken in .NET applications. Examples below are given in the C# language.

    9.1 Namespaces and AssembliesThe .NET status objects described below are defined in the Aveva.Pdms.DataManagement.dll assembly, which will be found in the standard PDMS install directory (PDMSEXE). To use these status objects, programmers will need reference to the Aveva.Pdms.Database.dll assembly also found in PDMSEXE. (You may wish to reference other PDMS .NET assemblies - please refer to PDMS.NET documentation for further details.)

    To access this software from Visual Studio, add the assemblies to the project references and declare interest in the namespaces at the top of the client C# files:

    using Aveva.Pdms.DataManagement;using Aveva.Pdms.Database;

    9.2 Classes in .NETThe following classes are available in C#. These correspond to and have similar functionality to the PML objects described above.

    9.2.1 Class StatusManagementThis 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 StatusThis class gives access to a named status definition determined in the constructor either by 12.09:1 2009 AVEVA Solutions Ltd

    name or as a DbElement:

    Status status = Status("/DesignStatus");DbElement statusDefinitionElement;// ...Status status = Status(statusDefinitionElement);

  • Status ControlCustomising 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 StatusValueThis 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);12.09:2 2009 AVEVA Solutions Ltd

  • Status ControlCustomising 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 StatusCommandThis 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 StatusEventsThis 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 12.09:3 2009 AVEVA Solutions Ltd

  • Status ControlCustomising 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 handlerprivate 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:12.09:4 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using C# (.NET)9.2.6 Status Change EventsThe Before event methods can cancel the operation.

    StatusEventArgs

    CancelStatusEventArgs

    9.2.7 Database Change EventsThe Before event methods can cancel the operation.

    Event Arguments

    BeforeStatusAssign object sender, CancelStatusEventArgs e

    AfterStatusAssign object sender, StatusEventArgs e

    BeforeStatusRemove object sender, CancelStatusEventArgs e

    AfterStatusRemove object sender, StatusEventArgs e

    BeforeStatusChange object sender, CancelStatusEventArgs e

    AfterStatusChange object sender, StatusEventArgs e

    BeforeControlledElementDelete object sender, CancelStatusEventArgs e

    Name Type Description

    Model DbElement The element to be controlled

    Status Status The Status object

    From StatusValue The from StatusValue object

    To StatusValue The to StatusValue object

    Name Type Description

    Model DbElement The element to be controlled

    Status Status The Status object

    From StatusValue The from StatusValue object

    To StatusValue The to StatusValue object

    Cancel Bool Cancel the ongoing operation

    Message String With this as the message

    Event Arguments

    BeforeSavework object sender, CancelDBChangeEventArgs e

    AfterSavework object sender, DBChangeEventArgs e12.09:5 2009 AVEVA Solutions Ltd

  • Status ControlCustomising Status Control using C# (.NET)DBChangeEventArgs

    CancelDBChangeEventArgs

    BeforeFlush object sender, CancelDBChangeEventArgs e

    AfterFlush object sender, DBChangeEventArgs e

    Name Type Description

    Status Status The Status object

    Assigned DbElement[] Array of DbElements that had Status assigned

    Changed DbElement[] Array of DbElements that had Status changed

    Removed DbElement[] Array of DbElements that had Status removed

    Name Type Description

    Status Status The Status object

    Assigned DbElement[] Array of DbElements that had Status assigned

    Changed DbElement[] Array of DbElements that had Status changed

    Removed DbElement[] Array of DbElements that had Status removed

    Cancel Bool Cancel the ongoing operation

    Message String With this as the message12.09:6 2009 AVEVA Solutions Ltd

  • Status ControlDistributing Customised Status Layouts10 Distributing Customised Status Layouts

    Individual users can customise and save their own status layouts. This process is described in Status Layout in Status Controller in Design and other Constructor Modules. As an administrator you may decide to create a set of project standard status layouts for all users on the project.

    Status layouts are stored in files in the users Local Settings Application Data folder, for example, for the project BAS the folder will be:

    C:\Documents and Settings\john.smith\Local Settings\Application Data\Aveva\PDMS\BASStatusGridProfiles

    An administrator who has created a set of status layouts in their own folder can copy these files and distribute them to other users to include in their own equivalent folders. There is no need to copy the LastSelectedStatusGridProfile or WindowsLayout files in this folder as these will be created automatically.12.010:1 2009 AVEVA Solutions Ltd

  • Status ControlDistributing Customised Status Layouts12.010:2 2009 AVEVA Solutions Ltd

  • Status ControlUpgrading Model Manager Status Data11 Upgrading Model Manager Status Data

    This section suggests an approach to upgrading status data created by AVEVA Model Manager.

    For Model Manager, the equivalent to a Status Definition is a list of values for a particular controlled object type and is defined in VPE. Individual controlled objects then hold one of these values in a specified attribute, e.g. :mmstatus.

    A Status Definition could be created for each list of values, applied to the particular controlled object type. Where the controlled object type is qualified by a filter, e.g. PIPE with PURP 'Civils', this could be implemented as a UDET, e.g. :CivilsPipe.

    An allowable transition should be set from the initial value to each other value in the definition, to support the next stage (some of these transitions could be removed later).

    A macro would then be written, to loop through each controlled object, assign its appropriate status definition then set it to the equivalent status value for its Model Manager status data.12.011:1 2009 AVEVA Solutions Ltd

  • Status ControlUpgrading Model Manager Status Data12.011:2 2009 AVEVA Solutions Ltd

  • Status ControlIndex

    CChange Events

    Database . . . . . . . . . . . . . . . . . 8:2, 9:5Status . . . . . . . . . . . . . . . . . . . . . . . . 9:5

    ClassStatus . . . . . . . . . . . . . . . . . . . . . . . . 9:1StatusCommand . . . . . . . . . . . . . . . . 9:3StatusEvents . . . . . . . . . . . . . . . . . . 9:3StatusManagement . . . . . . . . . . . . . 9:1StatusValue . . . . . . . . . . . . . . . . . . . 9:2

    Classes.NET . . . . . . . . . . . . . . . . . . . . . . . . . 9:1

    Commands . . . . . . . . . . . . . . . . . . . . . . . 5:2

    LLexicon

    Configuring Status Definitions . . . . . 3:1

    MMethods

    Abort Changes . . . . . . . . . . . . . . . . . 8:3Add Checks . . . . . . . . . . . . . . . . . . . 8:3Assign and Remove . . . . . . . . . . . . . 8:5Dependent Changes . . . . . . . . . . . . 8:3Intended for User . . . . . . . . . . . . . . . 8:5Internal . . . . . . . . . . . . . . . . . . . . . . . 8:7Promote and Demote . . . . . . . . . . . . 8:612.0 2009 AVEVA Solutions Ltd Index page 1

    CustomisingStatusProject Handler PML Object . . 8:2

    DData Model

    Status Control . . . . . . . . . . . . . . . . . . 2:2

    EExample

    Add Event Handler . . . . . . . . . . . . . . 8:8Set and Get Status Data . . . . 8:7, 8:11

    GGraphical View

    Drag and Drop . . . . . . . . . . . . . . . . 4:10

    Set Status . . . . . . . . . . . . . . . . . . . . 8:7Synchronise External Systems . . . . 8:3

    NNamespaces and Assemblies . . . . . . . . 9:1

    OObject

    Assignedstatus . . . . . . . . . . . . . . . 8:11Status . . . . . . . . . . . . . . . . . . . . . . . . 8:9Statusevents . . . . . . . . . . . . . . . . . . 8:8Statusmanagement . . . . . . . . . . . . . 8:8Statusvalue . . . . . . . . . . . . . . . . . . 8:11

    PPML

    Core Status Objects . . . . . . . . . . . . . 8:8

  • Status ControlPML ObjectStatusData . . . . . . . . . . . . . . . . . . . . 8:3

    Pseudo Attributes . . . . . . . . . . . . . . . . . . 5:1

    RReports

    Statistical . . . . . . . . . . . . . . . . . . . . . 4:7

    SStatus

    Controller Toolbar . . . . . . . . . . . . . . 4:10Distributing Customised Layouts . . 10:1Edit Operations . . . . . . . . . . . . . . . . . 4:4History . . . . . . . . . . . . . . . . . . . . . . . 4:6Layout . . . . . . . . . . . . . . . . . . . . . . . . 4:1

    Status ChangeEvents . . . . . . . . . . . . . . . . . . . . . . . 8:1

    Status ControlAuto Colours . . . . . . . . . . . . . . . . . . . 7:1C# . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:1Data Access Control . . . . . . . . . . . . . 6:1Examples . . . . . . . . . . . . . . . . . 6:1, 7:1using PML . . . . . . . . . . . . . . . . . . . . 8:1

    Status ControllerConstructor Modules . . . . . . . . . . . . 4:1Design . . . . . . . . . . . . . . . . . . . . . . . 4:1

    Status EventsPML . . . . . . . . . . . . . . . . . . . . . . . . . 8:1

    WWorkflow

    Example . . . . . . . . . . . . . . . . . . . . . . 2:112.0 2009 AVEVA Solutions Ltd Index page 2

    Status Control1 Introduction1.1 Assumptions1.2 Guide Structure

    2 Example Workflow2.1 Status Control Data Model

    3 Configuring Status Definitions in Lexicon4 Status Controller in Design and other Constructor Modules4.1 Status Layout4.2 Edit Status Operations4.3 Status History4.4 Statistical Reports4.5 Status Controller Toolbar4.6 Drag and Drop into Graphical View

    5 Status Pseudo Attributes and Commands5.1 Pseudo Attributes5.2 Commands

    6 Using Status Control with Data Access Control6.1 Examples6.1.1 Example to Prevent Modification of an Object of a Certain Status6.1.2 Example to Catch when the Dictionary Database has been Deferred6.1.3 Example to Prevent Change of Status after a Certain Level6.1.4 Example to Prevent Removal of Status from an Object6.1.5 Example where a User may only Amend Status

    7 Using Status Control with Auto Colours7.1 Examples7.1.1 Example Rule for Equipment with Design Status Pending7.1.2 Example Rule for Equipment with Design Work Completed or Higher7.1.3 Example Rule for Equipment with Design Status Not Controlled

    8 Customising Status Control using PML8.1 Status Events in PML8.1.1 Status Change Events8.1.2 Database Change Events

    8.2 Customising the StatusProjectHandler PML Object8.2.1 Debug Mode8.2.2 Where to add Code8.2.3 Methods where you can Add Checks and Abort Changes8.2.4 Methods where you can make Dependent Changes8.2.5 Methods where you can Synchronise External Systems

    8.3 Using the StatusData PML Object8.3.1 Members8.3.2 Constructors8.3.3 Methods Intended for the User8.3.4 Methods to Assign and Remove Status8.3.5 Methods to Promote and Demote Status8.3.6 Methods to Set Status8.3.7 Internal Methods not Intended to be Called by User8.3.8 Example to Set and Get Status Data

    8.4 Using the Core Status Objects from PML8.4.1 Object STATUSMANAGEMENT8.4.2 Object STATUSEVENTS8.4.3 Example to Add an Event Handler8.4.4 Object STATUS8.4.5 Object STATUSVALUE8.4.6 Object ASSIGNEDSTATUS8.4.7 Example to Set and Get Status Data

    9 Customising Status Control using C# (.NET)9.1 Namespaces and Assemblies9.2 Classes in .NET9.2.1 Class StatusManagement9.2.2 Class Status9.2.3 Class StatusValue9.2.4 Class StatusCommand9.2.5 Class StatusEvents9.2.6 Status Change Events9.2.7 Database Change Events

    10 Distributing Customised Status Layouts11 Upgrading Model Manager Status Data