Announcement Announcement Module
Collapse
No announcement yet.
Accesing response in flow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accesing response in flow

    How can I pass request response objects to action bean method assetCheckOut?

    Code:
    <action-state id="checkout">
    		<!-- action-state must have an evaluate element, a set element, or similar.  See the XSD. -->		
    		 <action bean="assetCheckoutFacade" method="assetCheckOut"/>
             <transition on="success" to="checkoutdone"/>
    	</action-state>
    I have to download a file so wana do
    Code:
       response.setContentType("application-xdownload");
            response.setHeader("Content-Disposition", "attachment; filename=\"MyFile\"");
    Please help?

  • #2
    Change your assetCheckOut method to accept a RequestContext:

    Code:
    <action bean="assetCheckoutFacade" method="assetCheckOut(flowExecutionRequest)"/>
    then in your assetCheckOut method use:

    Code:
    HttpServletResponse response = (HttpServletResponse) flowExecutionRequest.getExternalRequest().getNativeResponse();
    Andrew

    Comment

    Working...
    X