Documentum 6.5 and Ruby

We got some questions about the use of Documentum 6.5 and Ruby with ActiveDCTM. My article at EMC Developer site explains the use of Ruby on Documentum 5.3. One of our clients is moving to Documentum 6.5 so we are now testing ActiveDCTM on a CENTOS Linux Oracle environment with Documentum 6.5 sp1.

In Documentum 6 the C/C++ DMCL API has been replaced with the Java‑based DFC API. These core changes, while extremely significant, are largely transparent to the DFC user. C/C++ applications (like DCTMRuby and ActiveDCTM) that interact directly with the DMCL continue to work as a copy of DMCL continues to be provided. New Documentum 6 features are not available through DMCL, however.

Here is a simple example on how to create a document from the IRB customized command line.

The scope of this IRB is changed such that self is the Documentum session. Constants are defined (via const_missing) to get access to the Documentum types.

  • xaop65 is defined with a connection profile in the dmcl.yaml
    [svv@localhost ~]$ dctm-connect.rb xaop65
  • Get the DmServerConfig and access any of the attributes dynamically.
    s0@xaop65:001:0> DmServerConfig.first.r_server_version
    "6.5.0.117 SP1 Linux.Oracle"
  • Create a document
    s0@xaop65:003:0> doc1 = DmDocument.new :object_name => "test-activedctm"
    #<s0@xaop65::DmDocument:090a04b580001544 test-activedctm>
  • Link the document into the temp cabinet.
    s0@xaop65:004:0> doc1.link "/Temp"
    true
  • Save my changes.
    s0@xaop65:005:0> doc1.save
    #<s0@xaop65::DmDocument:090a04b580001544 test-activedctm>
  • Adding the title is simple
    s0@xaop65:006:0> doc1.title = "test"
    "test"
  • Filling a repeating attribute
    s0@xaop65:008:0> doc1.authors
    #
    s0@xaop65:009:0> doc1.authors << "Stijn"
    #<CompositeValue:0xb7de8638 ["Stijn"]>
    s0@xaop65:010:0> doc1.authors << "Peter"
    #<CompositeValue:0xb7de39bc ["Stijn", "Peter"]<
  • Now we need to save everything again
    s0@xaop65:011:0> doc1.save
    #<s0@xaop65::DmDocument:090a04b580001544 test-activedctm>
  • Just get the authors
    s0@xaop65:012:0> doc1.authors
    #<CompositeValue:0xb7ddb924 ["Stijn", "Peter"]>
  • Verify the locations of the document
    s0@xaop65:015:0> doc1.paths
    ["/Temp/test-activedctm"]

blog comments powered by Disqus

Entries per category

  1. 6 pages are tagged with docpublisher
  2. 11 pages are tagged with events
  3. 14 pages are tagged with rails
  4. 30 pages are tagged with ruby
  5. 7 pages are tagged with sharepoint

Recent Comments

Popular Threads