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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Session Variable Change Not Firing Event

jimh
12-Amethyst

Session Variable Change Not Firing Event

Hi All,

 

I'm trying to fire an event when a session variable is changed, but nothing seems to happen.  I set up the variable and bound the changed event to a service, but when I update the session variable via a service, nothing happens.  I did confirm that the variable is being updated.  I'm using 8.5.3 and I found this:

 

https://www.ptc.com/en/support/article/CS290680?&language=en&posno=1&q=SetGlobalSession%20value%20services%20do%20not%20trigger%20session%20parameter%20changed%20events&source=search

 

Which is the same issue I appear to be having.  I was just wondering if anyone else has noticed the same issue -- as I'm probably doing something wrong. 

 

I'm trying to implement:

 https://www.ptc.com/en/support/article/CS314806?&language=en&posno=2&q=thingworx%20service%20session%20event&source=search

Option 1


Thanks!

 

ACCEPTED SOLUTION

Accepted Solutions
jimh
12-Amethyst
(To:jimh)

This has somewhat been solved. I talked to a smart colleague who pointed me in a different direction. He suggested setting the variable via a mashup function and that seemed to do the trick!

 

Never could get the PTC example to work though.

View solution in original post

5 REPLIES 5
jimh
12-Amethyst
(To:jimh)

This has somewhat been solved. I talked to a smart colleague who pointed me in a different direction. He suggested setting the variable via a mashup function and that seemed to do the trick!

 

Never could get the PTC example to work though.

slangley
23-Emerald II
(To:jimh)

Hi @jimh.

 

Glad you found a solution.  I will have someone look at the articles you referenced for needed updates.  They are both fairly old.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @jimh.

 

One other thing, could you please mark your post containing the solution as the Accepted Solution for the benefit of others with the same question?

 

Regards.

 

--Sharon

jimh
12-Amethyst
(To:slangley)

Hi @slangley 

 

There isn't a post as we chatted on the phone.  But, the gist of it is:

 

Instead of updating the session variable through the service, updated it through the actual mashup using a function.  So when I want to update the contained mashup, I also fire the mashup function that sends its output to the session variable via the function -- if that makes sense.

slangley
23-Emerald II
(To:slangley)

Hi @jimh.

 

I have marked one of your posts as the solution.  If you disagree with my choice, please let me know.

 

Regards.

 

--Sharon

Announcements


Top Tags