IBusinessRulesServiceTModel Interface |
Namespace: SanteDB.Core.Services
public interface IBusinessRulesService<TModel> : IBusinessRulesService, IServiceImplementation where TModel : IdentifiedData
[Missing <typeparam name="TModel"/> documentation for "T:SanteDB.Core.Services.IBusinessRulesService`1"]
The IBusinessRulesServiceTModel type exposes the following members.
Name | Description | |
---|---|---|
Next |
Gets or sets the rule to be run after this rule (for chained rules)
| |
ServiceName |
Gets the service name
(Inherited from IServiceImplementation.) |
Name | Description | |
---|---|---|
AfterInsert(TModel) |
Called after an insert occurs.
| |
AfterInsert(Object) |
Called after an insert occurs
(Inherited from IBusinessRulesService.) | |
AfterObsolete(TModel) |
Called after obsolete has been committed
| |
AfterObsolete(Object) |
Called after obsolete committed
(Inherited from IBusinessRulesService.) | |
AfterQuery(IEnumerableObject) |
Called after query
(Inherited from IBusinessRulesService.) | |
AfterQuery(IEnumerableTModel) |
Called after a query has been executed
| |
AfterRetrieve(TModel) |
Called after retrieve of an object
| |
AfterRetrieve(Object) |
Called after retrieve
(Inherited from IBusinessRulesService.) | |
AfterUpdate(TModel) |
Called after update has been committed
| |
AfterUpdate(Object) |
Called after update committed
(Inherited from IBusinessRulesService.) | |
BeforeInsert(TModel) |
Called before an insert occurs
| |
BeforeInsert(Object) |
Called before an insert occurs
(Inherited from IBusinessRulesService.) | |
BeforeObsolete(TModel) |
Called before obsolete occurs
| |
BeforeObsolete(Object) |
Called before obsolete
(Inherited from IBusinessRulesService.) | |
BeforeUpdate(TModel) |
Called before an update occurs
| |
BeforeUpdate(Object) |
Called before an update occurs
(Inherited from IBusinessRulesService.) | |
Validate(TModel) |
Called to validate the data provided
| |
Validate(Object) |
Called to validate a specific object
(Inherited from IBusinessRulesService.) |
When a business rules implementation is attached to the service context, or via the AddBusinessRule method, the SanteDB server call the appropiate Before/After functions on the implementation, before checking the Next property to follow the next business rule in the chain.
The JavaScript Business Rules Engine which loads data from installed applets is an example of an implementation of this service which translates events into Javascript callbacks. Implementers can use this service to:
Note: This can be done, instead with events on the persistence layer on the SanteDB datalayer, however there may come a time when a rule is fired without persistence occurring