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

Subscription defined in extension doesn't work

SOLVED
Pearl

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-t...

 

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

Re: Subscription defined in extension doesn't work

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

Re: Subscription defined in extension doesn't work

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

Re: Subscription defined in extension doesn't work

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/...

 

Highlighted

Re: Subscription defined in extension doesn't work

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

Re: Subscription defined in extension doesn't work

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