Custom Workflow step is not visible in dropdown | Community
Skip to main content
Level 2
March 27, 2024

Custom Workflow step is not visible in dropdown

  • March 27, 2024
  • 1 reply
  • 1249 views

I have created custom workflow process step but  I dont see that custom workflow step in dropdown in workflow model page.

 

my workflow class is as follows

 

@Component(
immediate = true,
service = WorkflowProcess.class,
property = {
"process.label=org: Reduce Image Resolution"
}
)
public class ReduceImageResolutionProcess implements WorkflowProcess {

 

I have similar another workflow step which is visible in dropdown. what could be the problem?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

sravs
Community Advisor
Community Advisor
March 27, 2024

Hi @pawanpatilrocks , check your import statements whether they are from 

com.adobe.granite.workflow

or not. 

Level 2
March 27, 2024

yes they are

 

import com.adobe.granite.workflow.WorkflowException;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.exec.WorkflowProcess;
import com.adobe.granite.workflow.metadata.MetaDataMap;
Level 2
March 27, 2024

@pawanpatilrocks , can you please share your custom process step code here.


import com.adobe.granite.workflow.WorkflowException;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.exec.WorkflowProcess;
import com.adobe.granite.workflow.metadata.MetaDataMap;
import com.day.cq.dam.api.Asset;
import com.day.cq.dam.api.Rendition;
import com.day.image.Layer;
import com.starbucks.core.exception.AEMCustomException;
import com.starbucks.core.services.CropResizeImageService;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.io.InputStream;

@8220494(
immediate = true,
service = WorkflowProcess.class,
property = {
"process.label=org: Reduce Image Resolution"
}
)
public class ReduceImageResolutionProcess implements WorkflowProcess {

private static final Logger logger = LoggerFactory.getLogger(ReduceImageResolutionProcess.class);

@3214626
private CropResizeImageService criService;


@9944223
public void execute(WorkItem item, WorkflowSession session, MetaDataMap metaDataMap) throws WorkflowException {
try {
// My custom logic

} catch (IOException e) {
throw new RuntimeException(e);
} catch (AEMCustomException e) {
throw new RuntimeException(e);
}
}

 


}