Need help in programmatically advance to next step in CQ 5.5 workflow process step
Below is the code I am using to programmatically move to next workflow step i.e. auto handler advance programmatically instead of selecting the checkbox auto handler advance on the step.
List<Route> routes = workflowSession.getRoutes(workItem); if(CollectionUtils.isNotEmpty(routes)) { for (Route route : routes) { logger.info("Route: " + route.getName() + " route: " + route); } workflowSession.complete(workItem, routes.get(0)); }Although the logger gives me the right route information I am not able to proceed to the next step and the workflow goes on running state.
References used for the above code:
Kindly let me know what am I missing. Let me know if you need more details and will update the question.