Expand my Community achievements bar.

Execute DQL Query Result

Avatar

Level 2

The Data Type for DQL Query result is List. What is the Sub-Type to be used?

When i use sub type as string it returns only the first record?

How do i retrieve the other records which are being returned by the query?

Thanks.

10 Replies

Avatar

Former Community Member

DQL query result returns back a List of Map (List<Map>).

Each row in the list i.e. each Map entry designates a row obtained as DQL execution result. And each key-pair in the Map represents the attribute of that item.

e.g. Executing the following query Select title, object_name,r_modify_date  FROM dm_document where FOLDER ('/Test') gives me back the following 3 items (Result Item 1, Result Item 2, and Result Item 3).

Here is what the operation output looks like from an API:-

Avatar

Level 2

When I use List<Map> for the query result. It gives the below error message.

ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: of type: java.lang.String to type: interface java.util.List

Avatar

Former Community Member

Looks like you are using workbench for the operation.

Can you instead try using API invocation instead of workbench. There is a limited support for complex types through workbench and process context and it looks like List<Map> doesn't comes under the supported list. API invocation should however, work perfectly fine in this case.

Avatar

Level 1

I've the same issue, here is what I've tested :

For the result variable I've used :

- A List<Map> : Same issue : Type conversion failed => (Using Workbench or Using SOAP invocation by SOAPUI)

- An Object : SOAPUI returns a Map<Object> with only the first record.

Where I'm wrong ?

Thanks

Avatar

Former Community Member

Hi Jean,

By SOAP UI you mean SOAP Endpoint invocation? Also, that means you are using client jar adobe-connectorforemcdocumentum-client.jar for the purpose, correct?

An example invocation code looks like:-

If yes, Can you try using EJB Endpoint invocation method instead? For more information on EJB and SOAP invocations in LiveCycle ES2 take a look at:- http://help.adobe.com/en_US/livecycle/9.0/programLC/help/000495.html#1548279

Avatar

Level 1

Thanks for your quick response.

Your solution is ok, I've created a custom component using the EJB endpoint of the service and it solves my issue, it return a List<Map> ...

Thanks again

Avatar

Level 2

Hi


Do you have an idea on what are the information passed in process context.

let me tell you what I am trying to do. I am invoking a process which contains a retrieve content(documentum) service that uses the process context as login mode. The process context that is used to invoke is made by impersonating (ie using admin user creditential to create a context for another user). Now I am able to invoke the process but I get login exception in documentum service.

Thanks

Avatar

Former Community Member

Hi Dhanesh,

Can you please start a new thread for the same discussion as both of the issues are no where related. It would be easy to track them later on.

You can start it under the same category i.e. "LiveCycle Connectors for ECM ES"

Thanks and Regards,

Raghu

Avatar

Level 2

Hi

Thanks for the reply

I have created a new thread

Thanks