How to get SlingHttpServletRequest from a workflow session? | Community
Skip to main content
Level 2
January 21, 2022
Solved

How to get SlingHttpServletRequest from a workflow session?

  • January 21, 2022
  • 1 reply
  • 1026 views

I have a requirement where in I need to use SlingHttpServletRequest in my workflow process step. Can we get SlingHttpServletRequest  from WorkflowSession? Also I have a resource object can I get SlingHttpServletRequest  from resource? Can some one please guide me?
AEM 6.5 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @lavita, SlingHttpServletRequest is not available in workflows in general. It's because workflows are not working in request context. You can not get SlingHttpServletRequest from resource as well.

The main question is why you need SlingHttpServletRequest object on your workflow process step, what exactly you would like to get from request?

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
January 21, 2022

Hi @lavita, SlingHttpServletRequest is not available in workflows in general. It's because workflows are not working in request context. You can not get SlingHttpServletRequest from resource as well.

The main question is why you need SlingHttpServletRequest object on your workflow process step, what exactly you would like to get from request?