Hi @jerinraj5555 ,
With 2nd approach, you can create a new workflow model in AEM that is specifically for the Preview environment.
Then use workflow launchers to trigger the appropriate workflow model based on the environment. For example, you can create a workflow launcher that is specifically for the Preview environment, and configure it to trigger the OOTB workflow model.
Use workflow conditions to control which workflow model is triggered based on the environment. For example, you can create a workflow condition that checks the environment and only triggers the OOTB workflow model if the environment is Preview.
Reference: https://experienceleague.adobe.com/docs/experience-manager-64/authoring/workflows/workflows.html?lang=en#:~:text=AEM%20Workflows%20allows%20you%20to,site%20administrator%20activates%20the%20page.
I mean where I can update the custom workflow path for publishing to the Preview env - No need to update any path when you make changes to any OOTB workflow. Once you edit any OOTB workflow model it will move to the "/conf/global/workflow/models" location.
Thanks,
Ravi Joshi
Thanks all for the suggestions. I've been checking whether the agenId is a preview or publish if the agenId is a preview it will invoke the OOTB workflow and else it will trigger our customized workflow.