Hi,
I am trying to upgrade workflow from CQ 5.4 to 5.6.1 I am trying to invoke customized workflow which extends AbstractAssetWorkflowProcess.
so trying to get asset in execute method but getting null pointer exception while fetching asset using getAssetFromPayload method.
public void execute(WorkItem workItem, WorkflowSession wfSession, MetaDataMap metaData) throws WorkflowException {
Session session = wfSession.getSession();
final Asset asset = getAssetFromPayload(workItem, session);
.....
.....
}
Can any one please let me know I need to upgrade currently I am using cq-workflow-api version 5.6.2.
regards
Rajesh Karka
Solved! Go to Solution.
Views
Replies
Total Likes
Make sure right version of api is used. You might need to change from [1] to [2].
[1]
import com.day.cq.workflow.WorkflowException;
import com.day.cq.workflow.WorkflowSession;
import com.day.cq.workflow.exec.ParticipantStepChooser;
import com.day.cq.workflow.exec.WorkItem;
import com.day.cq.workflow.exec.WorkflowData;
import com.day.cq.workflow.metadata.MetaDataMap;
[2]
import com.adobe.granite.workflow.WorkflowException;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.ParticipantStepChooser;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.metadata.MetaDataMap;
Views
Replies
Total Likes
Make sure right version of api is used. You might need to change from [1] to [2].
[1]
import com.day.cq.workflow.WorkflowException;
import com.day.cq.workflow.WorkflowSession;
import com.day.cq.workflow.exec.ParticipantStepChooser;
import com.day.cq.workflow.exec.WorkItem;
import com.day.cq.workflow.exec.WorkflowData;
import com.day.cq.workflow.metadata.MetaDataMap;
[2]
import com.adobe.granite.workflow.WorkflowException;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.ParticipantStepChooser;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.metadata.MetaDataMap;
Views
Replies
Total Likes
Have you read this document that talks about upgrading - including workflows: http://dev.day.com/docs/en/cq/current/deploying/upgrading.html ?
Please let us know. Thxs!
Views
Replies
Total Likes
Hey Sham,
I have one question here. As per your comment if we want to upgrade we need to re compile again our workflow code?
Views
Replies
Total Likes
Hi Sham,
As per the documentation AbstractAssetWorkflowProcess is still using CQ workflow API and not included granite workflow API. All my workflows are using AbstractAssetWorkflowProcess which is causing Null pointer Exception while getting resource resolver inside Abstract asset workflow process. But there are lot of OOTB workflows are using this class and working fine.
Caused by: java.lang.NullPointerException
at com.day.cq.dam.commons.process.AbstractAssetWorkflowProcess.getResourceResolver(AbstractAssetWorkflowProcess.java:253)
at com.day.cq.dam.commons.process.AbstractAssetWorkflowProcess.getAssetFromPayload(AbstractAssetWorkflowProcess.java:90)
at com.aptimus.common.workflow.FFMpegTranscodeProcess.execute(FFMpegTranscodeProcess.java:87)
regards
Rajesh Karka
Views
Replies
Total Likes
Might need further investigation then. File a daycare ticket.
Views
Replies
Total Likes
I would always recommend to see the api difference [1] & update your code base accordingly.
[1]
http://dev.day.com/docs/en/cq/current/diff-previous/changes.html
http://dev.day.com/docs/en/cq/5-6/diff-previous/changes.html
Views
Replies
Total Likes
We are hitting the exact same problem here after upgrading from 5.5 to 6.0. Was there ever a Daycare ticket filed for this? If so, do we have a solution?
Thanks!
Views
Replies
Total Likes
Views
Likes
Replies