Home > DOCUMENTUM > Handling LifeCycles in DCTM using DFC

Handling LifeCycles in DCTM using DFC

April 27, 2010

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

%d bloggers like this: