2 Replies Latest reply on May 9, 2013 2:31 AM by sivaprasadreddys

    Workflow Process Implementation not found

    sivaprasadreddys Level 1

      Hello,

       

           I've created a workflow process in AEM 5.6.  When I initiate the workflow, the workflow is not completed and in the Inbox Console, I see 'process implementation is not found'.

       

      Here is the sample workflow process:

       

      package com.test.workflowtest;

       

      import org.apache.felix.scr.annotations.Component;

      import org.apache.felix.scr.annotations.Properties;

      import org.apache.felix.scr.annotations.Property;

      import org.apache.felix.scr.annotations.Service;

      import org.osgi.framework.Constants;

      import org.apache.felix.scr.annotations.Reference;

      /**

      import com.day.cq.workflow.WorkflowException;

      import com.day.cq.workflow.WorkflowSession;

      import com.day.cq.workflow.exec.WorkItem;

      import com.day.cq.workflow.exec.WorkflowData;

      import com.day.cq.workflow.exec.WorkflowProcess;

      import com.day.cq.workflow.metadata.MetaDataMap;

      */

      import com.adobe.granite.workflow.WorkflowException;

      import com.adobe.granite.workflow.WorkflowSession;

      import com.adobe.granite.workflow.exec.WorkflowProcess;

      import com.adobe.granite.workflow.exec.WorkItem;

      import com.adobe.granite.workflow.metadata.MetaDataMap;

       

      import org.slf4j.Logger;

      import org.slf4j.LoggerFactory;

       

      import org.apache.sling.api.resource.ResourceResolverFactory;

      import org.apache.sling.api.resource.ResourceResolver;

       

      @Component

      @Service

      @Properties({

              @Property(name = Constants.SERVICE_DESCRIPTION, value = "Test Process."),

              @Property(name = Constants.SERVICE_VENDOR, value = "TEST"),

              @Property(name = "process.label", value = "Test WF Process")})

       

      public class Test implements WorkflowProcess{

         private static final Logger log = LoggerFactory.getLogger(Test.class);

       

                @Reference

                private ResourceResolverFactory resourceResolverFactory;

       

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

              throws WorkflowException {

       

              log.debug("======== Test Process ===========");

              ResourceResolver resolver = null;

              try{

                                    resolver = resourceResolverFactory.getAdministrativeResourceResolver(null);

              }catch(Exception e)

              {

                  e.printStackTrace();

              }

          }

      }

       

      =============

      Exception:


      02.05.2013 11:25:23.305 *ERROR* [JobHandler: /etc/workflow/instances/2013-05-02/model_79635435153979:/content/test1] com.adobe.granite.workflow.core.job.JobHandler Process implementation not found: com.test.workflowtest.Test com.adobe.granite.workflow.WorkflowException: Process implementation not found: com.test.workflowtest.Test

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

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

                at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)

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

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

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

      02.05.2013 11:25:25.333 *ERROR* [JobHandler: /etc/workflow/instances/2013-05-02/model_79635435153979:/content/test1] com.adobe.granite.workflow.core.job.JobHandler Process implementation not found: com.test.workflowtest.Test com.adobe.granite.workflow.WorkflowException: Process implementation not found: com.test.workflowtest.Test

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

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

                at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)

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

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

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

      02.05.2013 11:25:27.361 *ERROR* [JobHandler: /etc/workflow/instances/2013-05-02/model_79635435153979:/content/test1] com.adobe.granite.workflow.core.job.JobHandler Process implementation not found: com.test.workflowtest.Test com.adobe.granite.workflow.WorkflowException: Process implementation not found: com.test.workflowtest.Test

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

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

                at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)

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

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

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

      02.05.2013 11:25:29.389 *ERROR* [JobHandler: /etc/workflow/instances/2013-05-02/model_79635435153979:/content/test1] com.adobe.granite.workflow.core.job.JobHandler Process implementation not found: com.test.workflowtest.Test com.adobe.granite.workflow.WorkflowException: Process implementation not found: com.test.workflowtest.Test

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

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

                at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)

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

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

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

       

       

      =======

      Findings:  Gettting exception only when I use below code in the workflow process.

       

      @Reference

        private ResourceResolverFactory resourceResolverFactory;

       

       

      Any help would be more helpful..

       

      Thanks

      Siva