Wednesday, April 16, 2014

Autodesk Vault Programmer's Cookbook. 3.4. Updating group information



Navigation:

|
|


Group updating is extremely similar to its creation. Let's compare a set of methods' parameters of creating and updating the group information.
Let's update group information: If you have to reset roles, vaults, users or groups of current group, it's enough to pass 'NULL' to according parameter of UpdateGroupInfo method. For example, let's deprive a group of users.

Autodesk Vault Programmer's Cookbook. 3.3. Changing groups



Navigation:

|
|

To change the existing groups Autodesk Vault API offers the following methods:
Operation
Object
Method
Name
Add
Group
ToGroup
AddGroupToGroup
ToVault
AddGroupToVault
Groups
ToGroup
AddGroupsToGroup
GroupRole

AddGroupRole
Delete
Group
FromGroup
DeleteGroupFromGroup
FromVault
DeleteGroupFromVault
Groups
FromGroup
DeleteGroupsFromGroup
GroupRole

DeleteGroupRole
Adding/removing groups' membership:

Giving access to users of groups to specific vaults.
Adding/Removing roles of groups.

Autodesk Vault Programmer's Cookbook. 3.2. Adding groups



Navigation:

|
|

Adding of groups is a fairly simple operation - it's enough to make a call of the corresponding method AddGroup. Most problematic in this situation is to obtain all the required parameters, namely roles' and vaults' IDs.

Vaults' IDs can be obtained by their names using the method GetKnowledgeVaultsByNames. Roles' IDs can be obtained by filtering all the objects with required criteria 'Name':
Full source code of program:

Autodesk Vault Programmer's Cookbook. 3.1. Getting groups



Navigation:

|
|


To get groups you have to call one of the Get* -like methods.
Operation Object Method
AllGroups

GetAllGroups
Group ById GetGroupById
ByName GetGroupByName
Groups ByIds GetGroupsByIds
ByNames GetGroupsByNames
GroupInfo ByGroupId GetGroupInfoByGroupId
GroupInfos ByGroupIds GetGroupInfosByGroupIds
ChildGroupIds ByGroupId GetChildGroupIdsByGroupId
MemberGroups ByGroupId GetMemberGroupsByGroupId
ParentGroupIds ByGroupId GetParentGroupIdsByGroupId

The most easy method is GetAllGroups(), that returns all groups. After that you can return all objects, or filter required. In PowerShell filtering is made with Where-Object cmdlet.


Knowing IDs, or group names, we can retreive specific group.

However, the Group class does not store complete information on the group. There is expanding its class GroupInfo. Geting the instances of this class may also be done by using the method invocation.


Since the groups are in certain respects with each other, it makes sense to have access to these relations.

Autodesk Vault Programmer's Cookbook. 3. Groups



Navigation:

|
|

Vault API provides a number of methods for working with groups. They're located in AdminService service. With next pivot table you can get an overview of this methods.
Operation
Object
Option
Name
Add
Group

AddGroup
ToGroup
AddGroupToGroup
ToVault
AddGroupToVault
Groups
ToGroup
AddGroupsToGroup
GroupRole

AddGroupRole
Delete
Group
FromGroup
DeleteGroup FromGroup
FromVault
DeleteGroup FromVault
Groups
FromGroup
DeleteGroups FromGroup
GroupRole

DeleteGroupRole
Get
Group
ById
GetGroupById
ByName
GetGroupByName
Groups
ByIds
GetGroupsByIds
ByNames
GetGroupsByNames
AllGroups

GetAllGroups
Child GroupIds
ByGroupId
GetChildGroupIds ByGroupId
GroupInfo
ByGroupId
GetGroupInfo ByGroupId
GroupInfos
ByGroupIds
GetGroupInfos ByGroupIds
Member Groups
ByGroupId
GetMember GroupsByGroupId
Parent GroupIds
ByGroupId
GetParentGroup IdsByGroupId
Update
GroupInfo

UpdateGroupInfo
To call method
To call the method in relation to a particular group - or groups - enough to know their names or IDs. This information is stored in the class Group. It has next fields:
Name
Description
Auth
The authentication type.
CreateDate
The date the Group was created.
CreateUserId
The Id of the User that created the Group.
EmailDL
The email address (distribution list) for the Group.
Id
The identifier for the object.
IsActive
If true, the Group is active. If false, the Group is inactive.
IsSys
If true, the Group is a system group. If false, the Group is user-defined.
Name
The unique name of the Group.
Group class is inbound for GropInfo class, which has the following fields:
Name
Description
Group
A Group.
Groups
The immediate Groups in the Group.
Roles
The Roles associated with the Group.
Users
The immediate Users in the Group.
Vaults
The Vaults associated with the Group.
Remember this distribution when you're working with groups. It should also be noted that the GroupInfo fields does not return ID objects and references to the objects themselves.






