Sunteți pe pagina 1din 122

1

© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL – Matrix Query Language

Sudheer PS
Aug 28, 2012

2
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Agenda

1 Introduction to MQL

2 MQL For Business Admin

3 MQL For Matrix Users

4 MQL For System Admin

3
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction: Prerequisites

The trainee should:


• Have knowledge about Matrix basics
• Have knowledge about database concepts

4
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

What is MQL?
• MQL is Matrix Query Language
• MQL consists of set of statements that help the administrator to set up and test a Matrix
database
• Can be used to add/extract information from a Matrix database
• MQL supports scripting
• You can write MQL Scripts and run them in batch mode

5
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

MQL Modes
There are three modes in which an MQL statement can be executed:
• Interactive Mode
• Script Mode
• Tool Command Language Mode (TCL)

6
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Interactive Mode
• One statement at a time is entered in the MQL command line interface
• Useful only when you have few MQL commands to be executed
– Can be used to inspect the database
– Can be used for any small database operations like creating a single user, changing a single
object data

7
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Script Mode
• A series of MQL statements are executed
• The statements are contained in a external file called ‘script’ file.
• This script file is accessed from the MQL command line
• The interface reads the file, line by line, and processes the statements

Script Mode Advantages


• You have a written record of commands executed
• You can use the features of your text editor for building the scripts
• Useful in database replication when you use multiple instances
• Easy to test and debug as you have a record of commands in hand

8
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Tcl/Tk Mode
• TCL is a universal scripting language
• A TCL interpreter is in-built in MQL Application
• TCL has common programming features like:
– Variable declarations
– Flow control
– Condition testing
– Procedures
• Tk is toolkit used for building the UI for TCL/Tk
• TCL is a interpreter available in various platforms (Unix, Windows & Mac)
• Having MQL Commands embedded with TCL Scripts, it helps the developers for:
– Rapid development
– Platform independence
– Integration support
– User convenience
9
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Accessing MQL
• The following are the different ways to launch MQL in your system:
– Launch by using the start menu MQL Icon
– Launch by clicking the MQL application from Matrix installed directory
– Launch from run window (Windows key + R)
• If you are working on Unix platform:
– Got to the Matrix installed directory and type:
– ./mql.sh

10
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Accessing MQL
MQL Prompt:
Menu

Executed
Statements

Command
Line

11
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Using MQL
Using MQL window:
• Do not use ‘clear all’. This will empty your database..!!!!
• Changing the background color, font color can be done using the preferences menu
• Use  and  to get the previously used MQL commands
MQL Command Line options
The following are the options you can use in the MQL Command Line:
• -b <FILENAME>
– FILENAME is the bootstrap file name using which this MQL session need to be s
tarted
• -c “command1;command2”
– command1, command2 are the MQL statements
• -d
– Suppresses the MQL window
12
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

MQL Command Line options...


The following are the options you can use in the MQL Command Line:
• -v
– works in verbose mode
• -stdout:filename
– redirects mql output to a file
• -stdin:filename
– Reads MQL input from the given file
• -stderr:filename
– Redirects MQL errors to the given file

13
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

MQL Command Vs MQL Script


• An MQL command is called as statement
• All statements perform an action within the Matrix database
• An action done by a MQL statement might be one of the following:
– Defining a new structure within the database
– Modifying the existing structure
– Insert or update data
• A MQL Script is an external file that contains a list of MQL statements
• The following are the steps to create your MQL script:
– Open any text editor
– Type the list of MQL statements that need to be executed in order
– Save the text as ‘Test.mql”
– Open MQL prompt and invoke the script file by specifying its name with the path

14
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

MQL Command Vs MQL Script

15
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Writing a MQL Statement


Writing MQL statement in interactive mode
• Open MQL and type the command:
– MQL <#> <your statement>;
– words in the statement are separated by space, tab or single carriage retur
n
– All statements begin with a key word
– NAMES, VALUES must be inside double quotes if they have space in them
between words
– Statement should end with semicolon ‘;’

16
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Two important MQL Statements


Quit
• Used to terminate the current MQL session and return the control to the operating sys
tem
• Syntax:
– MQL <#> quit [INTEGER];
– Where INTEGER is the return code. This will be used only when the ‘quit’ i
s used in procedures
– To quit from the current MQL session you have to just type the word ‘quit’

17
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Two important MQL Statements...


Help
• Used to get the command line help for various Matrix commands
• Syntax:
– MQL <#> help [MQL_CATEGORY];
– You can type ‘help all’ to get the entire help from the system
– Where MQL_CATEGORY is one
of the following:

18
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Two important MQL Statements...

19
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Writing an MQL Script


•Scripts are useful when you do bulk update to the database
•After saving the MQL statements in the script file use the following command for running
it:
– MQL <#> run FILE_NAME;
– FILENAME – Name of the script file
•Comments can be given in the script file using the ‘#’ character
– # This is the comment

