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.

Workflow Engine
Factory Namecom.accenture.aspire:aspire-business-rules
subType

default

InputsWorkflow rules from a file, incoming AspireObjects and Jobs
OutputsUpdates to the incoming AspireObjects and Jobs

Configuration


ElementTypeDefaultDescription
disableInternalTemplatesbooleanfalseTrue if the internally defined templates should be disabled (if for instance you wish to override them).
plan/@fileString
The file to load the plan (including templates) from. See here for the format of the plan file.
plan/@contentSourceString
The content source this workflow is associated. The content source is used for property expansion when loading the workflow rules
plan/@idString[MANDATORY]The id of the plan in the workflow file to run.
plan/@errorWorkflowBooleanfalseThis 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/@errorTolerantBooleanfalseWhen 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/@reloadlong900000ms
=15minutes
The period in ms after which rules should be automatically reloaded from the file. If 0, rules are not reloaded automatically.
librariesDirectory
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.

  • No labels