Configuring a Rules Service on the basis of an existing file

Previous Next

If you have an existing Rules Service .config file, you can configure a new Rules Service based on the settings in that file.

In this example, a new Rules Service with port number 7778 is based on configuration settings for an existing Rules Service at port number 7777. This is done by retrieving the parameters from the RulesService-7777.config file in the select attribute of pc:ConfigRulesService:

Settings not specifically passed in the call to pc:ConfigRulesService are copied from the existing file.

Settings specifically passed in the call to pc:ConfigRulesService (in the example, the owner setting) overwrite the corresponding setting found in the existing file.

Example

<example xmlns:pc="Processing.Command" >
     <pc:assign-nodeset mynodeset="{rulesservice:ReadConfig('c:\usd91\bin64\RulesService-7777.config')/config/param}" />
     <pc:ConfigRulesService
           port="7778"
           select="$mynodeset"
           owner="MYOWNER"
     />
</example>

 

See also

pc:ConfigRulesService

rulesservice:ReadConfig