20
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Creating a New Matrix database


The following are the steps to create a new Matrix database
• If you want to clear an existing schema and create the database, give the following
command:
– MQL <#> clear all;
– The above command clears the entire database, you should be a system
administrator to execute this command
• If you have a fresh schema set up the bootstrap

21
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Creating a New Matrix database...


• After pointing the bootstrap, first you need to run the script which generates the busi
ness definitions in the Matrix database
• This process is also called as ‘Schema Generation’
• After generating the schema, run the script which can generate the data
• After generating the business objects (data) you can run the connect scripts to mak
e relationships available between the objects

22
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
Setting up the context
• The first step to be done in the MQL prompt is setting up your context
• The following is the command used to set the context:
– MQL <#> set context user <USERNAME> password <PWD> vault <VAULTNAM
E>;
– USERNAME is the user’s identification in the Matrix database
– PASSWORD is the user’s secret word used for authentication
– VAULTNAME is the name of the vault to which the user is currently logging i
n

23
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
Pushing/popping the context:
• The context once set can be pushed to another context (context inside a context)
• The following is the statement used:
– MQL <#> push context user <USERNAME> password <PWD> vault <VAULTNA
ME>;
– This technique is widely used in trigger programs to do some operations as a sup
er user mode
• The following is the statement used to pop the context:
– MQL <#> pop context;

24
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
More on Pushing/popping the context

Context 1

Context 2

Context 3

25
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
Add statement
• To add any business definition to the Matrix database, use the following statement:
– MQL <#> add ITEM ITEM_NAME <keyword value>;
– Where ITEM is:

26
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
Modify statement
• To modify any business definition to the Matrix database, use the following statement:
– MQL <#> modify ITEM ITEM_NAME <keyword value>;
– Where ITEM is:

27
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
List statement
• To get a list of any business definition from the Matrix database, use the following stat
ement:
– MQL <#> list ITEM ITEM_NAME;
– Where ITEM is:

28
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
More on List statement
– MQL <#> list ITEM ITEM_NAME [modified after DATE | NAME_PATTERN] select
[SELECTABLE] dump [RECORDSEP] tcl output [FILENAME];
– Eg.:
MQL <2> list attribute U* select name description type dump |;
The above command will return all the attributes which has name starts with ‘U’ a
nd selects their name, description, type and prints the result on the screen as a p
ipe delimited string.
MQL <3> list attribute modified after “May 10, 2004” U* select name;

29
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
Print statement
• To get information about one specific item, the print statement is used
• The following is the syntax:
– MQL <#> print ITEM ITEM_NAME;
– Where ITEM is:

30
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
Delete statement
• To delete a business definition from the Matrix database this statement is used
• When delete an item its association to other items are automatically broken
• The following is the syntax:
– MQL <#> delete ITEM ITEM_NAME;
– Where ITEM is:

31
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
Usage of ‘tcl’ clause
• The ‘tcl’ clause can be used in the following MQL statements:
– print
– list
– expand
– temp query
• The advantage of using the ‘tcl’ clause is the result will be returned in the tcl list format
• The result would be flexible to do string parsing
• This can be used when you write MQL statements embedded inside a TCL program

32
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

General Syntax
Usage of ‘tcl’ clause...
• The following example illustrates the usage of tcl clause:
– MQL <2> print type Part select name description dump;
– The result without ‘tcl’ clause for this query would be:
– Part,an inventoried item that may be made up of other items
– The result with ‘tcl’ clause for this query would be:
– {{{Part}} {{an inventoried item that may be made up of other items}}}

33
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Case Sensitivity
•MQL is NOT case sensitive relative to commands and keywords.
• The following statements are equivalent:
– VERBOSE ON;
– verbose on;
•MQL IS case sensitive relative to business object names.
• The following statements are NOT equivalent
– add vault Engineering;
– add vault engineering;

34
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Introduction to MQL

Exercise...
• Launching MQL
• Changing the font color, background color
• Changing the font settings
• Use all command line options
• Use Help command
• Use quit command
• Use list statement
• Use print statement
• Find out which is the default context and try to setup new context as ‘creator’

35
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

MQL For Business Admi


n

36
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Business Administration
• MQL is used to do business administration of a Matrix database
• Business administration involves the following activities:
– Creating new business definitions
– Modifying the existing business definitions if there is a change in business requirement
– Deleting the existing business definitions when they become obsolete
• Business administration can be done using the Matrix Business Modeler also
• MQL supports all the features of Business Modeler in a query language format

37
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Business Administration
• The user ‘creator’ is the super user in the system
• He is both system and business admin
• The system admin access overrides all the other access control setup
• The user ‘guest’ is a normal user
• To do business administration the user must be defined as a ‘Business Admin’ in busines
s modeler
• The user ‘creator’ can create new users and make new business/system administrators

38
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Business Administration

39
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Access Control
• The following are the admin objects in Matrix that control access:
– Person
– User Categories (Groups & Roles)
– Policies
– Rules
• Apart from these four admin objects, the user can get access to a business object as a ‘
Grantee’

40
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Access Control: Person


• The person definition in business modeler gives the following two kinds of access control
:
– Access (access to business objects)
– Administration access (access to admin objects)
• The access to admin objects is given only for Business/System administrators
• This can be utilized to share the responsibilities among different persons

41
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Access Control: Person

42
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Access Control: Person

43
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Access Control: Roles, Groups & Associati


ons
• Groups: A collection of people who work on a common project, have a common history,
or share a set of functional skills.

• Roles: A collection of people who have a common job type: Engineer, Supervisor, Purch
asing Agent, Forms Adjuster, and so on.

• Association: A collection of groups, roles, or other associations.

44
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Access Control: Policies & Rules


• Policy provides fine grain access restriction to a business object to the user, role, group
• Using the policy you can setup state level access control for a business object
• The user should have atleast ‘read’ access to find the object in the Matrix Navigator
• Rules can be used to control access for a attribute, relationships, programs
• When you setup a access rule on a attribute it reflects in all the places wherever the att
ribute is used
• After checking the policy level access to the user, the system checks whether any rules
preventing the user

45
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Access Control: Policies & Rules...


• Rules are used to take away the access not to add access to a business object
• Also rules are helpful in controlling access over relationships
• For example, a policy might allow all users in the Engineering group to modify the prop
erties of Design Specification objects when the objects are in the Planning state
• But you could create a rule to prevent those users from changing a particular attribute o
f Design Specifications

46
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Access Precedence Flow Chart

47
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

System-wide password settings


• Setting the system wide password settings:
– System admin can set up password settings which can be enforced system wide
– Following is the MQL command:
• MQL <#> set password PASSWORD_ITEM [PASSWORD_ITEM];
• Where, PASSWORD_ITEM can be one of the following:
– Minsize, Maxsize
– Lockout
– Expires
– Allowusername
– Allowreuse, mixedalphanumeric

48
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

System-wide password settings...


• Example:
– MQL <2> set password minsize 3 maxsize 6 lockout 3 expires 30 !allowusernam
e !allowreuse mixedalphanumeric;
– The above command will enforce the following password rules over all the users i
n the system:
– The password should have minimum 3 and maximum 6 chars
– The user can enter wrong password only 3 times
– The password expires in 30 days
– The password cannot be same as the user name
– The password cannot be reused
– The password should be a mixture of numbers and alphabets

49
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Persons


• A person is someone who uses any Matrix application
• Business administrator is responsible for maintaining the person details in the business
modeler
• The person definition has the following information about him:
– User Id, Full Name, Comment
– Address, Phone, Fax, Email
– Enable email/icon mail facility
– Default vault/site
– Privileges
– Assignments (Groups & Roles)

50
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Persons


• The following is the query to create a person admin object:
– MQL <3> add person Neo;
• The above statement creates a person named ‘Neo’ and setup the following:
– Name as Neo
– Icon Mail enabled
– No password
– Makes the user as ‘Application User’, ‘Full User’
» ‘Application User’ – can login only using MQL
» ‘Full User’ – Normal user

51
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Persons


• The following is the query to create a person admin object:
– MQL <3> add person Neo1
fullname "Neo Anderson"
address "The Matrix"
phone "00101101011"
fax “0011001001101”
email "neo@thematrix.com"
enable email password "trinity"
type business,system,trusted,inactive
admin attribute,vault;

52
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Groups


• Groups are the user category grouped based of a common property among them
• Groups can have the following:
– A Parent Group
– A default site
– Child groups
– Assignments (Person names)
• Following is a sample statement to create a group:
– MQL <4> add group “Distribution Group”;
• The above command will create a blank group
• You can add assignments also after creating it

53
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Groups


• Example:
– MQL <2> add group “Release Distribution” parent “Distribution Group” assign pers
on “Neo”;
• The above statement adds a group called “Release Distribution” as a child of “
Distribution Group”
• Assigns a person Neo to the group “Release Distribution”

54
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Roles


• Roles are created and assigned based on the job type of the users
• Roles can have the following:
– A Parent Role
– A default site
– Child roles
– Assignments (Person names)
• Following is a sample statement to create a role:
– MQL <4> add role “Design Engineer”;
• The above command will create a blank role
• You can add assignments also after creating it

55
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Roles


• Example:
– MQL <2> add role “Senior Design Engineer” parent “Design Engineer” assign pers
on “Neo”;
• The above statement adds a role called “Senior Design Engineer” as a child of
“Design Engineer”
• Assigns a person Neo to the role “Senior Design Engineer”

