How to complete the workflow inside process step in AEM?
I would want to complete the workflow inside process step in AEM. Actually I have series of step in my workflow model, For one of those steps, I want to end the workflow and skip the other steps. I can end the workflow using the code below
workflowSession.terminateWorkflow(workItem.getWorkflow());
But after terminating the workflow, the workitem is still appearing in AEM Inbox console. Tried to suspend the workflow, in this case the workitem is disappeared in Inbox but it is showing Workflow Instances console. Is there any other API to gracefully complete the workflow inside process step ?