On 26 October 2016 at 17:56, Bilgin Ibryam <[email protected]> wrote:

> Hi all,
>
> I have a use case where the use triggers an actions that takes a
> couple of minutes computation.
> What would be best way to invoke such an action in ISIS? Currently it
> runs in the calling thread and simply the UI hands for a while.
>
> Ideally I like to run that in a background thread,


this bit is easy, just use the BackgroundService [1] in conjunction with
the command addon module [2]. then use the Quartz addon module [3] to
invoke queued up commands.





> but also give the
> user some indication of progress of the background task.



... this bit doesn't yet exist.

We did spike a little counter using Wicket's integration with Atmosphere
[4] a couple of years ago, just to push the current time down to the web
browser, but we didn't take it any further.

There are a couple of ways I can see this requirement might be tackled, but
perhaps the easiest would be to provide some sort of Wicket widget (maybe
rendered in the footer) that has built-in knowledge of the background
command queue, and so which could indicate to the user what the status of
their job(s) are.  When the user clicks on a job it could perhaps render
the persisted Command (or maybe a view model for a simplified UI / could
perhaps go to the "target" / most relevant object that has been updated).


Interested in your thoughts; we actually have a somewhat similar
requirement for Estatio, so would be good to kick around some ideas.

Thx
Dan




> I wonder if
> there is anything in the framework or addons that could help me.
>
>
[1] http://isis.apache.org/guides/rgsvc.html#_rgsvc_api_BackgroundService
[2] https://github.com/isisaddons/isis-module-command
[3] https://github.com/isisaddons/isis-module-quartz
[4] http://examples7x.wicket.apache.org/atmosphere/?0


Thanks,
>
> --
> Bilgin Ibryam
> Camel Committer at ASF & Integration Architect at Red Hat
> Blog: http://ofbizian.com | Twitter: @bibryam
>
> Camel Design Patterns https://leanpub.com/camel-design-patterns
> Instant Apache Camel Message Routing http://www.amazon.com/dp/1783283475
>

Reply via email to