Workflow Engine (Aspire 2)

From wiki.searchtechnologies.com
Jump to: navigation, search

For Information on Aspire 3.1 Click Here


Workflow Engine (Aspire 2)
Factory Name  com.searchtechnologies.aspire:aspire-business-rules
subType  default
Inputs  Workflow rules from a file, incoming AspireObjects and Jobs
Outputs  Updates to the incoming AspireObjects and Jobs

In Aspire 2, Workflow replaces Business Rules that was available in Aspire Enterprise. Workflow in Aspire 2 is available in community.

The workflow engine is used in conjunction with the Workflow Manager to allow processing of workflow rules. The workflow engine uses rules defined in a file, most likely created and managed by the Workflow Manager. Workflow rules consist of conditions and actions. The engine evaluates these rules against incoming jobs and applies the actions to the jobs when the conditions are satisfied.

See here for more details on the rules and here for more information on the workflow file format.

The workflow engine loads rules for a single plan (subset of rules from the file) at startup and then optionally reloads them periodically (and also manually as requested via a servlet command). The rules are evaluated in the order specified in the plan. Processing of rules may be terminated by the rule if the condition is specified.

Configuration

Element Type Default Description
disableInternalTemplates boolean false True if the internally defined templates should be disabled (if for instance you wish to override them).
plan/@file String The file to load the plan (including templates) from. See here for the format of the plan file.
plan/@contentSource String The content source this workflow is associated. The content source is used for property expansion when loading the workflow rules
plan/@id String [MANDATORY] The id of the plan in the workflow file to run.
plan/@errorWorkflow Boolean false This engine is processing the error workflow for a content source. If there are no rules, throw an exception rather than letting the job succeed. This allows jobs sent to the error workflow to be seen as failures at the content source scanner
plan/@errorTolerant Boolean false When true, exceptions in rules will only effect the execution of the rule in which the exception occurs. Subsequent rules will be executed and the job will complete the rules engine stage successfully. If false, exceptions in rules will be re-thrown, rule processing will cease and the job will error
plan/@reload long 900000ms
=15minutes
The period in ms after which rules should be automatically reloaded from the file. If 0, rules are not reloaded automatically.
libraries Directory If set, the directory of any libraries of common workflow rules.

Example Configuration

  <component name="myBRE" subType="default" factoryName="aspire-business-rules">
    <debug>true</debug>
    <libraries>${config.dir}/workflow-libraries</libraries>
    <plan errorTolerant="false" file="${config.dir}\content-sources\test/workflow.xml" id="onPublish" reload="15s"/>
  </component>

Servlet Commands

The business rules executor supports the following servlet commands (via http://server:port/myBRM?cmd=XXXX&param=value):

reload

This command causes the business rules to be reloaded from the database immediately. This command does not recognize any parameters and is designed to be used after the rules have been updated using the Business Rules Manager.