Closed JessieAMorris closed 11 years ago
Attached is a code example that casuses this to happen.
What I expect to happen: Rather than the event attribute test coming through as null, I expect it to come through as the value "false".
ruleset a41x188 { meta { name "neuAppTemplate" description << myCloud appication template Copyright 2012 Kynetx, All Rights Reserved >> author "Jessie" logging on use module a169x701 alias CloudRain } global { thisRID = meta:rid(); thisECI = meta:eci(); } // ------------------------------------------------------------------------ rule test_Selected { select when web cloudAppSelected pre { appMenu = [ { "label" : "More", "action" : "more" } ]; appContent = << Hello, World! <a href="#!/app/#{thisRID}/sendEvent">Send Event</a> <a href="#!/app/#{thisRID}/getVariable">Get Variable</a> >>; } { CloudRain:createLoadPanel("appTemplate", appMenu, appContent); } fired { set ent:test true; } } rule test_sendEvent { select when web cloudAppAction action re/sendEvent/ pre { cid = { "cid": thisECI }; attrs = { "test": false, "_rids": "a41x188" }; } { event:send(cid, "test", "testSendEvent") with attrs = attrs; alert("Event sent with: " + attrs.encode()); } } rule test_sendEventCatcher { select when test testSendEvent pre { test = event:attr("test"); testFinal = (test.isnull()) => "WAS NULL" | test; } { noop(); } fired { set ent:test testFinal; } } rule test_getEntity { select when web cloudAppAction action re/getVariable/ pre { entity = ent:test; } { alert(entity); } } // ------------------------------------------------------------------------ // Beyond here there be dragons :) // ------------------------------------------------------------------------ }
Fixed in 4660ab7
Attached is a code example that casuses this to happen.
What I expect to happen: Rather than the event attribute test coming through as null, I expect it to come through as the value "false".