AEM Workflow Custom Process
Published
WorkflowProcess
interface and override the execute
method.workflow / process / ArticleFormDataProcess.java
public class ArticleFormDataProcess implements WorkflowProcess {
private final String JCR_PATH = "JCR_PATH";
private final Logger logger = LoggerFactory.getLogger(this.getClass());
public void execute(WorkItem workItem, WorkflowSession workflowSession,
MetaDataMap metaDataMap) throws WorkflowException {
WorkflowData workflowData = workItem.getWorkflowData();
String payloadType = workflowData.getPayloadType();
if (StringUtils.equals(payloadType, JCR_PATH)) {
String pagePath = workflowData.getPayload().toString();
logger.debug("Payload: {}", pagePath);
}
}
}