Archive

Posts Tagged ‘DCTM’

kVisia: Product Overview

March 18, 2015 Comments off

Howdy Users and Buddies,

Today I want to share on kVisia, a product that provides the core functionality to automate, control and deliver an organization’s engineering and enterprise business processes to the desktop or Web. It holds the business rules, executes the XML configurations, builds the business forms, and implements the lifecycles that automate an organization’s business processes.

I think the only Prerequisites that you need to know is , Basic concept of client-server applications and Documentum Architecture.

Let me put it in Content Wise for better understanding with a bit of background of what’s there , what’s missing and how this can be achieved.

  1. Abstract

Today the current era is defined by the terms like data, information, knowledge, wisdom etc. and in this electronic world the difficulty to manage data in abundance has begotten many technologies and one of them is the Documentum.

Documentum is nothing other than a Content Management Tool but its vastness and its ability to cater to almost all sorts of data types available are so rich in itself that these days it is widely used. If we undo the Documentum technically then it gives an edge over the Relational Database Management System by not storing only the Meta data but also storing the content in its native format.

kVisia blends with Documentum to bolster the level and depth of automation which can be achieved by the Documentum alone and this is what this document discusses in detail.

  1. Introduction

kVisia comes of McLaren Software Limited and users need to have a license before using it. McLaren is ISO 9001 certified and it has been accredited Independent Software Vendor for Documentum and FileNet. It has got 360+ customers worldwide and it operates from UK, USA and Switzerland.

In fact kVisia is an Enterprise Engineer product that encapsulates best practices and domain expertise. This is a user configurable application consisting of XML files managed by repository and standardized on a single ECM platform. It is also believed to be powered by Documentum.

For better understanding of the kVisia we can go through the following questions and answers that will help one to identify the need.

How does it help me?

Very quickly configure the user interface and deliver it to the Desktop and Web users.

Is it easy to change?

Very easy, configuration files are stored in the Docbase in XML format.

Configurable interface using objects and tables.

Do the configuration files allow me to control inputs?

Very complex business rules can be enforced via the XML files.

Validations at creation, promotion and check in.

  1. kVisia suite

kVisia suite consists of following three components:

  1. McLaren Studio
  2. McLaren_Core DocApp
  3. McLaren_Foundation DocApp

3.1 McLaren Studio

McLaren Studio provides a user-friendly desktop application that allows users to create and edit XML configuration files that will conform to the rules of the Document Type Definition (DTD).

An XML (eXtensible Markup Language) configuration file is a structured file consisting of many elements. Elements are ordered into a tree structure or hierarchy. Elements may have parent or child elements, and may also contain attributes. An element without a parent element is the highest in a tree structure and is called a root element. Not all of the elements will have child elements.

The structure of a valid XML file is defined in a DTD (Document Type Definition) file. The DTD contains the rules that apply to each XML configuration file; these include the definitions of parent and child elements, element attributes, and how each element can be used

The appearance and behaviour of user dialogs can be modified without the need to change programme code simply by changing settings in the appropriate XML configuration file. A definition of the appearance and behaviour of a dialog is referred to as a “configuration”. A common need, however, is to display different configurations under different circumstances. For example, members of different groups may need to fill in different properties on documents, and the document’s properties may change as it moves from state to state in a lifecycle. The definition of such a scenario is referred to as a “mapping”. When you do not want to differentiate functionality between different groups, lifecycles and states, there is a value called {default} that will apply to all circumstances.

The Actions for which dialogs can be defined using an XML configuration file are:

 New

When the user issues the New command, a customized dialog can be displayed. Commonly deployed features include automatic document numbering, interactive project allocation and any additional attributes (optional or mandatory), which may be required to be stored for the document.

 Properties

A customized Properties dialog can be displayed. Fields can be made editable or read-only as required.

 Import

When the user performs an import, a customized dialog can be displayed which may typically employ features similar to those used in the New dialog.

 Copy

When the user performs a copy and paste action, a customized dialog can be displayed which may typically employ features similar to those used in the New dialog.

 QuickFind

For each document type, a search dialog referred to as QuickFind can be defined and viewed by the user in the Docbase through the McLaren menu. The attributes that can be searched on are configurable and search options such as Between, Greater Than, Containing, etc., can be specified.

 3.2 McLaren_Core DocApp

Having installed kVisia you get two sets of Docapps in the Docbase, one is the McLaren_core and the other one is McLaren_foundation. The McLaren_core Docapp is available to the user of a Documentum repository. It is always suggested that one should have the overview of the additional functionality as a result of the deployment of the kVisia before configuring the product to suit the business need.

