12 Replies Latest reply on Feb 13, 2018 6:52 AM by debashisg29269772

    Getting Error in calling com.adobe.icc.services.api.LetterInstanceService from AEM Workflow process step

    debashisg29269772 Level 1

      I am trying to get all Correspondence Letters from a workflow process step (AEM Workflow on OSGi ) , I am using the below API's but getting error related to {Code}-LCC-REP-JCR-001, {Message}-Error in getting a JCR session.

       

      @Reference

      private com.adobe.icc.services.api.LetterInstanceService letterInstanceService;

       

      @Reference

      private com.adobe.icc.services.api.LetterService letterService;

       

      public void execute(WorkItem item, WorkflowSession session, MetaDataMap args) throws WorkflowException  {

      ...

      List<LetterInstanceVO> letterInstances = letterInstanceService.getAllLetterInstances(null);

      // List<Letter> letters = letterService.getAllLetters(query);

      ...

      }

       

      Error :

      com.adobe.livecycle.content.query.exception.QueryException: QueryException: {Code}-LCC-REP-JCR-001, {Message}-RepositoryException: {Code}-LCC-REP-JCR-001, {Message}-Error in getting a JCR session

      at com.adobe.livecycle.content.query.impl.QueryServiceImpl.query(QueryServiceImpl.java:152)

      at com.adobe.icc.services.am.GenericDaoImpl.findAll(GenericDaoImpl.java:184)

      at com.adobe.icc.services.am.LetterInstanceDaoImpl.findAll(LetterInstanceDaoImpl.java:61)

      at com.adobe.icc.services.core.LetterInstanceServiceImpl.getAllLetterInstances(LetterInstanc eServiceImpl.java:461)

      at com.aem63test.core.worflow.CorrespondenceSubmitProcess.execute(CorrespondenceSubmitProces s.java:125)

      at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:193)

      at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:258)

      at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsume rManager.java:500)

      at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:291)

      at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:58)

      at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:227)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

      09.02.2018 16:35:40.166 *ERROR* [JobHandler: /etc/workflow/instances/server0/2018-02-09/abc-loan-application-process-model_7:/etc/fd/d ashboard/payload/server0/2018-02-09/WL2QOKMWN2KG775CSYEOHTZFHA_7] com.adobe.granite.workflow.core.job.JobHandler Error executing workflow step

      com.adobe.granite.workflow.WorkflowException: Process execution resulted in an error

       

      Maven :

      <dependency>

                <groupId>com.adobe.aemfd</groupId>

                <artifactId>aemfd-client-sdk</artifactId>

                <version>6.3.0</version>

      </dependency>

       

       

       

      I have tried with both LetterInstanceService  and LetterService  with both query parameter and null. Please suggest whether we can use this API or not. I am using AEM 6.3 + cfp + forms addon package