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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to fire an event from LSR code?

AdamM.Levine
7-Bedrock

How to fire an event from LSR code?

The example LSR template has a function that is supposed to fire an event on the platform, but I can't get it to work. 

I create the example thing from example.lua, add the event (ExampleEvent), and the data shape (also named ExampleEvent).  I've tried making the event on the platform both local and remote.  The result is always the same, 500, internal server error.  All the other example template functionality works - the properties and services.

Does anyone have example LSR code that fires an event on the platform, or can tell me how I'm configuring the example template wrong?

-->Adam

1 ACCEPTED SOLUTION

Accepted Solutions

Found it - it's a known issue.  The workaround is to write a service on the platform that fires the event, and call the service from Lua code.

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS222024&art_lang=en&posno=1&q=edge%20micro%20server%20event&ProductFamily=ThingWorx&source=search

View solution in original post

1 REPLY 1

Found it - it's a known issue.  The workaround is to write a service on the platform that fires the event, and call the service from Lua code.

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS222024&art_lang=en&posno=1&q=edge%20micro%20server%20event&ProductFamily=ThingWorx&source=search

Top Tags