56
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Associations


• Associations of combination of Groups, Roles & Persons
• When there is a situation to combine various roles, groups and persons you can use as
sociations
• Associations can have the following:
– Name
– Description
– Definition
• Following is a sample statement to create a association:
– MQL <4> add association “Engineering-Distribution”;
• The above command will create a blank association

57
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Associations


• Example:
– MQL <2> add association "Distribution-Engineering" definition '"Release Distributio
n" && "Senior Design Engineer"';
• The above statement adds a association called “Distribution-Engineering”
• This association will have the combination of group “Release Distribution” and “
Senior Design Engineer”

58
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Attributes


• Attribute is any characteristic that can be assigned to a object or relationship
• Attributes are the very basic admin objects used in the Matrix database
• An attribute can have the following information:
– Name, description
– Type [integer, real, date, string, boolean]
– Default value
– Rule name
– Range values
– Modify trigger
– Multiline

59
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Attributes


• Example:
MQL <1> add attribute “Effectivity Date”
description “Attribute to store the Engineering Effectivity Date of Part”
type date;
MQL <2> add attribute Color
description “Color of the product”
type string
range value Red
range value Blue;

60
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Attributes


• Example:
MQL <3> add attribute Length
description "Length of the product“
type real trigger modify
action “emxNotifyProgram"
input “Design Engineer";

61
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Types


• Types are the admin objects that defines what kind of data you are going to store in the
Matrix database
• Types in Matrix support inheritance
• A type can be defined as abstract
• The following are the information a type can have in Matrix:
– Name, Description
– List of attributes
– Derived from a super type
– Abstract type
– Methods and triggers

62
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Types


• Example:
MQL <1> add type Specification
description “Used for creating Specification objects”
attribute “Originator”, “Reviewer”
trigger modifyattribute action “NotifyReviewer
.tcl” input “Specification object has been modified”;

63
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Relationships


• Relationships are created between types in Business Modeler
• They can be instantiated as connections between the business objects in the Matrix na
vigator
• A relationship can have the following information in its definition:
– Name, Description
– List of attributes associated
– Triggers
– From and To type names
– Prevent duplicates property

64
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Relationships


• Example:
MQL <1> add relationship "Has Specification"
description “Relationship between Parts and Specifications”
from
meaning "Specification"
type "Specification"
cardinality one
revision replicate
to
meaning “Product”
type Product
cardinality many
clone float;

65
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Formats


• Formats are user defined file formats used during the check in operation in Matrix
• Formats are used to segregate the files inside a business object after check in
• A format can have the following information:
– Name, Description
– Creator name (Mac OS related attribute)
– Type name (Mac OS related attribute)
– Editing program name
– Printing program name
– Suffix, mime type, version
– Viewer program name

66
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Formats


• Example:
MQL <34> add format Text
description “For Text files”
suffix “.txt”
view “Notepad.exe”
edit “Notepad.exe”;

67
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Policies


• Policy gives the life cycle to the business object
• Policy has the access privileges in each state and business rules defined for promoting
or demoting the business object
• Policy has the following information defined in its definition:
– Name, Description
– Sequence number for the business object revisions
– Store name
– Governed types
– Allowed formats
– State details

68
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Policies


• A policy can have one or more states
• A state in the policy has the following information defined in its definition:
– Name
– Versionable, Revisionable, Promote, Checkout History
– Access for Owner, Public, User (This can be a Person, Role, Group or Association)
– Triggers
– Events
– Signatures

69
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Policies


• Following are the list of triggers that can be associated to a poli
cy state:

70
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Policies


• Following are the list of events available for a state in the policy
:

71
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Policies


• Example:
MQL <2> add policy “Specification”
description “For Specification Objects”
type Specification
format MSWord
defaultformat generic
enforce
sequence 1,2,3...
store “HCC Store”;

72
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Policies


• Example:
MQL <2> mod policy “Specification”
add state Create
check "emxProgramTriggerNotifyMembers.tcl" input "Notification"
action "emxProgramTriggerNotifyMembers.tcl" input "Notification"
notify message "This is the notify message"
add notify "Release Distribution"
route message "This is the route message"
add route "Release Distribution“
owner all
public read, show
user "Design Engineer" promote, demote;

73
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Programs


• A program is an object created by a Business Administrator to execute specific comma
nds
• A program can be written in TCL or JPO
• A program can have the following information:
– Name, Description
– Type [Java, MQL, External]
– Execute [immediate or differed]
• Example:
MQL <2> add program emxTriggerNotify.tcl mql file “c:\\emxTriggerNotify.tcl”;

74
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Working with Rules


• Rules are used to limit the access to some specific attributes, relationships, programs
• A rule can have following information:
– Name, Description
– Owner access
– Public access
– User access

