Skip to main content
17-Peridot
February 14, 2019
Solved

Subscription defined in extension doesn't work

  • February 14, 2019
  • 2 replies
  • 3022 views

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

 

 

 

Best answer by 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

2 replies

seanccc17-PeridotAuthor
17-Peridot
February 18, 2019

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

seanccc17-PeridotAuthor
17-Peridot
February 18, 2019

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

 

Support
February 20, 2019

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

slangleyCommunity ManagerAnswer
Support
March 18, 2019

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