I've been searching through settings I'm manually recreating the Java project 开发者_如何转开发I have within my Jrules BOM project however I see no way of implementing a custom interface. :(
No.
Your BOM is based on your XOM (JAVA classes) so basically:
You write your rules based on the BOM and the BOM is mapped to the XOM for runtime.
You will never instantiate an interface so there is no way for you to add it in the BOM and to use it to author a rule because you will never be able to execute it like this.
You can only import a classe implementing your interface and verbalize it within your BOM.
Meaning that at runtime, the engine will know what class (instance) to use.
BTW: Keep in mind that your BOM SHOULD BE as small as possible.
BOM can be referenced (just like JAVA project)
You should import in your BOM ONLY and ONLY the classes that users will need to author the rule.
Do not poluate the BOM and do not verbalize it by default. Otherwise you will end up with a proper unusable interface when using auto-completion. Except if you are using Categories but even thought, a very good practice is you to have a small BOM where only "rule creation useful class" are included.
By referencing, I mean you could have a rule project BOM1, a rule roject BOM2 and BOM3 containing only the BOMs. And a "proper" rule project containing just rules and referencing:
BOM1, BOM2 and BOM3 for instance.
Keep it simple :)
精彩评论