Comments on: ADF Faces: Handle task in background process and show real time progress indicator for asynchronous job using Server Push in ADF https://technology.amis.nl/2011/10/19/adf-faces-handle-task-in-background-process-and-show-real-time-progress-indicator-for-asynchronous-job-using-server-push-in-adf/ Friends of Oracle and Java Thu, 23 Apr 2015 12:54:46 +0000 hourly 1 http://wordpress.org/?v=4.2 By: durga https://technology.amis.nl/2011/10/19/adf-faces-handle-task-in-background-process-and-show-real-time-progress-indicator-for-asynchronous-job-using-server-push-in-adf/#comment-8008 Wed, 17 Dec 2014 05:46:48 +0000 http://technology.amis.nl/blog/?p=13823#comment-8008 Hi Adi,
I have same requirement now. Can you share your thought how u have implemented it?
thanks.

]]>
By: Adi https://technology.amis.nl/2011/10/19/adf-faces-handle-task-in-background-process-and-show-real-time-progress-indicator-for-asynchronous-job-using-server-push-in-adf/#comment-6904 Wed, 22 Feb 2012 05:37:43 +0000 http://technology.amis.nl/blog/?p=13823#comment-6904 Another allied question…
Problem#1
I have to upload a XML file (say a SAP purchase order) and populate UI with the details. To achieve this I have coded a file upload mechanism and a JAXB Data control derived out of the XSD (which the uploaded XML bases on) and did a drag drop of the DC on a JSPX page as a master detail form (read only).
Now, I can create a jaxb context, I can marshal the input xml and cast it to the root JAXB object  (lets say OrderRequestDocument).. I can populate the entire hierarchy from the root  (OrderRequestDocument.Order, OrderRequestDocument.BillingAddress) .  At this point, how can I update the view just by populating the root (from a view/pageflow/request scoped managed bean)?   I can always use EL and update the UI elements one by one like                   ValueExpression idBinding = exprFactory.createValueExpression(elctx,”#{bindings.orderId.inputValue}”,Object.class);
idBinding.setValue(elctx, getOfferDetailsResponse.getOrder().getOrderId());    but considering the number of fields this approach doesn’t seem feasible.
Problem#2
I have followed the example code given in this post and it indeed works like a charm. However, something  is amiss when I try to get this to work in conjunction with the file upload+JAXB processing (as the long running job).  I want the  progress counter to start as soon as the valueChangeEvent is fired from the file dialog and to stop when the form is populated (last line of some method)… here the progress monitor panel starts printing an integer i.e the STATE and not the MESSAGE..  i see on the page that the counter increments but the data in the ‘message’ variable doesn’t appear.
 
It would really help if you share your thought.

]]>
By: Lucas Jellema https://technology.amis.nl/2011/10/19/adf-faces-handle-task-in-background-process-and-show-real-time-progress-indicator-for-asynchronous-job-using-server-push-in-adf/#comment-6903 Wed, 15 Feb 2012 16:00:56 +0000 http://technology.amis.nl/blog/?p=13823#comment-6903 Hi Adi,

It should indeed be possible to use the progressIndicator component. Simply manipulate that component via JavaScript, or, if that fails, send a server event and have the backend ppr the progressIndicator.

I think the upload itself – the process of reading data from the local client and posting it over HTTP to the server – is not a process that we can track the progress of. However, as soon as the upload is done, the processing of the file is a candidate for reporting progress. I may be mistaken in that perhaps a large file, while it is received bit by bit, is already available for processing; I am not sure about that.Using the file upload component from Apache Commons (for example) it is possible to access the stream containing the file content that is being uploaded; this would open the door for reporting progress on receiving the file; note that this may interfere with the ADF way of uploading files – I am not sure about that. See http://www.jedi.be/blog/2009/04/10/java-servlets-and-large-large-file-uploads-enter-apache-fileupload/

Lucas

]]>
By: Adi https://technology.amis.nl/2011/10/19/adf-faces-handle-task-in-background-process-and-show-real-time-progress-indicator-for-asynchronous-job-using-server-push-in-adf/#comment-6902 Tue, 14 Feb 2012 02:45:31 +0000 http://technology.amis.nl/blog/?p=13823#comment-6902 Awesome post Lucas. I was wondering if a file upload status can be monitored with this approach. My requirement is something like – I’ll upload a XML–> populate a ADF form/Table (JAXB data control) .  Also wanted to check if  a af:progressindicator component can be with this push pattern instead of the conventional poll mechanism

]]>
By: Kiran Sankpal https://technology.amis.nl/2011/10/19/adf-faces-handle-task-in-background-process-and-show-real-time-progress-indicator-for-asynchronous-job-using-server-push-in-adf/#comment-6901 Wed, 04 Jan 2012 14:20:43 +0000 http://technology.amis.nl/blog/?p=13823#comment-6901 HI Lucus,
I am having one questions regarding ADS Flow.
In your example your having one variable with (state) what about multiple variables.
suppose i want to use ADS with af:table let's consider Employee and department. In Employee as we have department as a contained object so when we drag drop employee as a table . The table will have both employee and department binding as we are dragging employee all attributes from employee are accessible at row first level as #{row.firstname} and for department attribute it will create entry as #{row.employee.binding.departments.fepartmentName} as a entry.
My question how we can update such a contained object when ADS. How exactly we can fire event for contained object?


 
 

]]>
By: Xiandong https://technology.amis.nl/2011/10/19/adf-faces-handle-task-in-background-process-and-show-real-time-progress-indicator-for-asynchronous-job-using-server-push-in-adf/#comment-6900 Mon, 24 Oct 2011 19:22:02 +0000 http://technology.amis.nl/blog/?p=13823#comment-6900 Nice share.  Just curious the adf processIndicator & poll components can do same thing. What’s the benefit for the ActiveDataModel?

]]>
By: Emiel Paasschens https://technology.amis.nl/2011/10/19/adf-faces-handle-task-in-background-process-and-show-real-time-progress-indicator-for-asynchronous-job-using-server-push-in-adf/#comment-6899 Fri, 21 Oct 2011 13:56:17 +0000 http://technology.amis.nl/blog/?p=13823#comment-6899 Hi Lucus,
Nice showcase! I’ve got a remark/question about the scope of the activeBean, it’s set to session. What happens when the jobs is taking a very long time (lets say an hour) and the user doesn’t wait until its finished and closes the browser. It the ActiveBean going to be GC’ed after session timeout or does it finish it’s job? (lets assume it should finish the job). Or is application scope necessary to achieve this?
Also I’m a bit currious how this works under the hood. Long Ajax request, polling Ajax requests or another technique?

]]>