File-based vs. WebDAV Rule Repositories (10.1.3)

In production, it is recommended to use the WebDAV repository option. However, during development, this can be laborious, since the WebDAV repository is slower than the file-based repository, as it usually on a remote machine. Additionally, if the WebDAV repository connection is over a slow link, the UI can pause for several seconds at a time while the repository is accessed. The latency usually isn't an issue at runtime because the repository is accessed infrequently by the running decision service. However, during design-time, it can be advantageous to use a file-based repository for development and then change the decision service configuration to use WebDAV when the application is ready for production deployment.

There are two primary things that need to be done: (1) moving the dictionary or dictionaries from the file-based repository to the WebDAV repository, and (2) changing the decision service to use the WebDAV connection.

I've seen people try to just copy their file-based repository to their WebDAV repository, but this will not work. The repository itself is nothing more than a collection of appropriately named XML files representing the rules. A file-based repository is a zip file of these files, and a WebDAV repository is a directory of these files. So, copying the file-based repository into the WebDAV directory is putting a repository inside another repository!

To move a dictionary between a file and WebDAV repository or vice-versa:
1) In Rule Author, connect to the source repository.
2) Choose the "export" tab.
3) Export the dictionary and download the resulting export file.
4) Disconnect from the source repository.
5) Connect to the destination repository.
6) Choose the "import" tab.
7) Select the previously exported file and import that file.
8) Save the dictionary.
9) Done!

The next step is to modify the decision service to use the WebDAV repository. To do this, open the file:

JDev_Oracle_Home\jdev\mywork\application_name\
process_name\decisionservices\DecisionService\war\WEB-INF\
classes\decisionservices.xml

In the ruleEngineProvider element, "repository" element must be changed from something like:

<repository type="File">
<file>repositoryresource:CreditRatingRepository</file>
</repository>

to something like:

<repository type="WebDAV">
<webdav>
<url>http://myhost.mydomain.com:8080/rules/repository/</url>
<username>bob</username>
<password encrypted="true">r9CqG45+Cg=</password>
</webdav>
</repository>

Instead of manually creating the "webdav" element in decisionservices.xml, I usually create a new decision servce which uses the WebDAV repository and then copy the "repository" element created for that decision service into the one I want to change. This way, there's much less chance of a typo and I don't have to manually encrypt the password.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

a discussion of Oracle Business Rules and rules engines in general

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today