« Enabling debug output in a BPEL Decision Service (10.1.3) | Main | Three quick decision service tips (10.1.3) »

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.

TrackBack

TrackBack URL for this entry:
http://blogs.oracle.com/mte1521/mt-tb.cgi/9003

Comments (3)

Sanjay:

Can you please tell me what are the differences between the files repository and WebDav repository, in terms of advantages and disadvantages?

philvarner:

Please use the import/export facility of Rule Author instead of manually unzipping the file-based dictionary.

Also, ensure you can connect to the WebDAV repository with Rule Author before attempting to use the decision service to access it.

amit:

i created a web dav repository by unzipping the contents of file repository in dev_public and tried to create rules execution set in eclipse.

I am getting this error, RUL-01250: While creating a rule repository instance, the parameter is null.

i put these entries in xml ,


http://localhost/dav_public

MyDict
INITIAL

MyRS

Post a comment

About This Entry

This page contains a single entry from the blog posted on December 17, 2008 12:38 PM.

The previous post in this blog was Enabling debug output in a BPEL Decision Service (10.1.3).

The next post in this blog is Three quick decision service tips (10.1.3).

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle