Creating an Instance
Daniel Selman 2700022VQ3 Comment (1) Visits (5929)
I had a question today from a colleague learning JRules: "How does a rule create an instance of a BOM type?"
The short answer is that you don't -- at least not directly. You need to create a factory method on one of your BOM classes using the BOM editor, verbalize the method, and then instantiate the type using B2X scripting. You can then return the type from the BOM method. Either the factory method can be made static or you need to put it on a class that you can navigate to from your rule.
For an example you can see the crea