Walkthrough: Synchronizing with a Local File System
|
PREVIOUS
NEXT
|
This walkthrough presents the following procedures for publishing and updating a rule project to and from a local folder:
In this walkthrough, you publish a rule project to a file system, and synchronize rule modifications across the Rule Studio and file system environments.
| Note |
| To complete this walkthrough you need ILOG Rule Solutions for Office.
|
Doing the Hello World Walkthrough
This walkthrough uses the result of the Hello World walkthrough to demonstrate synchronization with a file system. If you have already done the Hello World walkthrough, you can go directly to Publishing to a Local Folder. Otherwise, do the Hello World walkthrough (see Walkthrough: Hello World) and return to this one when you have finished.
Publishing to a Local Folder
When you publish to a file system, you use the Publish Wizard in Rule Studio to send the rules in your rule project to a RuleDoc on the file system.
To publish the Hello World rule project
-
In Visual Studio, open the HelloWorld solution you created for the Hello World walkthrough.
-
In the Solution Explorer, right-click the BusinessRules1 rule project, and select Publish from the shortcut menu.
Rule Studio opens the
Publish Wizard.
-
Select Local or Remote Folder as the destination, and click Next.
-
On page two of the wizard, specify a local directory as the Directory (such as C:\synch_test\HelloWorld).
For this walkthrough, you can leave the other fields empty.
-
Click Next.
When you publish a rule project for the first time, or if the root folder you specified does not exist, Rule Studio displays a message asking you to create the new folder.
-
Click OK, and then click Finish.
Rule Studio publishes the rule project to the directory you specified and displays a log of the operation.
-
Click Close.
The rule project is now stored as a RuleDoc, BusinessRules1.docx, in the directory you specified.
Opening the RuleDoc in Microsoft Word
Once a rule file is published to a file system, it can be modified using ILOG Rule Solutions for Office. In this step, you modify the RuleDoc in Microsoft Word.
To change the string
-
Go to the directory where you published the rule project and open BusinessRules1.docx in Microsoft Word.
-
Click Hello World and type a new message string, for example, Goodbye.
-
Save the file and exit Microsoft Word.
Updating the Rule Project
The rule now has two versions: one in ILOG Rule Studio, and one in the RuleDoc you created. To align the two versions of the rule, you need to update the rule project.
To update the rule project
-
In the Solution Explorer, right-click the BusinessRules1 rule project, and select Update from the shortcut menu.
-
Select Local or Remote Folder as the source, and click Next.
-
On page two of the wizard, specify the Root Folder and Rule Project Folder you used in Publishing to a Local Folder.
-
Click Next.
The wizard displays the rule file state as
Modified.
-
Click Finish.
Rule Studio updates the rule project to the directory you specified and displays a log of the operation.
-
Click Close.
The rule in your Visual Studio rule project now matches the RuleDoc on the file system.
-
Open the rule in the Rule Editor to see the new display message.