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

Write an external data with Java

Garnet

Write an external data with Java

Hi,

 Could anyone tell me how I can write a service with java? It is a simply bool value (true, false) and I found it, but it is not working:

 

$scope.app.mdl.Avtis_BudapestThing.svc.SetAnimation.data = 'true';

 

SetAnimation is the name of the service. If I use a button "click" action then it is working, but I want to write it automatically after some seconds with java.

 

Many Thanks

BJ

 

 

2 REPLIES 2
Highlighted

Re: Write an external data with Java

Hi @Janos1987 ,

I belive you meant js - code. If yes , then the js code should be some thing like this:

 

  
 twx.app.fn.triggerDataService('BudapestThing','SetAnimation',"{data:{\"prop\":true}}")

 

Where 'BudapestThing' is the name of the Thing which defines the service

'SetAnimation' is the service

and true is the value

here 'prop' is the name of the service argument  e.g. iin the definition of the service:

 

2020-02-25_10-55-44.jpg

 

Here in the example below the code if we want to call the service according to the defintion shown in  the the picture above :

 

twx.app.fn.triggerDataService('TestTing-rray','setBoolProp',"{data:{\"prop\":true}}")

 

 

Highlighted

Re: Write an external data with Java

Thank you for your answer, I need more time to test it and give back a detailed report about it.

 

Please be patient.

Janos

Announcements
Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection