I am trying to create a CQ 5.4 workflow which updates the description of the Digital Asset Image which started this workflow.
My Problem is when I compile and build this code the WorkFlow Process does not appear in the Process Step’s drop down in CQ 5.4 author server instance.
Here is the code , Let me know if any other step is required or I am doing wrong somewhere,
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.day.cq.dam.commons.process.AbstractAssetWorkflowProcess;
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.WorkflowProcess;
import com.day.cq.workflow.metadata.MetaDataMap;
@Component
@Service(WorkflowProcess.class)
@Properties({
@Property(name = "service.description", value = "Update the Image Description"),
@Property(name = "service.vendor", value = "******"),
@Property(name = "process.label", value = "Update the Image Description") })
public class RemoveImgPropBatchWorkFlowProcessStep extends AbstractAssetWorkflowProcess{
private static final Logger log = LoggerFactory.getLogger(RemoveImgPropBatchWorkFlowProcessStep.class);
@Override
public void execute(WorkItem workItem, WorkflowSession workFlowSesion, MetaDataMap meta)
throws WorkflowException {
// TODO Auto-generated method stub
log.info("RemoveImgPropBatchWorkFlowProcessStep Workflow called up");
workItem.getNode().setDescription("Image is updated");
}
}
The Issue is resolved, all the dependent bundles were not active hence the workflow process was not getting displayed. Regards, Yash