devdoc

Thursday, May 19, 2005

Renditions

What is the API statement to queue an HTML rendition of a document?


queue,c,[object_id],dm_autorender_win31,
rendition, 0, F,, rendition_req_html:html:zip_html


And the DFC???

In Javadocs we find: IdfSysobject Method public IDfId queue(String queueOwner, String event, int priority, boolean sendMail, IDfTime dueDate, String message) throws DfException

This is, if we have a SysObj. We just need to call the method queue with the same parameters from the API statement.

   IDfId objId = new DfId(objectId);
IDfSysObject sysObj= (IDfSysObject) session.getObject(objId )

IDfTime dueDate= new DfTime("19/05/2005 11:33:00");
sysObj.queue("dm_autorender_win31","rendition", 0,
false,dueDate,"rendition_req_html:html:zip_html");


:)

Tuesday, May 10, 2005

DQL: Retrive the child components in virtual document

If you have the r_object_id of a Virtual Document you always can launch the following DQL:



SELECT r_object_id FROM dm_sysobject
IN DOCUMENT ID('virtual_doc_id') DESCEND


But if you don't have the r_object_id and you want to extract the child components with a sigle query you must execute:


SELECT r_object_id,object_name,r_object_type,r_content_size,
a_content_type,r_is_virtual_doc,r_link_cnt,r_lock_owner,
a_content_type,owner_name,i_is_reference
FROM dm_document
WHERE r_is_virtual_doc <> 1 AND
i_chronicle_id IN (
SELECT component_id
FROM dmr_containment
WHERE parent_id = 'Virtual_Doc_ID'
)

If you want, for example, to retrieve all the child components from a virtual doc associated to a task you could launch the following query:


SELECT r_object_id,object_name,r_object_type,r_content_size,
a_content_type,r_is_virtual_doc,r_link_cnt,
r_lock_owner,a_content_type,owner_name,i_is_reference
FROM dm_document
WHERE r_is_virtual_doc <> 1 AND
i_chronicle_id IN (
SELECT component_id
FROM dmr_containment
WHERE parent_id IN (
SELECT distinct r_component_id
FROM dmi_package
WHERE r_workflow_id IN (
SELECT router_id
FROM dmi_queue_item
WHERE r_object_id='TASK_ID'
)
)
)