As the name suggests McLaren_core Docapp provides the basic functionality like New, Import, Properties, Copy, QuickSearch etc to be configured. As discussed above, we use the XML configuration tool McLaren Studio to configure it.

For each Object Type used in the repository, an XML Configuration File can be created and configured to define the appearance and behavior of the various dialogs for documents of that Object Type. The definition of the appearance and behavior of a dialog is referred to as a configuration, and different configurations can be displayed in different circumstances.

3.3 McLaren_Foundation DocApp

The McLaren_foundation installation enables you to deploy a pre-configured implementation of the Core technology which transforms it into a user application specifically adapted to the engineering environment, providing a ready-for-use engineering repository. It deals with the following configurations:

User Roles that is associated with Menu Systems and User Dialogs that are adapted to those roles.

Object Types for documents and folders.

XML Configuration Files that define the content, appearance and behavior of the New, Copy, Properties, Import and QuickFind dialogs for the supplied Object Types in accordance with the current user’s User Role and the document’s lifecycle and state, including pre-configured, automatically generated document numbering.

Check in dialogs which are specifically adapted for each supplied type of engineering document.

Automated document revision numbering that reflects common design practice. Revision numbers start at 0 and the first issued version is 1, the second 2, the third 3, etc. When a document is checked in for the first time, a numeric value is assigned and incremented each time it is checked in.

  1. Traditional – VB (Desktop) Vs kVisia(Desktop & Web)

Following Comparison lets you know how much flexibility kVisia provides and how much time and effort it saves.

Traditional – VB (Desktop) kVisia (Desktop and Web)
Ø  Obtain VB source code.

Ø  Open VBP.

Ø  Edit GUI.

Ø  Add code to populate list.

Ø  Add validation rules.

Ø  Save source code.

Ø  Compile DLL.

Ø  Create CAB file.

Ø  Open DocApp in Composer

Ø  Edit the component ACX and

replace CAB file.

Ø  Check DocApp back in.

Ø  Not available until next user login.

Ø  Check out XML.

Ø  Edit XML kVisia Studio.

Ø  Add XML tag.

Ø  Specify properties.

Ø  Save and Check back in.

Ø  Change available immediately (no logout required).

  1. Benefits
  • Easy to manage development process as applications are configured via XML using Studio
  • Fast route from innovation to user acceptance
  • Shorter time from design through to development
  • Shorter time to deploy to the business users
  • Reduces development costs
  • Future upgrades are minimised
  • Simple deployment and at a local level of control
  • Speeds up implementation process through rapid configuration

Hope you like the post, Feel free to post your comments and I will reply back to any queries that you have.

Adios , Have a great day ahead…

Handling LifeCycles in DCTM using DFC

April 27, 2010 Comments off

We know how Documentum helps attach a LifeCycle to a document and How to handle its states viz.How to Promote & Demote a Lifecycle state .Let’s try to bring in the same using DFC Concepts.

Attach a LifeCycle to a document in docbase:

public void attachLifeCycle() throws Exception{
IDfSysObject sysObj = (IDfSysObject) idfSession.
getObjectByQualification(“dm_document where
object_name= ‘UniqueDocName’ “);
IDfSysObject procObj = (IDfSysObject)
idfSession.getObjectByQualification(“dm_policy where object_name=
‘LifeCycle Name’ “);
sysObj.attachPolicy(procObj.getObjectId(), “Author”,””);
}

Promote a LifeCycle state of a document inside a docbase:

public void promoteLifeCycle (String State) throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.
getObjectByQualification(“dm_document where
object_name = ‘UniqueDocName’ “);
sysObj.promote(State,false,false);
}

Demote a LifeCycle state of a document inside a docbase:

public void demoteLifeCycle(String state) throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.
getObjectByQualification(“dm_document where
object_name = ‘UniqueDocName’ “);
sysObj.demote(state,false);
}

How to suspend or resume a LifeCycle of a document in Documentum ?

Expire a LifeCycle state of a document in a docbase:

public void expireLifeCycle (String state) throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.
getObjectByQualification(“dm_document where
object_name=’UniqueDocName’ “);
sysObj.suspend(state,false,false);
}

Resume a LifeCycle state of a document inside docbase:

public void resumeLifeCycle (String state) throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.
getObjectByQualification(“dm_document where
object_name=’UniqueDocName’ “);
sysObj.resume(state,false,false,false);
}

