In one of the OR step in my workflow I want to bring the annotate function for users. When the user click the annotate option I would like to redirect to the 'mnt/overlay/dam/gui/content/assets/annotate.html' appended with the payload. whats the easiest way to bring page redirect. Do I need to call any sling service from the script.
I am trying to avoid the inclusion of an additional process step just for redirection. I think if I call a custom workflow process step I could get the payload from any of the available objects and possibly use a requestresponsefactory OSGI service to redirect but at the cost of an additional java class.
As per the documentation ECMA script provide these objects.
WorkItem, WorkflowSession, WorkflowData, args, sling and jcrSession.
So I can easily get the payload but I am trying to understand if redirection is possible using the sling object by calling any service.