Search in sources :

Example 1 with RuleActorChain

use of org.thingsboard.server.actors.rule.RuleActorChain in project thingsboard by thingsboard.

the class TenantActor method process.

private void process(RuleChainDeviceMsg msg) {
    ToDeviceActorMsg toDeviceActorMsg = msg.getToDeviceActorMsg();
    ActorRef deviceActor = getOrCreateDeviceActor(toDeviceActorMsg.getDeviceId());
    RuleActorChain tenantChain = ruleManager.getRuleChain(this.context());
    RuleActorChain chain = new ComplexRuleActorChain(msg.getRuleChain(), tenantChain);
    deviceActor.tell(new RuleChainDeviceMsg(toDeviceActorMsg, chain), context().self());
}
Also used : ComplexRuleActorChain(org.thingsboard.server.actors.rule.ComplexRuleActorChain) RuleActorChain(org.thingsboard.server.actors.rule.RuleActorChain) ToDeviceActorMsg(org.thingsboard.server.common.msg.device.ToDeviceActorMsg) ComplexRuleActorChain(org.thingsboard.server.actors.rule.ComplexRuleActorChain) ActorRef(akka.actor.ActorRef)

Aggregations

ActorRef (akka.actor.ActorRef)1 ComplexRuleActorChain (org.thingsboard.server.actors.rule.ComplexRuleActorChain)1 RuleActorChain (org.thingsboard.server.actors.rule.RuleActorChain)1 ToDeviceActorMsg (org.thingsboard.server.common.msg.device.ToDeviceActorMsg)1