cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to display a "data loading / progress" modal popup on a mashup for long running services ?

SOLVED
Highlighted
Level 1

How to display a "data loading / progress" modal popup on a mashup for long running services ?

Hello everyone,

I am trying to display a modal popup through a Navigate widget that displays a static mashup with a simple loading GIF. It, the static mashup, is configured with a mashup parameter and this parameter is the one that I use to trigger the CloseIfPopup event with the personnal ParamChanged event. But whenever the popup opens, it closes instantly and after that the popup does not want to display anymore. And I want to open it a multiple time in the mashup.

I spoke about this to the PTC's support and they said that it is an internal issue and it is reported to the development team. And they have redicted me to consult the community.

In my example I cannot use the Data Loading attribute of a widget ! All I want is to prevent the user from clicking on another part of the mashup because the service called can be very long depending on the query you want to execute !

So I come here to know if somebody have an alternative to this solution ?

Regards,

Antoine LA TORRE

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Hi Antoine,

If I understood well, here I've prepared a mockup doing it, hope it helps: Dropbox - SamplePopUpLoadingForLongRunningService.xml

Best Regards,

Carles.

16 REPLIES 16

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Hi Antoine,

If I understood well, here I've prepared a mockup doing it, hope it helps: Dropbox - SamplePopUpLoadingForLongRunningService.xml

Best Regards,

Carles.

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Hi Carl,

I saw what you have made, and it is a great example even better than the PTC support's one, but the difference between my example and yours is that you run the long service inside the popup's mashup. But what I am trying to do is just put a standard popup that is already used and that I can use in further example without changing the popup mashup !

Maybe I have no better option than yours and I will create a new popup mashup with the service inside but it is not the way I wanted to work.

Thanks for your quick answer!

Best regards,

Antoine

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

If you can have only one long running process per user, you can set a boolean property (let's call it longRunningProcessOn ) on the User Settings and set it to true when you start the long running process, then on the end of the long running process you set it back to false.

Once done this, on the "generic" loading popup, you can use Push Properties ( TW version 7 and up )  in order to get updated when longRunningProcessOn get's back to false and close the pop up, or you can add the autorefresh widget on the loading popup and query for the given property every 5 seconds or alike and when it's back to false ( with a validator widget ) you close the popup, do you get it?

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Better on, you can have the Push Properties version on your Master Mashup and when it's true automatically navigate to PopUp Loading mashup that way you don't have to trigger the Navigation PopUp, automagically will be showed.

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Hi again,

I did a quick test with push properties, which it's the best approach.

The problem it's that Push Properties doesn't works with User Settings.

Attached comes a push properties sample version using a property ( flag on/off long running process ) on Long Running Process Thing itself: Dropbox - SamplePopUpLoadingForLongRunningServiceWithPushProperties.xml

This version prevents two users to run the same service at the same time, also if the user reloads the mashup the Loading PopUp will automagically reapear if the long running process is running of course.

If you want a multi-user long running execution and a generic Loading PopUp, you will have to create a Thing for each user with the given property.

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Thanks for your advice but I cannot modify the generic popup because it is not part of my extension that I am working on. It, the popup's mashup, is already in production so I don't want to change its behavior if it is already used by something else. I understand your way to proceed and it is clear for me but I think the better way to avoid conflict is to create a new mashup for the popup that can easily reproduce your example.

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Hi Carles,

Not able to open this file/document. Could you please share it via some other medium

Thanks,

Tarun

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Hi Tarun, it's an XML export from ThingWorx, you just need to import on your ThingWorx instance as Import > From File

Re: How to display a "data loading / progress" modal popup on a mashup for long running services ?

Yes but it's a dropbox stored file and due to some security constraints,I can't access it.

Can you please share it here?

Thanks,

Tarun