Hello,
I tried to create multiple functions and one that call the other.
I saw an
Here is my example:
import org.eclipse.xtext.xbase.Functions
val Functions$Function3<Integer, Integer, Fucntions$Function2<Integer,Integer, Boolean>, Boolean> doFirst = [
Integer i, Integer j, Functions$Fucntion2<Integer, Integer, Boolean> f |
logInfo("Test", "test first")
f.apply(i, j)
true
]
val Functions$Function2<Integer, Integer, Boolean> doSecond = [
Integer i, Integer j |
logInfo("Test", "test second "+i+" "+j)
true
]
rule "function test"
when
System started
then
logInfo("test","test start")
doFirst.apply(1, 2, doSeconds)
logInfo("test","test finished")
end
The log result is:
[INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘dyn.rules’, using it anyway:
The field Tmp_dynRules.doFirst refers to the missing type Object
[INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘dyn.rules’
[INFO ] [.eclipse.smarthome.model.script.test] - test start
Thanks!
Now after the fix I see in the logs:
2017-07-06 08:27:57.303 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘dyn.rules’, using it anyway:
The field Tmp_dynRules.doFirst refers to the missing type Object
2017-07-06 08:27:57.315 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'dyn.rules’
2017-07-06 08:28:03.519 [INFO ] [.eclipse.smarthome.model.script.test] - test start
2017-07-06 08:28:03.529 [INFO ] [.eclipse.smarthome.model.script.Test] - test first