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

Session parameter not persisting data

Highlighted
Aquamarine

Session parameter not persisting data

Hi,

I'm trying to bind "Selected State" i.e. "true" of a Checkbox to a session parameter and want to retrieve it on my next visit on the same Mashup but getting ​null ​from parameter.

On first load, State of checkbox is passed to session parameter and next visit,it will take that value from session parameter and pass to Validator to navigate but unfortunately, Validator variable "out" is recieving nothing.


Note: Session parameter is persisted while creation.

Below are is the example:

16 REPLIES 16
Highlighted

Re: Session parameter not persisting data

Hi Tarun Nayyar​,

Which ThingWorx version you are on?

Also, please confirm that by Session parameter is persisted while creation. you mean that you had selected Persisted checkbox while creating property in GlobalSessionParameters?

Highlighted

Re: Session parameter not persisting data

Its TWX 7.4.

Yes I persisted it as required.

Highlighted

Re: Session parameter not persisting data

Hi Ankit,

Is it a bug in 7.4 TWX version for Checkbox state binding to session parameter?

Can you test it on your end too and let me know the results.

Then,I'll figure out some other way to perform my mashup functionality.

Thanks,

Tarun

Aanjan RaviPai Chung

Highlighted

Re: Session parameter not persisting data

Tarun Nayyar​,

I will test this out and will update you.

Highlighted

Re: Session parameter not persisting data

Thank you Ankit.

I'll wait for your reply.

Highlighted

Re: Session parameter not persisting data

Hi Tarun Nayyar​,

I have tested this scenario and the behavior is same for ThingWorx 7.4 and ThingWorx 7.1.9.

I will try to analyze more on Monday.

Highlighted

Re: Session parameter not persisting data

Hi Ankit,

Can you share your tested entities here?

I'll try to compare it with mine one,if its working for you.

Highlighted

Re: Session parameter not persisting data

Hi Tarun Nayyar​,

I meant I was able to reproduce your issue. I can share the entities on Monday from office.

Highlighted

Re: Session parameter not persisting data

Hi Ankit,

Any sink-up on it?

Highlighted

Re: Session parameter not persisting data

Hi Tarun Nayyar​,

Can you please share your entities so that I can compare it with mine. I am getting a false on Reload but you mentioned that you are receiving a null.

Highlighted

Re: Session parameter not persisting data

I created one test mashup and deleted that.

Can you share your entities,I'll try to understand the difference.

Highlighted

Re: Session parameter not persisting data

Please find attached

Highlighted

Re: Session parameter not persisting data

Can't see any attachments

Highlighted

Re: Session parameter not persisting data

I guess,i didn't explain it well.

I ran your entities.It gives "false" everytime 1st mashup loads. But as per requirement,it should give false only for the first time and once user changed the state of checkbox to true,that "true" should get persisted and on next visit same mashup should get "true" from session variable,which is not the case.

Highlighted

Re: Session parameter not persisting data

Tarun Nayyar​,

So, we actually need to uncheck the Persistent property so that the value resets on each login.

Also, we need to update the Session Property only when the checkbox changes.

Make the Boolean property non-persistent and try with following entities.

I hope it helps.

Highlighted

Re: Session parameter not persisting data

Thanks Ankit.

corrected my mistake.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!