Previous Next

Starts a USoft Rules Service for the specified application, using the specified database connection attributes.

This is an anonymous Rules Service. To configure and start a named Rules Service, use pc:ConfigRulesService instead.

There is no return value.






















templatefile        ::=  path


message-mode        ::=  { developer | enduser }

definitionsfrom     ::=  { Auto | DictTable | DictLocated }

flatfilelocation    ::=  path


languages           ::=  { DEFAULT | language-name }

decisions           ::=  { null | decision-name }

interval            ::=  { 0   | integer }

idletimeout         ::=  { 0   | integer }

servertimeout       ::=  { 600 | integer }


loglevel            ::=  { No Logging | Error | Information | Debug }

logdir              ::=  { usoft-log-dir\rules_engine | absolute-path }

logfilenameprefix   ::=  { application | name-literal }

minengines          ::=  { 1  | integer }

maxengines          ::=  { 50 | integer }

The Rules Service will use a transient port number.

The optional alias attribute allows you to specify a string that can be used as a handle for referring to the started Rules Service in subsequent calls. If you do not pass alias, then the started Rules Service can still be referenced by an internal name traceable by pointing at the alias attribute, or its id equivalent, of the directive's embedded XML. The alias value is allowed to be any literal string value. Thus:

<pc:RunRulesService alias="myalias" ... />
<pc:StopRulesService alias="myalias"/>

is equivalent to :

<pc:RunRulesService assign:myalias="/*/@alias" ... />
<pc:StopRulesService alias="{$myalias}"/>

If you omit definitionsfrom, or if you leave it to the default 'Auto', the Rules Service first looks in the \APP directory of your USoft installation for a file called application.con. If such a file is found, the Rules Service will run from this file. Otherwise, it will run from repository, if repository tables are available.

If you set definitionsfrom to 'DictTable', the Rules Service will run from repository. If you set it to 'DictLocated', you must supply a flatfilelocation path, and the Rules Service will run from the application.con file (if any) found in the flatfilelocation path.

The list of attributes of pc:RunRulesService corresponds to the list of Rules Service settings that you can set in USoft Binder's Rules Service Property Sheet and in the ure.config wizard. Details are in the "Manual Rules Service configuration" topic. For each optional attribute, if you omit the attribute, the indicated default will be applied.

If you omit logdir, the log directory will be set to the rules_engine subdirectory of the USoft log directory that you chose during Setup.

If you omit logfilenameprefix, the Logfile Name Prefix will be set to the value that you pass for the application attribute.



<root xmlns:pc="Processing.Command" xmlns:assign="Processing.Command.Assign">
        owner="MYNAME" pwd="MYPASSWORD" rdbms="oracle"
  <pc:RunRulesService waittime="10000"
        user="{$owner}" pwd="{$pwd}" rdbmstype="{$rdbms}" connection="{$connectstr}" application="{$appname}" 
        assign:rsstate="RulesService/@state" assign:logurl="RulesService/@logurl" assign:hint="RulesService/@error-hint" />
      msg="{concat('application service did not start (state=', $rsstate, ') logurl=', $logurl, 'hint=', $hint)}" 
      exitcode="-1"  />
        Actions to be performed by the Rules Service
   <pc:StopRulesService  alias="x1"/>


See also