75
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Case Study
• Build a Project Management System
– Able to manage Projects with the following information:
• Name, Start Date, End Date, Project Manager, Project Members, Description,
Revision
• Life cycle:
– Create, Design, Build, Implement, Review, Archive
• Task Management
– Start Date, End Date, Percentage Completion
– Create, Assigned, WIP, Completed
• Project Document
– Reviewer Name, Comments
– Create, Review, Release
• Roles: Project Manager, Project Member, Project Reviewer

76
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Case Study

Task
Project
Has Tasks -Start Date : Date
-Start Date : Date -End Date : Date
-End Date : Date -Percentage Completion : Integer
1 *

1
Has Member 1
Has Documents

*
*
Project Document
Person -Reviewer Name : String
-Handphone Number : Integer -Comments : String
-Location : String

77
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Business Admin

Case Study
• Policy creation
– Project
• Create, Design, Build, Implement, Review, Archive
– Task
• Create, Assigned, WIP, Completed
– Project Document
• Create, Review, Release
– Person
• Active, InActive

78
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL for Matrix Users

MQL For Matrix Users

79
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Matrix Users
• MQL can be used by normal users for doing database operations
• We can use MQL in Matrix to create/update/delete the data
• The user should have the following privileges:
– User should be atleast an ‘Application User’ to use MQL
– User should be a ‘Active’ user
– User should be have appropriate access privileges defined in Person/Policy definition to do t
he desired operation
• Each and every action of the user is recorded in the business object history

80
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Matrix Users
• The operations of a Matrix users can be broadly classified as follows:
– Searching/Viewing/Reading business objects
– Creating/Updating/Deleting business objects
• About Searching/Viewing/Reading:
– Searching is done using a Query (User should have access to Matrix database using MQL)
– Viewing is finding out the object’s Type, Name & Revision (User should have ‘show’ access)
– Reading is opening the business object for reading its various properties (User should have ‘
Read’ access)

81
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Matrix Users
About Creating/Updating/Deleting business objects
– Creating can be one of the following:
– Creating a new business object (Create access)
– Creating a revision of a business object (Revise access)
– Creating a clone of a business object (Clone access)
– Updating can be one of the following:
– Changing the object basics (ChangePolicy, ChangeVault, ChangeType, Change
Name, ChangeOwner)
– Changing the object attributes (ModifyAttribute, ModifyDescription)
– Changing the object state (Promote, Demote, Approve, Reject)
– Checking in/ deleting files (Checkin, Checkout)
– Connecting/Disconnecting objects with each other (Connect, Disconnect)

82
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Matrix Users
About Creating/Updating/Deleting business objects
– Updating can be one of the following:
– Locking/ Unlocking the business object (Lock, Unlock access)
– Granting/ Revoking a business object to other users (Grant, Revoke access)
– Executing a method of the business object (Execute access)
– Deleting can be one of the following:
– Deleting a business object completely from the database (Delete access)

83
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Searching/ Viewing
Searching a business object
• Using list statement
• Using Queries
– Stored Queries
– Temporary Queries
• A business object can be found out by a person only if he has ‘show’ access
• Matrix keeps the history of the previously searched patterns
• Result of a query is returned as a String
• This result can be parsed using TCL

84
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Searching/ Viewing...
Using List statement
• Syntax:
– MQL <#> list bus [vault VAULT_NAME];
• Example:
– MQL <1> list bus vault “HCC Vault”;
– The above command will give a list of all the objects from the vault “HCC V
ault”
– If the vault name is not given, the system shows all the objects from the us
ers current vault

85
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Searching/ Viewing...
Using Queries (Stored)
• Syntax:
– MQL <#> add query NAME bus TYPE NAME REVISION vault VAULT_NAME o
wner OWNER_NAME where ‘[WHERE EXPRESSION]’;
– TYPE – Object type name (Wildcard supported)
– NAME – Object name (Wildcard supported)
– REVISION – Object revision (Wildcard supported)
– VAULT_NAME – Name of the vault to search the object
– OWNER_NAME – Name of the object owner
– The stored queries are user specific
– Use ‘list’ statement to find out the stored queries in your context

86
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Searching/ Viewing...
Using Queries (Stored)
• Example:
– MQL <1> add query PersonQuery bus Person * * owner “crea*" vault “HCC Vault
";
– The above query can be executed anytime using the statement:
– MQL <2> evaluate query PersonQuery;
– The above query will return all the Person objects from the ‘HCC Vault’ whi
ch are owned by the person ‘creator’