Friday, April 11, 2014

Autodesk Vault Extreme System Administration

You're welcome to group of articles, that probably will help you more comfortable implement, administrate or use Autodesk Vault in some irregular cases.

Please read Introduction first.

1. Introduction
2. Planning
3. Installation


4. Administration


5. Troubleshooting
6. Migrating
7. Back-up

Autodesk Vault Extreme System Administration. Intro

Deploying, management and using of Autodesk Vault are quite stringy, calm, measured and comprehensive processes, extended in time.
In moist cases all roles have clear and straight instructions: users, administrators.
If any non-regular feature or error occurs, then premium support or your system integrator will solve this problem.
But what to do if you have no support , or can't deal with continuous downtime, because this causes large wastage? What if you need fast-deployed, customizable and reliable solutions?

In the articles of this group I suggests you solutions for such irregular cases (full Table of content):
  • Planning
  • Installation
  • Administration
  • Troubleshooting
  • Migrating
  • Back-up
Furthermore you can use this tools if you're:
  • Premium Support Specialist.
  • Having a lot of implementations and would like to do them more fast, quality and optimally.
  • PDM/CAD System Administrator.
  • Very advanced PDM user.
This is not panacea and you can use it only if:
  • Fully understand what every step actually performs.
  • You are understanding risks of harming and loosing data, and taking responsibility for all of them by yourself.
  • You'll check this methods in test-area first, before applying them on working system.
  • Your downtime costs much more than risks of data-harm and data-loss.
  • You have no support agreement, or your support can't give you solution quickly or even at all.
Please keep in your mind:
  • All methods are created for English environment (MS Windows OS, SQL Server, Vault server), unless otherwise noted, and operability for other languages is not guaranteed. Meanwhile I'm trying to create language-independent solutions if possible.
  • All programs are provided with source-code, so you can easy edit it to satisfy you needs. Perform changes carefully and check them in test-area.
  • Some programs are using Autodesk Vault SDK, and some parts of it may be distributes under 'Autodesk SOFTWARE LICENSE AGREEEMENT Autodesk® Vault SDK', according to part '1. Usage of software': "[..] You may use the Software, make unlimited copies of the Software, and give copies the Software to other persons or entities so long as (i) all such copies are used to develop applications for Autodesk products based on the Vault® platform and (ii) all such copies contain this Agreement and the same copyright and other proprietary notices that appear on or in the Software". Anytime, refer to full version of SDK's EULA.
  • If you runs into issues, would like to solve any other issue or would like to get any custom solution you can get in touch with me via Contacts.

Thursday, April 10, 2014

How to catch a rat in Vault

Disclaimer

This article is a part of Autodesk Vault Extreme Administration. Please read Introduction first.

Problem

Someone of your employees is moving files
Actually he's sabotaging engineers' work. We have to catch him.

Solution

Due to the fact that standard logs won't help you, we have to look for some other solution.
All client-server communications are made in XML-format by HTTP protocol. Could this knowledge be usefull for us? Of course!
We just have to watch the conversation and filter that information that will help us to take a decision about who performs certain operations.
The moving of file invokes method of service named MoveFile.
You can catch all calls using web debugger, for example Fiddler.

Discussion

Instructions about how to to catch an illegal file-mover :
  1. Download and install web debugger.
  2. Enable filtering all URL's that contains "MoveFile".
  3. Get the host name. Moving the files were initiated from it.
  4. Parse URL for more information.
Mousetrap for Vault rat (click to enlarge)
URL looks like: 
http://vaultserver/AutodeskDM/Services/v18/DocumentService.svc?op=MoveFile&uid=2&currentCommand=Connectivity.Explorer.Document.MoveShareCommand&vaultName=Vault&sessID=134832402&app=VP

So we can retrieve a lot of interesting information from it:

Part of URL
Description
DocumentService.svc
DocumentService service, see API
op=MoveFile
Operation, API method
currentCommand=
Connectivity.Explorer.
Document.MoveShareCommand
Command name
uid=2
ID of user
vaultName=Vault
name of Vault
sessID=134832402
ID of current session
app=VP
Vault Professional

Conclusion

If you know the names of methods, you can know what's user actually do on server - not just catch him on moving files. A usefull catalog of methods could be fouund in "API structure" chapter of Autodesk Vault Programmer's Cookbook.

From Ukraine with love.