Your valuable comments matters , i will work on the same if any tuning to the above piece of snippets is required.

Thank You

Handling Workflows and Tasks in DCTM using DFC

April 26, 2010 Comments off

How can we Start workflows in a docbase using docbase right from getting the attachment document , getting the workflow template , creating a workbuilder to start a workflow ,getting the First Activity,getting the Package Name , Port and Package DocType ,Adding the attachment document to List ,Adding a Package to Workflow Builder and finally how do we view the tasks in INBOX ?

The tried out example below will give you the step by step procedure of starting a workflow in a docbase and viewing tasks in inbox in DCTM using DFC.

Starting workflow in a docbase:

public void startWorkflow() throws Exception {

IDfSysObject sysObj = (IDfSysObject) idfSession. getObjectByQualification(“dm_document where object_name=’Test-Document'”);

IDfProcess process = (IDfProcess) idfSession.getObjectByQualification (“dm_process where object_name=’temp_workflow'”);

IDfWorkflowBuilder builder = idfSession.newWorkflowBuilder(process.getObjectId());

IDfId wfId = builder.initWorkflow();

IDfList startActivityNames = builder.getStartActivityNames();

IDfList startActivities = builder.getStartActivityIds();

String activityName = startActivityNames.getString(0);

IDfId activityID = (IDfId) startActivities.get(0);

IDfActivity activity = (IDfActivity) idfSession.getObject(activityID);

int nPorts = activity.getPortCount();

String InputPortName = null;

String PkgType = null;

String PkgName = null;

for (int j=0; j<nPorts; j++) {

System.out.println( “Port Name: ” + activity.getPortName(j) + “, ” + “Port Type = ” + activity.getPortType(j) );

if (activity.getPortType(j).equals( “INPUT” ) ) {

InputPortName = activity.getPortName(j);

PkgType = activity.getPackageType(j);

PkgName = activity.getPackageName(j);

}
}

IDfList dfList = new DfList();

dfList.append(sysObj.getObjectId());

IDfId wfId2 = builder.runWorkflow();

builder.addPackage(activityName, InputPortName, PkgName, PkgType, null, false, dfList);

System.out.println(“Package added”);

}

Viewing task in inbox:

public void getInbox() throws Exception {

IDfCollection tasks = idfSession.getTasks(“temp”, DfSession.DF_TASKS, “name, date_sent, message “, “task_name”);
try {
while (tasks.next()) {
IDfWorkitem wi = (IDfWorkitem) idfSession.getObject
(tasks.getId(“item_id”));
IDfId queueItemId = wi.getQueueItemId();
IDfQueueItem qi = (IDfQueueItem) idfSession.getObject(queueItemId);
System.out.println(tasks.getString(“sent_by”) +” “+
tasks.getString(“task_name”)+” “+ tasks.getString(“date_sent”)+” “+ tasks.getString(“message”)+” “+ qi.getItemName());
IDfActivity dfActivity=wi.getActivity();
System.out.println(“\tActivity Information : “+dfActivity.getString(“object_name”));
IDfCollection packColl= null;
try {
packColl=wi.getPackages(“”);
while(packColl.next()) {
IDfSysObject sysObj=(IDfSysObject) idfSession.getObject (packColl.getId(“r_component_id”));
System.out.println(“\t Package Information: ” + sysObj.getString(“object_name”));
}

} finally {
if(packColl != null)
packColl.close();
}

// to finish a Task or Workitem
//finishTask(wi);
}

} finally {
if(tasks!=null) tasks.close();
}
}

Handling Virtual Documents using DFC

April 21, 2010 Comments off

Today’s post i will try to put in some useful examples to create and handle Virtual documents and etc in Documentum docbase using Documentum Foundation Classes.

1. Create a virtual document in docbase:

public void createVirtualDocument() throws Exception {
IDfSysObject pSysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 2/log4j.properties”);
IDfSysObject cSysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 1/trace.log”);
pSysObj.setIsVirtualDocument(true);
pSysObj.save();
IDfVirtualDocument vDoc = pSysObj.asVirtualDocument(“CURRENT”, false);
IDfVirtualDocumentNode pNode = vDoc.getRootNode();
pSysObj.checkout();
IDfVirtualDocumentNode nodeChild1 = vDoc.addNode(pNode, null,
cSysObj.getChronicleId(),”CURRENT”, false,
false);
pSysObj.checkin(false, “CURRENT”);
}

2. Export a virtual document from docbase:

