Showing posts with label Workflows. Show all posts
Showing posts with label Workflows. Show all posts

Monday, October 19, 2015

Workflow Authorization error

Workflow Authorization error



While working with Workflow in AEM 6 and above or CQ5.6, it is important to ensure all the user access is provided correctly in either case following error can be encountered. In my case, the user group itself was not present. Again, this was because I had copied workflow from other location and not created it on my instance from the scratch.


com.adobe.granite.workflow.core.job.JobHandler Could not advance workflow. com.adobe.granite.workflow.WorkflowException: org.apache.sling.api.SlingException: No Authorizable with ID null
at com.adobe.granite.workflow.core.advance.ParticipantNodeHandler.doTransition(ParticipantNodeHandler.java:163)
at com.adobe.granite.workflow.core.advance.AdvanceUtil.transitionFrom(AdvanceUtil.java:143)
at com.adobe.granite.workflow.core.WorkflowSessionImpl.complete(WorkflowSessionImpl.java:633)
at com.adobe.granite.workflow.core.job.HandlerBase.complete(HandlerBase.java:498)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:183)
at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:378)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.sling.api.SlingException: No Authorizable with ID null
at com.adobe.granite.workflow.core.util.SecurityUtil.getAuthorizable(SecurityUtil.java:54)
at com.adobe.granite.workflow.core.util.SecurityUtil.getAuthorizable(SecurityUtil.java:46)
at com.adobe.granite.workflow.core.advance.ParticipantNodeHandler.doTransition(ParticipantNodeHandler.java:132)
... 8 more
Caused by: java.lang.Exception
... 11 more

Workflow version error

Workflow version error




I faced an exception like this while I was working on workflows for the first time

com.adobe.granite.workflow.core.jcr.WorkItemAdapterFactory error adapting a class of type [{org.apache.jackrabbit.core.NodeImpl}] to type [{java.lang.Class}] com.adobe.granite.workflow.model.VersionException: Version 1.84 does not exist for /etc/workflow/models/XYZ/XYZ-components-workflow/jcr:content/model
at com.adobe.granite.workflow.core.jcr.WorkflowModelManager.getWorkflowModel(WorkflowModelManager.java:96)
at com.adobe.granite.workflow.core.WorkflowSessionImpl.getModel(WorkflowSessionImpl.java:279)
at com.adobe.granite.workflow.core.util.NodeReader.createWorkflow(NodeReader.java:211)

The reason behind this exception is the version difference of workflow instance which I bump into because I was copying workflow from different locations and somehow the sync between the current workflow version and instance workflow version were messed up. Different workflow instances (as per their modification dates) can be seen at following location.

/etc/workflow/instances

Some more AEM 6 Interview Questions for Architects

 Some more AEM 6 Interview Questions for Architects 1. Consider you have a workflow with two steps. One step is to transfer the asset from s...