You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This pattern uses External rules to call a web service that is defined in another project. The great thing of this pattern is that it is triggered by the rule engine and not the flow.

Characteristics

In the table below the implementation charateristics by using an External Rule.

 TypeScoreDescription
Knowledge characteristicsImplicit or Explicit callImplicit callThis is an implicit call that is triggered by the rule engine each time when an input value changes.
 User set or System setSystem setSystem set.
 Parameters or complex modelParametersParameters. The complete profile can be used as input, but the Action attributes of the External rules are most likely to be the input parameters.
 Maintainability characteristicsInternal or External decoupledInternal

The values that are set by an external rule are system set.

 Automated or User Interaction? 
 Implementation complexity(star)An external rule is easy to implement but it alignment with model and code is necessary.
 Part of Application vs. Separate Deployment(star)The decoupled function is partly in the model, and partly in code. You should make sure that the code is deployed together with the project.
 Internals invisible(red star)Internals are visible.
 Testable(red star)Hard to test because of strong coupling with code (external rule implementation) and model.
 Autonomous/decoupled(red star)

Implementation of an external rule is seperated from the calling application. However, the implementation (code) of an external rule will create unwanted coupling because it has direct access to the domain model.

The implementation of an external rule has access to the complete profile. It is therefore important to document what values are needed by the external rule. You can set what values should trigger the external rule mechanism. Most likely are those identical to the input values. An external rule can be used as default on an attribute, but in general it could change the value of any attribute. There are no additional attributes required in your domain, keeping it clean.

 Reusable(red star)Because of a strong coupling with code and model it is hard to reuse an external rule.
 Out of the box (star)A new external rule that calls a specific web service has to be created by a developer.
  • No labels