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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

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

alatorre
5-Regular Member

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

Hi Antoine,

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

Best Regards,

Carles.

View solution in original post

16 REPLIES 16

Hi Antoine,

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

Best Regards,

Carles.

alatorre
5-Regular Member
(To:CarlesColl)

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

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?

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.

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.

alatorre
5-Regular Member
(To:CarlesColl)

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.

Hi Carles,

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

Thanks,

Tarun

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

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

I can't attach files here, there isn't the option. Love company strict policies , you can't work around through your personal phone + usb stick/ email or alike?

Yeah Sure. Will do it from personal mail.

Thanks.

alatorre
5-Regular Member
(To:TanmeyTWX)

There you go

Best Regards,

Antoine

How do you attach files to the community?

alatorre
5-Regular Member
(To:CarlesColl)

You can do it by using the Adcvanced Editor : click on the "Use advanced editor" on the top right of the comment section.

Then in the Advanced editor you can see an Attach link at the bottom of the new Comment section.

Enjoy

I see thanks, I was searching for the option on the Top menu After two years good to know, well they will kill it in the coming months...

Great!!

Thanks @Antoine

Top Tags