87
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Searching/ Viewing...
Using Queries (Temporary)
• Syntax:
– MQL <#> temp query bus TYPE NAME REVISION vault VAULT_NAME owner O
WNER_NAME where ‘[WHERE EXPRESSION]’ select [SELECTABLES];
– TYPE – Object type name (Wildcard supported)
– NAME – Object name (Wildcard supported)
– REVISION – Object revision (Wildcard supported)
– VAULT_NAME – Name of the vault to search the object
– OWNER_NAME – Name of the object owner
– The temporary queries temporary to the current MQL session of the user
– The query will not be available if the user re login
– The temp query has a ‘where’ clause and a ‘select’ clause

88
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Searching/ Viewing...
Using Queries (Temporary) – Example
• MQL <1> temp query bus Person * * owner “crea*" vault “HCC Vault" where 'originated<"Jan 01, 200
4"‘ select id dump |;
– The above query will return all the Person business objects from the ‘HCC Vault’ which
are created after ‘Jan 01, 2004’ and owned by the user ‘creator’
– Also the statement selects the id of the business object
– The ‘dump’ keyword is used to dump the result in one line
• #search for computers having the Color attribute value as ‘Black’
• temp query bus Computer * * vault ComputerVault limit 10 where 'attribute[Color] == “Black“ ‘ sele
ct dump |;
• # search for computers having more than one harddisk
• temp query bus Computer * * where 'from[ComputerTOHarddisk].attribute[Quantity] > 1‘ select du
mp |;
• # search for computers having monitors of Type ‘flatron’
• temp query bus Computer * * where 'from[ComputerTOMonitor].to.attribute[Type] == "flatron"‘ sele
ct dump;

89
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Creating a new business object
MQL <#> add bus TYPE NAME REVISION vault VAULT_NAME policy POLICY_NAME att
ribute[1,2,...] attribute[1,2,..]value;
Example:
MQL <12> add bus Person Neo –
vault “HCC Vault”
policy Person
description “This is for the person Neo”
“Handphone Number” “01020110”
“Location” “Singapore”;

90
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Creating a revision of business object
MQL <#> revise bus TYPE NAME REVISION to REVISION description “[DESCRIPTION]”
attribute[1,2,3...] attribute[1,2,3...]value;
Example:
MQL <2> revise bus Part PI-00120 A to B description “New Revision” UOM “MM”;
The above command will revise the Part from A to B and sets the new description and th
e attribute UOM value is set to “MM”.

91
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Creating a clone of business object
MQL <#> copy bus TYPE NAME REVISION to NEWNAME NEWREVISION description “[
DESCRIPTION]” attribute[1,2,3..] attribute[1,2,3..]value;
Example:
MQL <23> copy bus Person Neo A to Neo1 A description “New Clone” “City” “Singapore”;
The above command creates a new clone and sets up description as “New Clone” and Cit
y as Singapore.

92
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Updating business object basics/attributes
MQL <#> modify bus TYPE NAME REVISION description “NEW_DESCRIPTION” vault “N
EW_VAULT” policy “NEW_POLICY” attribute[1,2,3..] attribute[1,2,3..]value;
Example:
MQL <2> mod bus Person Neo A description “This is for person Neo” City “Singapore”;
The above statement will modify the business object Neo with the new description and city
. The user should have modify access.

93
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Promoting/ Demoting Business Objects
• Promoting without signatures
– MQL <#> promote bus TYPE NAME REVISION;
• Promoting with signatures
– MQL <#> approve bus TYPE NAME REVISION signature SIGNATURENAME co
mment “COMMENT”;
– MQL <#> promote bus TYPE NAME REVISION;
• Demoting a business object
– MQL <#> demote bus TYPE NAME REVISION;
• Rejecting a business object signature
– MQL <#> reject bus TYPE NAME REVISION comment “COMMENT”;

94
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Promoting/ Demoting Business Objects
• Unsigning a business object signature
– MQL <#> unsign bus TYPE NAME REVISION signature “SIGNATURE_NAME” c
omment “COMMENT”;
• Ignoring a business object signature
– MQL <#> ignore bus TYPE NAME REVISION signature “SIGNATURE_NAME” c
omment “COMMENT”;

95
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Connecting / Disconnecting Business Objects
• Connecting business objects
– MQL <#> connect bus TYPE1 NAME1 REVISION1 [to/from] TYPE2 NAME2 RE
VISION2 relationship [REL_NAME] attribute[1,2,3...] attribute[1,2,3..]value;
– The user should have ‘toconnect’ or ‘fromconnect’ access based on the dire
ction of the relationship
– Ex: connect businessobject Part A-0000101-01 1 to Document Document1
A relationship "Reference Document";
• Disconnecting business objects
– MQL <#> disconnect bus TYPE1 NAME1 REVISION1 [to/from] TYPE2 NAME2
REVISION2 relationship [REL_NAME];
– The user should have ‘todisconnect’ or ‘fromdisconnect’ access based on t
he direction of the relationship
– Ex: disconnect businessobject Part A-0000101-01 1 to Document Docume
nt1 A relationship "Reference Document";
96
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Checking in/ Checking out files
• Checking in a file
– MQL <#> checkin bus TYPE NAME REVISION [unlock] format “FORMATNAME”
[append] “FILENAME”;
• Checking out a file
– MQL <#> checkout bus TYPE NAME REVISION [lock] format “FORMATNAME” f
ile “FILENAME” “DIRECTORYNAME”;
• Example:
– MQL <3> checkin bus Person Neo –format “generic” append “c:\Resume.doc”;
– MQL <4> checkout bus Person Neo – format “generic” file “Resume.doc” “e:\res
umes”;

