properties.put("domain", "example");
properties.put("connector", "example");
properties.put("location.foo", "example2");
getBundleContext().registerService(ExampleDomain.class.getName(), exampleMock, properties);
RuleManager ruleManager = getOsgiService(RuleManager.class);
ruleManager.addImport(ExampleDomain.class.getName());
ruleManager.addImport(LogEvent.class.getName());
ruleManager.addImport(TransformationEngine.class.getName());
ruleManager.addImport(ModelUtils.class.getName());
ruleManager.addImport(ExampleResponseModel.class.getName());
ruleManager.addImport(ExampleRequestModel.class.getName());
ruleManager.addImport(ModelDescription.class.getName());
ruleManager.addImport(OpenEngSBModelEntry.class.getName());
ruleManager.addGlobal(ExampleDomain.class.getName(), "example2");
ruleManager.addGlobal(TransformationEngine.class.getName(), "ekbTransformationService");
String sourceDescription = "ModelDescription source = new ModelDescription(\"%s\", \"%s\");";
String targetDescription = "ModelDescription target = new ModelDescription(\"%s\", \"%s\");";
sourceDescription =
String.format(sourceDescription, ExampleResponseModel.class.getName(), exampleDomainVersion.toString());
targetDescription =
String.format(targetDescription, ExampleRequestModel.class.getName(), exampleDomainVersion.toString());
ruleManager.add(
new RuleBaseElementId(RuleBaseElementType.Rule, "example"),
""
+ "when\n"
+ " event : LogEvent()\n"
+ "then\n"