nools.js
function NoolsFire(n) {
		RED.nodes.createNode(this,n);
		var node = this;

		node.name = n.name;
		node.topic = n.topic;

		node.session = RED.nodes.getNode(n.session).session;
		node.messages = RED.nodes.getNode(n.session).messages;
		RED.nodes.getNode(n.session).on("publish", function(msg) {
			if( !node.topic || node.topic === msg.topic) {
				node.send(msg);
			}
		});

		node.session.on("fire", function(name, rule) {
			node.send([null, {
				topic: node.topic,
				payload: name,
				facts: node.session.getFacts(),
				name: name
			}]);
		});
	}
function NoolsFire(n) {
		RED.nodes.createNode(this,n);
		var node = this;

		node.name = n.name;
		node.topic = n.topic;

		node.session = RED.nodes.getNode(n.session).session;
		node.messages = RED.nodes.getNode(n.session).messages;
		RED.nodes.getNode(n.session).on("publish", function(msg) {
			if( !node.topic || node.topic === msg.topic) {
				node.send(msg);
			}
		});

		node.session.on("fire", function(name, rule) {
			node.send([null, {
				topic: node.topic,
				payload: name,
				facts: node.session.getFacts(),
				name: name
			}]);
		});
	}
////////////////////////////////////////////////////////////////////////////// NoolsFire: Output node of a nools flow                                     // //////////////////////////////////////////////////////////////////////////////