Posts: 1
Joined: Fri Oct 06, 2017 7:38 pm

Error with App/ClickScript/Notifier

Fri Oct 06, 2017 7:56 pm


I have created an event rule that make some calculation on a variable received from device (need to make in event rule because i use the context to compare new data received with last data computed) for this i have created a event rule what always trigger (speed > -1) en always end (ending condition: speed < 500) the data i compute is saved in Notifier.
I have created and App of type Notifier that trigger when my event rule is trigger , in this app script i get my data computed from the Notifier (i only find thi way to pass data from event rule to app) and i modified the current message of current user to insert this data as a field.
When i test all script is OK but when i simulate with SimOne i get an "Error: circular dependency in scripts. Check scripts using message.process()" if i remove the line message.process() , everything works well but data is not saved to the message.

My objective is :

I want to make an average of a value coming from the device and i want to save this average value in a message field. for this i cannot use RouteMessage because we don't have acces to context in RouteMessage . So the only option i found is to create this event rule that compute the average , save it in Notifier then in APP/CLICKSCRIPT/NOTIFIER get this average value from Notifier , get the current message by message.connect(user.id); , add my average value to a field : message.fields.set("XXX",myAverage) and process the message to get my value like is coming from the device.

Sorry for my english , i hope is understantable, any help are welcome


Return to “GpsGate Server - How to setup and use”