Flex – Can you stop ColdFusion request?

I have a Flex application that calls a function to search a large document set. Based on the search term, the user may wish to stop the flex request.

I not only want to stop the Flex application expecting requests, but also stop CFC requests. Is this possible? What is the best way to do this?

In order to add Ben Doom’s answer, I will include some sample code of methods that can be implemented. There are many ways and names to organize and call the following code, but hope it is helpful.

At some point during the request start, store the information about the process in the shared Range and return the ID to the client. The following is an example function that can be used on a page or remote request.



progress = 0,
kill = false
}>

The client can then poll the server to check the progress, or submit a request to terminate the process









Then the actual server-side process in question can hit a function, For example, during the loop, check if it should abort processing and clear any appropriate work.




I have a Flex application that calls a function to search a large document set. According to the search term, the user I may want to stop the request of flex.

I not only want to stop the expected request of the Flex application, but also stop the CFC request. Is this possible? What is the best way to do this?

In order to add Ben Doom’s answer, I will include some sample code of methods that can be implemented. There are multiple methods and ways of name, organize and call the following The code, but hope it is helpful.

At some point during the start of the request, the information about the process is stored in the shared scope and the ID is returned to the client. The following It is an example function that can be used on a page or remote request.



progress = 0,
kill = false
}>

Then, the client can check the progress by polling the server, or submit a request to terminate the process









Then, the actual server-side process in question can hit a function, for example during a loop, check whether it should abort processing and Clear any appropriate work.




Leave a Comment

Your email address will not be published.