pc:RunRulesService

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.

Syntax

<pc:RunRulesService
     application="application"
     user="user
     pwd="password"
     rdbmstype="{jdbc|oledb|oracle}"
     dbconnectstr="dbconnectstr"
     owner="owner"

 

     alias="alias"
 
     waittime="waittime"
     assign:instance="/*/@id"
     assign:rsstate="RulesService/@state"
     assign:logurl="RulesService/@logurl"
     assign:error-hint='RulesService/@error-hint"
/>

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 flat file. Otherwise, it will run from repository, if repository tables are available. 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}"/>

Example

<root xmlns:pc="Processing.Command" xmlns:assign="Processing.Command.Assign">
 
  <pc:assign-default
        appname="MYAPP"
        owner="MYNAME" pwd="MYPASSWORD" rdbms="oracle"
        connectstr="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MYCOMPUTER.usoft.com)(PORT=1111))(CONNECT_DATA=(SID=XE)))" />
 
  <pc:RunRulesService waittime="10000"
        user="{$owner}" pwd="{$pwd}" rdbmstype="{$rdbms}" connection="{$connectstr}" application="{$appname}" 
        owner="{$owner}"
        alias="x1"
        assign:rsstate="RulesService/@state" assign:logurl="RulesService/@logurl" assign:hint="RulesService/@error-hint" />
 
  <pc:terminate
      test="normalize-space($instance)=''"
      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"/>
 
</root>

 

See also

pc:ConfigRulesService