Lambda for functions expressions in Openhab 2

I am using functions implemented via lambda expression as explained under

In OPENHAB 2 I am receiving the following error

2015-10-11 05:28:48.530 [ERROR] [.e.s.c.s.ScriptExecutionThread] - Error during the execution of rule ‘absolute Feuchte Keller 1’: The name ‘.state’ cannot be resolved to an item or type.

Questions: Is this language ability supported by OPENHAB 2?

Did you pass in the item as a parameter or are you trying to access it directly by name as you would in a rule?

Hi Daniel

the lambda looks like this
val org.eclipse.xtext.xbase.lib.Functions$Function6 Feuchte = [
org.openhab.core.library.items.NumberItem Temp_room,
org.openhab.core.library.items.NumberItem Humidity_absolute_room,
org.openhab.core.library.items.NumberItem DEWpoint_absolute_room,
org.openhab.core.library.items.StringItem Luft_warn_txt_room,
org.openhab.core.library.items.SwitchItem Luft_warn_room,
Boolean Window_room

if (Delayed_Start.state == ON) {
var Number afau = Humidity_absolute.state as DecimalType
var Number tin = Temp_room.state as DecimalType
var Number afin = Humidity_absolute_room.state as DecimalType
var Number dewpoint = DEWpoint_absolute_room.state as DecimalType
val Number mintin = 16 // Minimal Raumtemperatur
var Number wtin = 0 //
val Number tol_dif = 2 // Min Abstand vom Taupunkt

	// Näherungsformel für Wandtemperatur aus Innentemperatur
	wtin = tin - 2
	if ((wtin-tol_dif) < dewpoint){
		if (afau <= (afin - 0.8)){
		else {
			Luft_warn_txt_room.sendCommand("L&uuml;ften oder Trocknen")
	else {
	        if (Window_room) {
	        	if ((afau < (afin - 2)) && (tin > mintin))
		        if ((afau >= (afin - 0.8)) || (tin < mintin))


calling the function is done by

So I guess I am doing both.
I pass values(items, variables) which are variable as parameter but also use some items with their global name.

Looks like Delayed_Start isn’t being passed in (and lambda functions have no knowledge of anything outside of what is passed in as a parameter unfortunately)

Ok. This seems to be an incompatibility in comparison to openhab 1.
I could pass these parameters but I have read that there is a limit in the numbers of parameters one can pass.

I have changed the function and have everything pass via parameter.
this did not change the error.

How i can use group as parametr?