cancel
Showing results for 
Search instead for 
Did you mean: 

Creating discussion on uploaded document programmatically

alnedru
Champ in-the-making
Champ in-the-making
Hello I have a question regarding alfresco, basically I would like to programmatically (opencmis/dotcmis) upload a document, which i already can, but on that document i would like to create discussion.

If i'm using interface i can click on a document and then i can say start discussion, and a discussion is created.

Now i would like to do the same but programmatically, any idea how to do that?

IDocument object doesn't have a method something like 'createDisucssion()'

So how can i then create a discussion using CMIS (openCmis/dotCmis) … any help would be really apprecieted.
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
CMIS doesn't know what a discussion is. You're going to have to make a call to your own web script to do this.

One way to see how Alfresco structures discussions around a specific document is to go into the old Explorer client (http://localhost:8080/alfresco) and start a discussion on a document, then use the node browser to go look at the children of that document. You'll see the objects that got created, their types, etc.

I would use a web script that accepts an object ID (not a CMIS object ID but the Alfresco object ID–these could be different) and then starts a discussion by creating the initial object instances.

Note that you'll have to use further web scripts to perform crud functions on the discussion thread. CMIS won't be able to work with those objects.

Jeff