Reputation: 8561
How can I call HttpServletReponse from JBPM execution context. This is because delegated java action class is called from process definition and the program must allow the user to download the file from the web browser when the workflow transition occurred.
I find myself cannot access to Alfresco's web layer and running out of idea how to access HttpServletReponse to allow the user to download file.
Any kind help is appreciated.
Upvotes: 0
Views: 78
Reputation: 6159
Even though it is possible to access the web layer from an action - doing so is a bad idea as it breaks the whole layering concept.
That said, the quickest solution I can come up with is based on a ThreadLocal. Have a look at http://veerasundar.com/blog/2010/11/java-thread-local-how-to-use-and-code-sample/ for details about them in general. Use one to store/retrieve whatever you need in the web tier.
Upvotes: 1