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 ?
Solved! Go to Solution.
Views
Replies
Total Likes
That's a very simple approval usecase, and the most important reason for the existance of the participant step.
The documentation for this feature is here: https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-wor...
I don't know if it is possible to terminate a workflow earlier from within a workflow model.
A way which works for sure is to model the workflow appropriately and decide based on the result of the previous step if to continue or not. That approach is also more obvious to anyone looking into the model.
Thanks for your reply. Basically in participant step, approver will have 2 options, approve and reject. If he approve the workflow it goes to next step in the workflow model whereas if he reject the workflow I want to cancel or end the workflow for which I am looking for a solution. I guess there should be a way to end the workflow if approver reject the workflow.
That's a very simple approval usecase, and the most important reason for the existance of the participant step.
The documentation for this feature is here: https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-wor...