use of ai.grakn.rpc.generated.GrpcGrakn.PutRule in project grakn by graknlabs.
the class TxObserver method putRule.
private void putRule(PutRule putRule) {
Label label = GrpcUtil.convert(putRule.getLabel());
Pattern when = GrpcUtil.convert(putRule.getWhen());
Pattern then = GrpcUtil.convert(putRule.getThen());
Rule rule = tx().putRule(label, when, then);
responseObserver.onNext(GrpcUtil.conceptResponse(rule));
}