190 likes | 424 Views
Additional Information. Module Objectives. At the end of this module, you will be familiar with: using IDfOperation to work with objects tracing DFC applications additional sources of information about DFC. Topics. IDfOperation Interface Tracing DFC Additional Resources.
E N D
Module Objectives • At the end of this module, you will be familiar with: • using IDfOperation to work with objects • tracing DFC applications • additional sources of information about DFC
Topics • IDfOperation Interface • Tracing DFC • Additional Resources
IDfOperation Interface • The IDfOperation interface implements a number of the same features available through the IDfSysObject interface, such as: • import and export • checkin, checkout and cancel checkout • move, copy and delete • These features have been extended to support more complex operations, such as: • detecting compound documents • updating the local client registry • This is the interface used by the Desktop Client and Intranet Client applications
virtual_doc virtual_doc subdocA subdocB subdocA subdocB Operations and Nodes • An operation may be composed of multiple "nodes" • Each node typically corresponds to a component of the compound object • The specified task will be performed for each node added to the operation
Checkout and Cancel Checkout Using IDfOperation Private Sub cmdCheckout_Click(sess as IDfSession, object_id as String)Dim IdOp As IDfOperation Dim IdChkOp As IDfCheckoutOperation Dim IdCnclChkOp As IDfCancelCheckoutOperation Dim OpNode As IDfOperationNode Dim CheckoutNode As IDfCheckoutNode Dim CancelCheckoutNode As IDfCancelCheckoutNode Dim so as IDfSysObject Dim ret As Boolean If object_id = "" Then MsgBox "Please select an object_id from the Results list" Exit Sub Else Set so = sess.getObjectByQualification("dm_sysobject where r_object_id='" + object_id + "'")
Checkout and Cancel Checkout Using IDfOperation If so.isCheckedOut Then Set IdOp = clientx.getOperation("CancelCheckout") Set OpNode = IdOp.Add(so) Set CancelCheckoutNode = OpNodeCancelCheckoutNode.setKeepLocalFile (False) ret = IdOp.execute If so.isCheckedOut Then MsgBox "Cancel Checkout Failed!" Else MsgBox "Cancel Checkout Suceeded" cmdCheckout.Caption = "Checkout Doc" End If ... 10 11
Checkout and Cancel Checkout Using IDfOperation Else Set IdOp = clientx.getOperation("Checkout") Set OpNode = IdOp.Add(so) ' this provides additional methods to the IDfOperation ' Node for checkout operations Set CheckoutNode = OpNode ' checkout object ret = IdOp.execute If so.isCheckedOut Then MsgBox "Checkout Succeeded" Else MsgBox "Checkout Failed" End If End If ... 12 13 14 15 16
Checkout and Cancel Checkout Using IDfOperation Set id_obj = Nothing Set IdOp = Nothing Set OpNode = Nothing Set so = Nothing Exit Sub End If End Sub 17
Topics • IDfOperation Interface • Tracing DFC • Additional Resources
DFC Tracing • Tracing can be used to list all DFC calls made from an application • Useful for: • debugging • reverse engineering for custom application development
Interpreting DFC Trace Files DFC 0> DfClientX@86::DfClientX() # DfClientX@86 DFC 0> DfClientX@86::getLocalClient() DFC> DfClient::getLocalClient() # DfDMCLCLient@74 # DfDMCLCLient@74 DFC 0> DfDMCLCLient@74::getClientConfig() # com.documentum.fc.client.DfTypedObject@122 DFC 0> DfDMCLCLient@74::getDocbaseMap() # com.documentum.fc.client.DfDocbaseMap@10a DFC 0> DfDocbaseMap@10a::getDocbaseCount() # 7 DFC 0> DfDocbaseMap@10a::getRepeatingString( "r_server_version", 0 ) # "4.0.2d Win32.Oracle" DFC 0> DfDocbaseMap@10a::getDocbaseName( 0 ) # "support" DFC 0> DfDocbaseMap@10a::getDocbaseDescription( 0 ) # "dm_bugs docbase"
Programmatically Enabling DFC Tracing ' DFC Tracing call ' here clientx has already been created as: ' Set clientx = New DFCLib.DfClientX clientx.setTraceFileName ("C:\DFCTrace.txt") clientx.setTraceLevel (6) '**************************************************************** 'example DFC call you are debugging Set dep_asst_list = po.getAttrAssistanceWithValues(attr, dep_list, dep_valuelist) '**************************************************************** ' end of code segment you are debugging ' Turn of tracing clientx.setTraceLevel (0)
Topics • IDfOperation Interface • Tracing DFC • Additional Resources
Documentation • Using DFC in Documentum Applications • DFC JavaDocs and Help Files