chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshy Augustine <joshymaugust...@gmail.com>
Subject Open CMIS 0.11 + Alfresco 4.2 Community Edition Question
Date Mon, 11 Aug 2014 16:13:54 GMT
Hi All,

I am a newbie to Open CMIS. I am very fascinated by Open CMIS framework
that allowed me to write(almost in no time) a sample test program that
interacts with a various ECM Vendors. However, I am encountering a strange
issue with Alfresco and wondered whether any of you had the time to help?

In the sample code I am developing, I perform the following actions

1) Create a Folder in Alfresco
2) Add  a few documents to it
3) Search (via CMIS Query) for the list of documents in a folder tree that
matches with search criteria.

 In step 3, I execute the following API


ItemIterable<QueryResult> queryResult = session.query(complete_statement,
*false*,operationContext);

Iterator<QueryResult> iterator = queryResult.iterator();

*while* (iterator.hasNext())

{

QueryResult qr = (QueryResult) iterator.next();

String id = (String) qr.getPropertyByQueryName("cmis:objectId"
).getFirstValue());

}

that results in the following query being executed.

*SELECT cmis:objectId FROM cmis:document WHERE cmis:name like 'Hello Wor%'
AND IN_TREE('c4714b61-2800-4995-8e37-2cc07549d4b2') ORDER BY
cmis:creationDate desc*
When I run the test program, most of the times, this query does not return
any results. If i put a breakpoint in the line session.query() and execute
the statement using CMIS Workbench, I am able to find results.
Sometimes(but not always) even putting a Thread.sleep() before
session.query() allows me to find the documents that query should have
found.


Any idea what is the best way to debug this issue?


Cheers,
Josh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message