97
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Locking/ Unlocking business objects
• MQL <#> lock bus TYPE NAME REVISION;
– Locking can be done if the user has lock access. This is to avoid other users to u
pdate the object when one user works on it.
– Locking is useful when it is done during file checkout
• MQL <#> unlock bus TYPE NAME REVISION;
– A locked business object can only be unlocked by the locker

98
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Granting/ Revoking business objects
• MQL <#> modify bus TYPE NAME REVISION grant “USERNAME/GROUPNAME/RO
LENAME” access “ACCESS_MASK” key KEYNAME;
– A business object can be granted to a individual user or for a role/group
– A key name can be given to each grant to identify it during revoke
• MQL <#> modify bus TYPE NAME REVISION revoke “USERNAME/GROUPNAME/R
OLENAME” access “ACCESS_MASK”;
• MQL <#> modify bus TYPE NAME REVISION revoke key KEYNAME;

99
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Granting/ Revoking business objects
• Example:
– MQL <12> mod bus Project Jaguar 1 grant “guest" access read, modify, show ke
y Test;
– The above command gives read, show and modify access to the user “crea
tor” for the business object Neo and keys the grant under the name “Test”
– MQL <23> mod bus Person Neo A revoke key Test;
– Above command revokes the grant name “Test” from the user “guest”

100
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Executing a business object method
• MQL <#> execute bus TYPE NAME REVISION method METHODNAME;
– The above command used to execute a object method
– Methods are defined in the business type
– The user should have ‘execute’ privilege to perform this operation
• MQL <2> execute bus Person Neo – method “CalculateSalary” “Jun 2004”;
– The method “CalculateSalary” can be a TCL or Java method defined in the busin
ess modeler
– The method can have arguments
– The values are passed one by one to the method from the command line

101
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Deleting a business object
• MQL <#> delete bus TYPE NAME REVISION;
– The user should have delete access to do this operation
– When an object is deleted all its connections will be automatically broken
• Example:
– MQL <23> delete bus Person Neo -;
– The above command completely deletes the business object Neo from the
database

102
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Printing a business object
• MQL <#> print bus TYPE NAME REVISION select vault policy owner originated creat
ed format relationship attribute[1,2,3..] output “OUTPUTFILENAME”;
• The user should have read access to the business object
• Example:
– MQL <2> print bus Person Neo – select policy vault originated modified format[g
eneric].file relationship[Employee] attribute[City] dump |;
– MQL <3> print bus Person Neo – select current dump | output “c:/Neo.txt”:

103
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Expanding a business object
• MQL <#> expand bus TYPE NAME REVISION relationship “RELATIONSHIPNAME” s
elect “SELETABLES”;
• Example:
– MQL <12> expand bus Person Neo – relationship “Employee” select relationship
id bus id;
– MQL <12> expand bus Person Neo – relationship “Employee” select relationship
attribute[Role] bus attribute[Department];
– expand bus Part A-0000101-01 1 from relationship "Reference Document";
– expand bus Part A-0000101-01 1 to relationship "Part Revision";

104
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Business Objects


Eval
• Query to count the number of Business Objects of particular Type available in the datab
ase.
• Ex:
• eval expr 'count TRUE' on temp query bus Computer * *;

105
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Transactions


Matrix has two kinds of transactions:
• Implicit transactions
– This is the default transaction mode maintained by Matrix
– Transaction is committed with each and every statement
• Explicit transactions
– This is set by the user explicitly
– The user can commit this transaction after making desired updations to the data
base

106
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with Transactions


Setting explicit transactions:
• To start a new transaction:
– MQL <#> start transaction;
• To end a transaction:
– MQL <#> commit transaction;
• To abort a transaction:
– MQL <#> abort transaction;
• To print the current status of a transaction:
– MQL <#> print transaction;

107
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For Matrix Users

Working with IconMail


• Matrix has a in-built emailing system called ‘iconmail’
• Every matrix user has a iconmail inbox if they have ‘icon mail’ option enabled in their use
r definition
• A business object can be attached and sent to the user using iconmail
• Following is the syntax to send a email:
– MQL <#> send mail bus TYPE NAME REVISION to USER cc USER subject SUBJECT text
CONTENT;
– Where, TYPE NAME REVISION are the business object that need to be sent in the email

