Java utility to test the business rule with out deploying to server – Oracle SOA Suite
This blog will explain how to use the Java API to test the
Oracle Business rule with out deploying to server in Oracle SOA Suite. This utility will read the input from the XML file and
generate the output XML.
Download the utility OracleBusinessRuleTester.rar
Steps to execute the utility from JDeveloper:
- Unzip OracleBusinessRuleTester.rar and import the project to JDeveloper
- Open OrderRequestRuleTester.java in JDeveloper
- Change the value OrderLineRequestDictionary141008 with the package name of the JAXB classes e.g. com.rule.test (in my case the package name is OrderLineRequestDictionary141008).
- The package name can be seen in the .rule file, open the .rule file in text editor and search for JaxbFactType
- Change OrderLineRepositoryType with the output class name. The output class name can be seen in the Decision function
- Change the below class imports accordingly.
import OrderLineRequestDictionary141008.OrderLineRepositoryType;
- Change the path to .rule file; rule input xml and the output folder path accordingly in the main method.
- Change the Decision Function name in the main method.
- Remove the existing jaxb_classes folder from the project class path and add the local jaxb_classes folder from the rule project to the class path.
- Right click OrderRequestRuleTester.java and click on Run
It
will use the input file OrderRequestInput.xml
from the RuleInputXML folder and
generate the output file Response.xml
in the RuleOutput folder
No comments:
Post a Comment