10 Replies Latest reply: Jan 16, 2011 9:56 PM by Dhanesh S RSS

    Execute DQL Query Result

    ANURD Community Member

      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?



        • 1. Re: Execute DQL Query Result
          Raghu A 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:-



                // Row 1/Result Item 1

                      title= Updated_Name678_title,                         // Attribute title of Result Item 1

                      object_name=Updated_Name678,                          // Attribute object_name of Result Item 1

                      r_modify_date=Mon Nov 24 12:57:37 IST 2008            // Attribute r_modify_date of Result Item 1



                // Row 2/Result Item 2

                {     title=,


                      r_modify_date=Wed Mar 18 15:33:56 IST 2009



                // Row 3/Result Item 3




          r_modify_date=Wed Mar 24 20:06:17 IST 2010




          • 2. Re: Execute DQL Query Result
            ANURD Community Member

            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

            • 3. Re: Execute DQL Query Result
              Raghu A 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.

              • 4. Re: Execute DQL Query Result
                Jean-François LORMEAU

                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 ?


                • 5. Re: Execute DQL Query Result
                  Raghu A 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:-

                  // Obtain Service Client Factory from LiveCycle Server details.
                  Properties ConnectionProps = new Properties();
                  ConnectionProps.setProperty("DSC_DEFAULT_SOAP_ENDPOINT", "http://lcseever:8080");
                  ConnectionProps.setProperty("DSC_TRANSPORT_PROTOCOL", "SOAP");
                  ConnectionProps.setProperty("DSC_SERVER_TYPE", "JBoss");
                  ConnectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "username");
                  ConnectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password");

                  ServiceClientFactory serviceClientFactory = ServiceClientFactory.createInstance(ConnectionProps);

                  // Create Documentum Client object.
                  EMCDocumentumContentRepositoryConnectorServiceClient dctmClient = new EMCDocumentumContentRepositoryConnectorServiceClient(serviceClientFactory);

                  // Create Login Settings Object with Documentum Login details
                  LoginSettings loginSettings = new LoginSettings(LoginMode.USER_CREDENTIALS, "dctmUserName", "dctmPassword", null);
                  String repositoryName = "DocbaseName";

                  // Invoke executeDQLQuery
                  List<Map> resultMap = dctmClient.executeDQLQuery(loginSettings, repositoryName, queryString);


                  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

                  • 6. Re: Execute DQL Query Result
                    Jean-François LORMEAU Community Member

                    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

                    • 7. Re: Execute DQL Query Result
                      mutfak Community Member

                      thanks for the code

                      • 8. Re: Execute DQL Query Result
                        Dhanesh S Community Member


                        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.



                        • 9. Re: Execute DQL Query Result
                          Raghu A 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,


                          • 10. Re: Execute DQL Query Result
                            Dhanesh S Community Member



                            Thanks for the reply

                            I have created a new thread