Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 6 Next »

Introduction

 

As seen in the simple example, our API is quite easy to use.

One of the big challenge is to know what is happening in the rule engine. The drools native API gives us all we need but you have to build all by yourself for each project you are doing.

The chtiJBUG drools APi comes with predefined listeners that when triggered will fulfill a history Container.

The insertObject, UpdateObject and retractObject take as a parameter the java beans you want to insert. It is stored in a Map therefor we are using the equals and hashcode to find the object to retract/update.

The fireAllRules and stasrtProcess speak by themselvesd a well as the dispose method that you should call to properly dispose all java objects.

The interesting par of it is getHistoryContainer which gives the list of event happening. There are 3 types of event ; about facts, processes and rules

Fact Events

 

DeletedFactHistoryEventEach time there is a retracted object in the working memory (session) from java or from RHS (then), this event is added
InsertedFactHistoryEventEach time there is an inserted object in the working memory (session) from java from  RHS (then) of a rule, this event is added
UpdatedFactHistoryEventEach time there is an upaded object in the working memory (session) from java or from RHS (then), this event is added

 

 

Process Events

 

NodeInstanceAfterHistoryEventThis event is fired when leaving a node
NodeInstanceBeforeHistoryEventThis event is fired when entering a node
ProcessStartHistoryEventWhen a process is started
ProcessEndHistoryEventWhen a process is stoped

Our current implementation is enough when using BPMN2 process for ruleflow (see below). We shall improve it in the future

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.

Rule Events

 

 

 

 

 

AfterRuleFlowActivatedHistoryEventEvent is fired when entering a ruleFlow group
AfterRuleFlowDeativatedHistoryEventEvent is fired when leaving a ruleflow group
AfterRuleFiredHistoryEventEvent fired after a rule was fired
BeforeRuleFiredHistoryEventEvent is fired before a rule is fired

 

Entity Model used for all history events

 

 

 

  • No labels