public void exportVirtualDocument() throws Exception {
System.out.println(“exporting virtual document”);
IDfExportOperation expOpr = new DfExportOperation();
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 2/log4j.properties”);
if (sysObj.isVirtualDocument()) {
IDfVirtualDocument vdoc = sysObj.asVirtualDocument(“CURRENT”,
false);
IDfExportNode expNode = (IDfExportNode) expOpr.add(sysObj);
expOpr.setDestinationDirectory(expOpr.
getDefaultDestinationDirectory());
boolean flag = expOpr.execute();
}
}

3. View virtual document from docbase:

public void viewVirtualDocument() throws Exception {
IDfSysObject pSysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 2/log4j.properties”);
if (pSysObj.isVirtualDocument() ) {
System.out.println(“virtual document –> true”);
IDfVirtualDocument vDoc = pSysObj.asVirtualDocument(“CURRENT”, false);
IDfVirtualDocumentNode pNode = vDoc.getRootNode();
for ( int i=0;i<pNode.getChildCount();i++) {
IDfVirtualDocumentNode cNode = pNode.getChild(i);
System.out.println("Child Name " +cNode.getSelectedObject().
getObjectName());
}
}
}

4. Retrieve document from documentum using IDQL:

public void collection() throws Exception {
IDfQuery query = new DfQuery();
query.setDQL(“select * from dm_document where object_name=’New Document’
and any r_version_label like ‘CURRENT%'”);
IDfCollection coll = query.execute(idfSession, 0);
while (coll.next() ) {
IDfTypedObject typeObject = (IDfTypedObject) coll.getTypedObject();
System.out.println(“Object Name ” + typeObject.getString(“r_object_id”));
System.out.println(“creation date ” + typeObject.getString(“r_creation_date”));
}
if ( coll != null )
coll.close();
}

Handling Basic Operations in DCTM using DFC

April 20, 2010 Comments off

1.Check out a document from docbase:

public void checkoutDocument() throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 1/Test-Document”);
if (!sysObj.isCheckedOut()) // if it is not checked out
sysObj.checkout();
System.out.println(“is Check out ” + sysObj.isCheckedOut());
}

2.Check in a document to docbase:

public void checkinDocument() throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 1/Test-Document”);
if (sysObj.isCheckedOut()) { // if it is checked out
sysObj.checkin(false,”CURRENT”);
}
}

3.Delete a document from docbase:

public void deleteDocument() throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 1/Test-Document”);
if (sysObj != null ) {
sysObj.destroyAllVersions(); // delete all versions
System.out.println(“object destroyed…..”);
}
}

4.Update document’s metadata\attributes in docbase:

public void updateAttributes() throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 1/New Document”);
sysObj.setString(“object_name”, “New Document”);
sysObj.setString(“authors”, “author1”);
sysObj.setRepeatingString(“authors”,1,”author2″);
sysObj.save();
}

5.Retrieve document’s metadata\attributes from docbase:

public void getAttributes() throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet
Name/Folder Level 1/New Document”);
if (sysObj != null ) {
System.out.println(“objectName ” + sysObj.getString(“object_name”));
//System.out.println(“authors ” + sysObj.getString(“authors”));
String authors = sysObj.getAllRepeatingStrings(“authors”, “,”);
ArrayList list = new ArrayList();
StringTokenizer st = new StringTokenizer(authors, “,”);
System.out.println(“length of st ” + st.countTokens());
while( st.hasMoreTokens()) {
list.add(st.nextElement());
}
System.out.println(“length ” + list.size());
for (int i=0;i<list.size();i++) {
System.out.println("Author["+i+"] " + list.get(i));
}
}
}

Documentum Foundation Classes Examples for Java-Contd.

April 19, 2010 Comments off

Today let us discuss few more examples on DFC.
1. Check out a document from docbase using IDfOperations:

public void checkoutDocument() throws Exception {
IDfCheckoutOperation checkoutOpr = new DfCheckoutOperation();
System.out.println(“Checkout Dir ” + checkoutOpr.getDefaultDestinationDirectory()); checkoutOper.setDestinationDirectory(checkoutOpr.getDefaultDestinationDirectory());
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByPath(“/Cabinet Name/Folder Level 2/ Test-Document”);
IDfCheckoutNode node = (IDfCheckoutNode) checkoutOpr.add(sysObj); boolean flag = checkoutOpr.execute();
}

2.Check in a document to docbase using IDfOperations:

