![]() |
|
||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||||
|
|
||||||
| Other Library Functions | ||||||
| function |
dctm.execute |
|
Library: Interfaces, Documentum interface (OMDOCUMENTUM)
Import: omdocumentum.xmd |
export external function execute
value string command
Argument definitions
You can use the dctm.execute function to execute a Documentum Content Server API command. This function corresponds to the Documentum Client Library (DMCL) function dmAPIExec. The applicable commands are documented in the Documentum Content Server API Reference Guide.
This example connects to a docbase, creates a cabinet and a folder, and links the folder to the cabinet.
import "omdocumentum.xmd" prefixed by dctm.
process
local stream docbase initial {"sample-docbase"}
local stream user initial {"sample-user"}
local stream password initial {"sample-password"}
local stream session
local stream cabinet
local stream folder
set session to dctm.result of
"connect,%g(docbase),%g(user),%g(password)"
do when session = ""
output "Error connecting to the docbase%n"
output "Error returned: "
|| dctm.result of "getmessage,current"
|| "%n"
halt
else
output "Connected%n"
done
;Create a cabinet
set cabinet to dctm.result of "create,%g(session),dm_cabinet"
output "Cabinet asset id is: " || cabinet || "%n"
;Cabinet name is cabinet-01
dctm.set "set,%g(session),%g(cabinet),object_name" to "cabinet-01"
;Commit cabinet
dctm.execute "save,%g(session),%g(cabinet)"
;Create a folder
set folder to dctm.result of "create,%g(session),dm_folder"
output "folder asset id is: " || folder || "%n"
;Folder name is folder-01
dctm.set "set,%g(session),%g(folder),object_name" to "folder-01"
;Link folder into cabinet
dctm.execute "save,%g(session),%g(folder),cabinet-01"
;Commit new cabinet
dctm.execute "save,%g(session),%g(folder)"
The following exceptions can occur when calling this function.
|
Other Library Functions dcmt.writer dctm.execute dctm.omdocumentum-version dctm.reader dctm.result dctm.set |