108
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

MQL For System Admin

109
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• System administrators can use MQL for maintaining the Matrix database
• Following are the various maintenance operations:
– Maintaining Vaults
– Maintaining Stores
– Maintaining Locations
– Maintaining Sites

110
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Vaults
– Creating a Vault:
• MQL <#> add vault VAULTNAME description “VAULT DESCRIPTION” indexsp
ace “TABLESPACE1” tablespace “TABLESPACE2”;
– Clearing a Vault:
• MQL <#> clear vault VAULTNAME;
– This statement will clear the vault. Do not use this statement when the use
rs are online.

111
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Vaults
– Maintaining a Vault:
• MQL <#> tidy vault VALUENAME commit N;
– As objects are deleted from a vault, storage gaps will occur in the vault dat
abase file
– These gaps represent wasted disk space and can cause an increase in ac
cess time
– MQL provides the tidy vault statement to fix fragmentations in the databas
e file of the vault
– The number N that follows specifies that the command should commit the
database transaction after this many objects have been tidied. The default
is 1000.

112
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Stores
– Creating a Store:
• MQL <#> add store STORENAME description “STORE DESCRIPTION” fcs FC
S_URL type [ingested|captured|tracked] filename [!hashed] path “PATHNAME”
host “HOSTIPADDRESS” protocol “[ftp|file]” port “FTP_PORT” user “FTPUSER
NAME” password “FTPPASSWORD”;
– Adding Locations to a Store:
• MQL <#> modify store STORENAME add location LOCATION_NAME;
– This statement adds the given location to the Store
– Adding locations to the store is needed to setup the File Collaboration Serv
er

113
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Stores
– Maintaining a Store:
• MQL <#> tidy store STORE_NAME;
– This statement is used for maintaining a ‘ingested’ store
• MQL <#> inventory store STORE_NAME;
– This statement is used for maintaining a ‘tracked’ store
• MQL <#> rehash store STORE_NAME;
– This statement is used to rehash a store when it is changed as ‘hashed’

114
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Locations
– Locations are used for Store replication to improve the performance of file service t
o the user from Matrix
– Creating a Location:
• MQL <#> add location LOCATIONNAME description “LOCATION DESCRIPTI
ON” fcs FCS_URL path “PATHNAME” host “HOSTIPADDRESS” protocol “[ftp|fi
le]” port “FTP_PORT” user “FTPUSERNAME” password “FTPPASSWORD”;
– Locations are associated to the Store and a Site during the FCS setup

115
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Sites
– Sites are representing a set of locations
– Sites can be associated to the users to represent their work place
– Following is the syntax to create a Site:
• MQL <#> add site SITE_NAME description “SITE DESCRIPTION” member loc
ation LOCATION_NAME;

116
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Import/Exports
– Both admin and business objects can be exported
– Exporting the database from one place and importing fully to another is possible
– Importing hierarchy is very important as there is lot of interdependencies between t
he objects
– Attached files also can be exported along with the business objects and written into
the same export files
– Or the stores can be separately migrated to a new location

117
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Import/Exports
– MQL <#> export ADMIN_TYPE * [xml] into|onto
file “EXPORT_FILENAME”
exclude “EXCLUDE_FILENAME”
log “LOG_FILENAME”
exception “EXCEPTION_FILE”;
Where,
ADMIN_TYPE is:
admin, attribute, type, format, group, location, person, policy, program, relatio
nship, role, site, store, vault.
Wildcard patterns can be used.

118
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Import/Exports
– MQL <#> export bus * * * [xml]
from vault VAULT_NAME into|onto
file “EXPORT_FILENAME”
exclude “EXCLUDE_FILENAME”
log “LOG_FILENAME”
exception “EXCEPTION_FILE”
!file !relationship !history !state !icon;

119
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Import/Exports
– MQL <#> import ADMIN_TYPE * from
file “EXPORT_FILENAME”
use exclude “EXCLUDE_FILENAME”
use log “LOG_FILENAME”
use exception “EXCEPTION_FILE”
[overwrite] [continue];
Where,
ADMIN_TYPE is:
admin, attribute, type, format, group, location, person, policy, program, relatio
nship, role, site, store, vault.
Wildcard patterns can be used.

120
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
MQL For System Admin

System Administration
• Working with Import/Exports
– MQL <#> import bus * * * to vault VAULT_NAME from file “EXPO
RT_FILENAME”
use exclude “EXCLUDE_FILENAME”
use log “LOG_FILENAME”
use exception “EXCEPTION_FILE”
!file !relationship !history !state !icon;
- Before importing, it is advisable to switch off the triggers if there are any ‘create’ trigg
ers for the importing business object.
MQL <#> trigger off|on;

121
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.
Q&A

Q&A

122
© Xchanging 2008, no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging.

S-ar putea să vă placă și