public void checkinDocument() throws Exception {
IDfCheckinOperation checkinOpr = new DfCheckinOperation();
IDfCheckinNode node = (IDfCheckinNode) checkinOpr.add(sysObj);
System.out.println(“Flag —->” + checkinOpr.execute());
}

3.Making use of IAPI methods:

public void dmclAPI() throws Exception {
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByQualification (“dm_document where object_name=’Test-Document'”);
String objId = sysObj.getObjectId().getId();
String name = (String)idfSession.apiGet(“get”, objId + “,object_name”);
System.out.println(“Name :” + name); //idfSession.apiSet(“set”, objId +”,title”,”sample-doc”); idfSession.apiExec(“link”, objId +”,/Cabinet Name/Folder Level 2″);
System.out.println(“Linked ” + idfSession.apiExec(“save”, objId));
}

4.To import a document into docbase:

public void importDocument() throws Exception {
IDfSysObject sysObj= (IDfFolder) idfSession.getObjectByPath (“/Cabinet Name/Folder Level 2”); System.out.println(“Object ID” + sysObj.getObjectId());
IDfImportOperation importOpr = new DfImportOperation();
importOper.setSession(idfSession);
if (importOpr == null ) {
System.out.println(“operation object is null”);
return;
}
importOpr.setDestinationFolderId(sysObj.getObjectId());
importOpr.setVersionLabels(“imported using operation”);
IDfImportNode node = (IDfImportNode) importOpr.add (“C:\\Documentum\\config\\ Test-Document”);
node.setFormat(“pdf”);
boolean flag = importOpr.execute();
}

5.Cancelcheckout a document into docbase:

public void cancelCheckoutDocument() throws Exception {
IDfCancelCheckoutOperation cancelcheckoutOpr = new DfCancelCheckoutOperation();
IDfSysObject sysObj = (IDfSysObject) idfSession.getObjectByPath (“/Cabinet Name/Folder Level 2/ Test-Document”);
IDfCancelCheckoutNode node = (IDfCancelCheckoutNode) cancelcheckoutOpr.add (sysObj); boolean flag = cancelcheckoutOpr.execute();
}

Stay tuned preparing few more examples.

Documentum Foundation Classes Examples for Java

April 18, 2010 Comments off

Today i have to tried to put in some of the examples describing the DFC usage in Documentum.
1.Connecting to the content server docbase and establishing session :

public IDfSession getDfSession (String userName, String password, String docbaseName) throws Exception {
IDfLoginInfo loginInfo = new DfLoginInfo();
loginInfo.setUser(userName);
loginInfo.setPassword(password);
IDfClient client = new DfClient();
IDfSessionManager sessMgr = client.newSessionManager();
sessMgr.setIdentity(docbaseName, loginInfo);
idfSession = sessMgr.getSession(docbaseName);
if ( idfSession != null )
System.out.println(“Session created successfully”); return idfSession;
}

2.Get a list of available docbase:

public void getAllDocbases() throws Exception {
IDfClient client = DfClient.getLocalClient();
IDfDocbaseMap docbaseMap = client.getDocbaseMap();
for(int i=0;i<docbaseMap.getDocbaseCount();i++) {
System.out.println(“Docbase Name : ” + docbaseMap.getDocbaseName(i)); System.out.println(“Docbase Desc : ” + docbaseMap.getDocbaseDescription(i));
}
}
3. Create a cabinet (dm_cabinet object) in docbase:

public void createCabinet() throws Exception {
IDfFolder cabinetObj = (IDfFolder) idfSession.newObject(“dm_cabinet”);
if (cabinetObj != null) {
cabinetObj.setObjectName(“Cabinet Name”);
cabinetObj.save();
}
}

4. Create a folder (dm_folder object) in docbase:

public void createFolder() throws Exception {
IDfFolder folderObj = (IDfFolder) idfSession.newObject(“dm_folder”);
if (folderObj != null) {
folderObj.setObjectName(“Folder Level 2”);
folderObj.link(“/Cabinet Name”);
folderObj.save();
}
}

5. Create a document (dm_document object) in docbase:

public IDfDocument createDocument() throws Exception {
IDfDocument documentObj = (IDfDocument) idfSession.newObject(“dm_document”);
if (documentObj!= null) {
documentObj.setObjectName(“Test-Document”);
documentObj.setContentType(“crtext”); documentObj.setFile(“C:\\Documentum\\config\\dfc.properties”);
documentObj.link(“/Cabinet Name/Folder Level 2”); documentObj.save();
}
return documentObj;
}

%d bloggers like this: