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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Subscription defined in extension doesn't work

seanccc
17-Peridot

Subscription defined in extension doesn't work

Hi, 

I created a extension according to the tutorial, https://developer.thingworx.com/en/resources/guides/eclipse-plugin-thingworx-extension-development-tutorial.

 

Most of the functions works , except the subscription. The event "BadWeather" is raised(the application log confirms it) , but  subscription is NOT triggered. 

 

Could you help ?  I attached the java source code and the extension file , as well as the log files.

 

================update======================================

I changed the method this.dispatchEvent(event); to this.fireEvent(eventDefinition, DateTime.now(), eventData); , then I found the application log shows that the event handler is triggered  .

However, the event handler/subscriber requires the signature "InfoTable" which doesn't match the data type of eventData of fireEvent, which is "ValueCollection".   So the workaround still cannot work. 

 

Thingworx version: 8.3.4

 

Regards,

Sean

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:slangley)

Hi @seanccc.

 

Apologies for the delay on this.

 

I have confirmed that the content needed to work this project is missing.  I have discussed this with the team responsible for posting the content and they will be providing an update in the coming weeks as part of the ThingWorx 8.4 content that is scheduled.

 

Regards.

 

--Sharon

View solution in original post

4 REPLIES 4
seanccc
17-Peridot
(To:seanccc)

anyone could help ? I have been struggling with the problem for days . 

seanccc
17-Peridot
(To:seanccc)

To demo the problem more clear, I created another simplified extension for the problem, move to here: 

https://community.ptc.com/t5/ThingWorx-Developers/Java-Extension-Subscription-handler-is-NOT-called/td-p/594433

 

slangley
23-Emerald II
(To:seanccc)

Hi @seanccc.

 

We'll review the guide you followed to see if we can recreate the issue you are having.  If something is wrong with the guide, we'll let you know.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @seanccc.

 

Apologies for the delay on this.

 

I have confirmed that the content needed to work this project is missing.  I have discussed this with the team responsible for posting the content and they will be providing an update in the coming weeks as part of the ThingWorx 8.4 content that is scheduled.

 

Regards.

 

--Sharon

Top Tags