logo资料库

Aras Innovator开发指南.pdf

第1页 / 共97页
第2页 / 共97页
第3页 / 共97页
第4页 / 共97页
第5页 / 共97页
第6页 / 共97页
第7页 / 共97页
第8页 / 共97页
资料共97页,剩余部分请下载后查看
Send Us Your Comments
1 Introduction
1.1 The Item
1.2 The AML
1.3 Methods and the IOM
2 AML
2.1 Tag
2.2 Tag
2.3 Tags
2.4 Attributes
2.4.1 Item Attributes
2.4.2 Property Attributes
3 IOM Reference
3.1 IOMCredentials Class
3.2 Innovator Class
3.3 Item Class
3.3.1 Base Methods
3.3.2 Boolean Methods
3.3.3 Attribute Methods
3.3.4 Property Methods
3.3.5 File Methods
3.3.6 Relationship Methods
3.3.7 Item Collection Methods
3.3.8 Logical Methods
3.3.9 New Methods
3.3.10 Error Methods
3.3.11 Extended Item Class methods
4 Methods
4.1 Item Actions Extend the Item Class
4.1.1 Context Item
4.1.2 Methods are Item Factories
4.1.3 Handling the Wrong ItemType
4.1.4 Methodology
4.2 Built in Action Methods
4.3 Generic Methods
4.3.1 Context Item
4.3.2 Methods are Item Factories
4.3.3 Methodology
4.4 Server Events
4.4.1 Context Item
4.4.2 Methodology
4.4.3 Available Server Events
4.5 Client Events
4.5.1 Context Item
4.5.2 Form Events
4.5.3 Field Events
4.5.4 Grid Events
4.5.4.1 Row Events
4.5.4.2 Cell Events
4.5.5 Item Type Events
4.5.6 Item Actions and Server Event
5 Action Items
5.1 Client Side Method Rules
5.2 Server Side Method Rules
5.3 Use Cases
5.3.1 Client side - has cache Item is dirty
5.3.2 Client side - no cache Item - no item_query value
5.3.3 Client side - has cache Item not dirty - no item_query value
5.3.4 Client side - has cache Item not dirty - has item_query value
5.3.5 Client side - no cache Item - has item_query value
5.3.6 Server side - has cache Item is dirty
5.3.7 Server side - no cache Item - no item_query value
5.3.8 Server side - has cache Item not dirty - no item_query value
5.3.9 Server side - has cache Item not dirty - has item_query value
5.3.10 Server side - no cache Item - has item_query value
6 Aras Innovator Methodology
7 Cookbook
7.1 Create an Aras Innovator Object
7.2 Create an Item Object
7.3 Query for an Item
7.4 Query and iterate over a set of Items
7.5 Query for an Item and return its configuration
7.6 Query using AML to construct the query
7.7 Query for the Item next promotion states
7.8 Query using relationships as search criteria
7.9 Add an Item configuration in one transaction
7.10 Add a Named Permission
7.11 Set a Private Permission for an Item
7.12 Apply a Generic Method
7.13 Need a missing Namespace
7.14 Need to Save text to a File
7.15 Need to Send Email from a Method
7.16 Need to Add a C# Control
7.17 Need for Speed ApplySQL
7.18 Need a callback for a Relationships Grid Row Event
7.19 Need a callback for a Relationships Grid Cell Event
7.20 Show relationships in a Grid control on the Form
7.21 Show relationships in an Excel component on the Form
7.22 Open the relationships in an Excel Document
7.23 Page Fields on the Form using Tabbar
7.24 Want the Identities for the User
7.25 Want a field to be either a sequence or user entered value
7.26 Want to Vault a File
7.27 Want to get an existing Vaulted File and save it with a new Document
7.28 Want to open a Vaulted File in Word
7.29 Need to reject an Item Promote
7.30 How to build XML for a Grid
Tag
Tag
Tag
Tag
Tag
Tag
Tag
Tag
Tag
Tag
Tag
Tag
Tag
Tag
7.31 How to build XML for a Menu
Tag
Tag
Tag
Tag
Tag
7.32 How to handle multilingual properties
7.33 How to handle date properties
8 .NET Controls
8.1 Grid/TreeGrid/ExcelGrid Control
8.1.1 Initialization from XML
8.1.2 Grid Methods and Events
8.1.3 TreeGrid Methods and Events
8.1.4 ExcelGrid Methods
8.1.5 Cell Methods
8.1.6 ContextMenu Methods
8.2 Menu bar
8.2.1 Initialization from XML
8.2.2 MainMenu Methods and Events
8.2.3 Menu Element Methods
8.3 Workflow
8.3.1 Initialization from XML
8.3.2 Workflow Methods and Events
8.3.3 Workflow Item Methods
8.4 Toolbar
8.4.1 Initialization from XML
8.4.2 Toolbar Methods and Events
8.4.3 Active Toolbar Methods
8.4.4 Toolbar Item Methods
8.5 Structure
8.5.1 Structure Container Methods and Events
8.5.2 Structure Item Methods
8.6 Gantt
8.6.1 Initialization from XML
8.6.2 ProjectTree Methods
8.6.3 Task Methods
8.6.4 Dependency Methods
8.7 Status Bar
8.7.1 Initialization from XML
8.7.2 Status Bar Methods
8.8 Utility Control
8.8.1 Utility Methods
8.8.2 Balloon Methods
8.8.3 Splash Screen Methods and Events
8.9 Other Controls
8.9.1 Tabbar Methods and Events
8.9.2 Calendar Methods and Events
8.9.3 Vault Methods and Events
8.9.4 Color Dialog Method
9 Aras Innovator Solution Studio
9.1 Features
10 Debugging
10.1 Setting up VS.NET 2003 to debug Server side Methods
10.2 Setting up VS.NET 2003 to debug Client side Methods
10.3 Setting up the server side logging
11 External APIs
11.1 .NET IOM
11.2 COM-compatible IOM
11.3 SOAP Requests
12 Was/Is API Comparison
13 AML Schema
Aras Innovator Programmer's Guide Aras Innovator 9.1 Document #: 9.1.002272009 Last Modified: 3/12/2009 Copyright© 2009 Aras Corporation All Rights Reserved.
ARAS CORPORATION Copyright © 2009 Aras Corporation. All rights reserved Aras Corporation 300 Brickstone Square Suite 904 Andover, MA 01810 Phone: 978-691-8900 Fax: 978-794-9826 E-mail: Support@aras.com Website: http://www.aras.com Notice of Rights Copyright © 2009 by Aras Corporation. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, V1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. Distribution of the work or derivative of the work in any standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. Aras Innovator, Aras, and the Aras Corp "A" logo are registered trademarks of Aras Corporation in the United States and other countries. All other trademarks referenced herein are the property of their respective owners. Notice of Liability The information contained in this document is distributed on an "As Is" basis, without warranty of any kind, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose or a warranty of non-infringement. Aras shall have no liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this document or by the software or hardware products described herein. Copyright© 2009 Aras Corporation. All Rights Reserved. Page 2
3 3.1 3.2 3.3 2.1 2.2 2.3 2.4 Table of Contents SEND US YOUR COMMENTS...........................................................................................7 1 INTRODUCTION..........................................................................................................8 THE ITEM..................................................................................................................8 1.1 1.2 THE AML .................................................................................................................9 1.3 METHODS AND THE IOM ..........................................................................................9 2 AML ..............................................................................................................................10 TAG ...........................................................................................................10 TAG ..........................................................................................10 TAGS..................................................................................................10 ATTRIBUTES............................................................................................................11 2.4.1 Item Attributes................................................................................................11 2.4.2 Property Attributes.........................................................................................12 IOM REFERENCE .....................................................................................................14 IOMCREDENTIALS CLASS ......................................................................................15 INNOVATOR CLASS .................................................................................................15 ITEM CLASS ............................................................................................................15 Base Methods.................................................................................................16 Boolean Methods ...........................................................................................16 Attribute Methods...........................................................................................16 Property Methods...........................................................................................16 File Methods ..................................................................................................17 Relationship Methods.....................................................................................17 Item Collection Methods................................................................................18 Logical Methods.............................................................................................18 New Methods..................................................................................................19 Error Methods................................................................................................19 Extended Item Class methods ........................................................................20 4 METHODS ...................................................................................................................21 ITEM ACTIONS EXTEND THE ITEM CLASS ...............................................................21 Context Item...................................................................................................22 Methods are Item Factories...........................................................................22 Handling the Wrong ItemType.......................................................................22 Methodology ..................................................................................................23 BUILT IN ACTION METHODS ...................................................................................23 GENERIC METHODS ................................................................................................24 Context Item...................................................................................................24 Methods are Item Factories...........................................................................24 Methodology ..................................................................................................25 SERVER EVENTS .....................................................................................................25 Context Item...................................................................................................25 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.3.10 3.3.11 4.1.1 4.1.2 4.1.3 4.1.4 4.1 4.2 4.3 4.3.1 4.3.2 4.3.3 4.4.1 4.4 Copyright© 2009 Aras Corporation. All Rights Reserved. Page 3
4.5 4.4.2 4.4.3 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.5.6 5.1 5.2 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 5.3.10 Methodology ..................................................................................................25 Available Server Events .................................................................................26 CLIENT EVENTS ......................................................................................................29 Context Item...................................................................................................29 Form Events...................................................................................................29 Field Events ...................................................................................................30 Grid Events ....................................................................................................31 Item Type Events............................................................................................34 Item Actions and Server Event.......................................................................35 5 ACTION ITEMS..........................................................................................................36 CLIENT SIDE METHOD RULES.................................................................................36 SERVER SIDE METHOD RULES ................................................................................37 USE CASES..............................................................................................................38 Client side - has cache Item is dirty...............................................................38 Client side - no cache Item - no item_query value.........................................38 Client side - has cache Item not dirty - no item_query value ........................38 Client side - has cache Item not dirty - has item_query value.......................39 Client side - no cache Item - has item_query value.......................................39 Server side - has cache Item is dirty ..............................................................39 Server side - no cache Item - no item_query value........................................40 Server side - has cache Item not dirty - no item_query value........................40 Server side - has cache Item not dirty - has item_query value ......................41 Server side - no cache Item - has item_query value ......................................41 6 ARAS INNOVATOR METHODOLOGY.................................................................42 7 COOKBOOK ...............................................................................................................43 CREATE AN ARAS INNOVATOR OBJECT...................................................................43 7.1 CREATE AN ITEM OBJECT .......................................................................................43 7.2 QUERY FOR AN ITEM...............................................................................................44 7.3 QUERY AND ITERATE OVER A SET OF ITEMS............................................................45 7.4 QUERY FOR AN ITEM AND RETURN ITS CONFIGURATION .........................................47 7.5 QUERY USING AML TO CONSTRUCT THE QUERY.....................................................50 7.6 QUERY FOR THE ITEM NEXT PROMOTION STATES ....................................................50 7.7 QUERY USING RELATIONSHIPS AS SEARCH CRITERIA...............................................51 7.8 ADD AN ITEM CONFIGURATION IN ONE TRANSACTION ............................................53 7.9 7.10 ADD A NAMED PERMISSION....................................................................................54 7.11 SET A PRIVATE PERMISSION FOR AN ITEM...............................................................54 7.12 APPLY A GENERIC METHOD....................................................................................55 7.13 NEED A MISSING NAMESPACE .................................................................................55 7.14 NEED TO SAVE TEXT TO A FILE...............................................................................56 7.15 NEED TO SEND EMAIL FROM A METHOD.................................................................57 7.16 NEED TO ADD A C# CONTROL ................................................................................58 7.17 NEED FOR SPEED APPLYSQL..................................................................................59 7.18 NEED A CALLBACK FOR A RELATIONSHIPS GRID ROW EVENT ................................61 Copyright© 2009 Aras Corporation. All Rights Reserved. Page 4
8 8.1 8.1.1 8.1.2 8.1.3 8.1.4 8.1.5 8.1.6 7.19 NEED A CALLBACK FOR A RELATIONSHIPS GRID CELL EVENT................................62 7.20 SHOW RELATIONSHIPS IN A GRID CONTROL ON THE FORM......................................63 7.21 SHOW RELATIONSHIPS IN AN EXCEL COMPONENT ON THE FORM ............................64 7.22 OPEN THE RELATIONSHIPS IN AN EXCEL DOCUMENT ..............................................65 7.23 PAGE FIELDS ON THE FORM USING TABBAR............................................................66 7.24 WANT THE IDENTITIES FOR THE USER.....................................................................68 7.25 WANT A FIELD TO BE EITHER A SEQUENCE OR USER ENTERED VALUE .....................68 7.26 WANT TO VAULT A FILE .........................................................................................69 7.27 WANT TO GET AN EXISTING VAULTED FILE AND SAVE IT WITH A NEW DOCUMENT 69 7.28 WANT TO OPEN A VAULTED FILE IN WORD ............................................................70 7.29 NEED TO REJECT AN ITEM PROMOTE.......................................................................71 7.30 HOW TO BUILD XML FOR A GRID ...........................................................................72 7.31 HOW TO BUILD XML FOR A MENU .........................................................................75 7.32 HOW TO HANDLE MULTILINGUAL PROPERTIES ........................................................75 7.33 HOW TO HANDLE DATE PROPERTIES........................................................................76 .NET CONTROLS.......................................................................................................78 GRID/TREEGRID/EXCELGRID CONTROL.................................................................79 Initialization from XML .................................................................................79 Grid Methods and Events...............................................................................79 TreeGrid Methods and Events .......................................................................79 ExcelGrid Methods ........................................................................................79 Cell Methods ..................................................................................................79 ContextMenu Methods ...................................................................................80 8.2 MENU BAR ..............................................................................................................80 Initialization from XML .................................................................................80 MainMenu Methods and Events.....................................................................80 Menu Element Methods..................................................................................80 8.3 WORKFLOW ............................................................................................................81 Initialization from XML .................................................................................81 Workflow Methods and Events.......................................................................81 Workflow Item Methods .................................................................................81 TOOLBAR ................................................................................................................81 Initialization from XML .................................................................................81 Toolbar Methods and Events .........................................................................81 Active Toolbar Methods.................................................................................81 Toolbar Item Methods....................................................................................82 STRUCTURE.............................................................................................................82 Structure Container Methods and Events......................................................82 Structure Item Methods..................................................................................82 GANTT ....................................................................................................................82 Initialization from XML .................................................................................82 ProjectTree Methods......................................................................................83 Task Methods .................................................................................................83 Dependency Methods.....................................................................................83 8.4.1 8.4.2 8.4.3 8.4.4 8.5.1 8.5.2 8.6.1 8.6.2 8.6.3 8.6.4 8.2.1 8.2.2 8.2.3 8.3.1 8.3.2 8.3.3 8.4 8.5 8.6 Copyright© 2009 Aras Corporation. All Rights Reserved. Page 5
8.8 8.9 11 8.7.1 8.7.2 8.8.1 8.8.2 8.8.3 8.7 8.9.1 8.9.2 8.9.3 8.9.4 STATUS BAR ...........................................................................................................83 Initialization from XML .................................................................................83 Status Bar Methods........................................................................................83 UTILITY CONTROL ..................................................................................................83 Utility Methods...............................................................................................83 Balloon Methods ............................................................................................83 Splash Screen Methods and Events................................................................84 OTHER CONTROLS ..................................................................................................84 Tabbar Methods and Events ..........................................................................84 Calendar Methods and Events.......................................................................84 Vault Methods and Events .............................................................................84 Color Dialog Method.....................................................................................84 9 ARAS INNOVATOR SOLUTION STUDIO ............................................................85 FEATURES ...............................................................................................................85 DEBUGGING...........................................................................................................86 10.1 SETTING UP VS.NET 2003 TO DEBUG SERVER SIDE METHODS...............................86 10.2 SETTING UP VS.NET 2003 TO DEBUG CLIENT SIDE METHODS................................87 10.3 SETTING UP THE SERVER SIDE LOGGING ..................................................................88 EXTERNAL APIS ...................................................................................................89 .NET IOM ..............................................................................................................89 11.1 11.2 COM-COMPATIBLE IOM ........................................................................................90 11.3 SOAP REQUESTS....................................................................................................91 12 WAS/IS API COMPARISON.................................................................................92 AML SCHEMA........................................................................................................95 13 9.1 10 Copyright© 2009 Aras Corporation. All Rights Reserved. Page 6
Send Us Your Comments Aras Corporation welcomes your comments and suggestions on the quality and usefulness of this document. Your input is an important part of the information used for future revisions. Is the information clearly presented? o Did you find any errors? o o Do you need more information? If so, where and what level of detail? o Are the examples correct? Do you need more examples? o What features did you like most? If you find any errors or have any other suggestions for improvement, please indicate the document title, and the chapter, section, and page number (if available). You can send comments to us in the following ways: o Email: Support@aras.com Subject: Aras Innovator Documentation o Postal service: Aras Corporation 300 Brickstone Square Suite 904 Andover, MA 01810 Attention: Aras Innovator Documentation o FAX: 978-794-9826 Attn: Aras Innovator Documentation Or, Or, If you would like a reply, please provide your name, email address, address, and telephone number. If you have usage issues with the software, please visit http://www.aras.com/support/ Copyright© 2009 Aras Corporation. All Rights Reserved. Page 7
1 Introduction The purpose of this document is to provide a Guide to Programming Aras Innovator. It covers key aspects of programming Aras Innovator for implementing your own business logic within the Aras Innovator Enterprise Application Framework. This document is indented to be used as a Desktop Reference and User Guide covering the following topics: • The AML (Aras Markup Language), which is the language that drives the Aras Innovator server. • The IOM (Innovator Object Model), which is the Object API for the AML. • Explains how Methods work and the Methodology for implement your own business logic. • A Cookbook of recipes for performing common tasks. • The .NET controls API the Innovator Client is built on. 1.1 The Item Everything in Aras Innovator is an Item, which is an instance of an ItemType, which itself is an Item; illustrating that Aras Innovator is a self describing system. Don't get hung up on the self-describing nature on Aras Innovator and focus on the simplicity that everything eventually is an Item. Items may have relationships to other Items illustrating that Items has structure. Relationships are defined by RelationshipType, which is an Item that has three properties to define the RelationshipType rule for the source (parent) Item, related (child) Item, and relationship Item, which defines. When the RelationshipType is created an "is_relationship" ItemType is also created named the same as the RelationshipType and its id is the value to the relationship_id Property on the RelationshipType. This can get a bit confusing but simply put there is a RelationshipType/ItemType pairing to define the RelationshipType rule and an ItemType to store the relationship Items. Relationship Items have a related_id Property of type Item, which is the related (child) Item for the relationship. The related_id Property is a link that points to an Item. The relationship Item also has a source_id Property of type Item and is the source (parent) Item for the relationship. So, in Aras Innovator everything is an Item, and Items may have relationships, which are Items that has source and related Item Properties forming an Item configuration. For example, an ItemType Item has Property relationships and this Item configuration maps directly to the relational database for persistent storage of the Item instances. Every ItemType has a matching relational TABLE where the Property names are the COLUMN names. Copyright© 2009 Aras Corporation. All Rights Reserved. Page 8
分享到:
收藏