[rules-users] Drools Flow :Persistence Problem : Restore StatefulKnowledgeSession from database

Pardeep.Ruhil at lntinfotech.com Pardeep.Ruhil at lntinfotech.com
Thu Nov 12 03:43:28 EST 2009


Hi,
I have a query regarding Drools Persistence.
I have a scenario in which I want to know whether drool persistence will 
work or not.
 
Lets say I am in between a workflow and suddenly my server creashes.
Suppose my workFlow was completed upto 3 steps with lets say 2 more steps 
to go.
As I am using drools-persistence Api methods so my data regarding the 
session , variable and process will go into the database specified by me 
in the tables 'SessionInfo', VaraibleInstanceInfo', and 
ProcessInstanceInfo and 'WorkItemInfo' tables of the database.
 
Now as my server crashed and I restarted my application.
So now I will restore the session object as my application got crashed 
from the database using the below code.
this.ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id, kbase
, null, env);
Now as I have restarted the server, KnowledgeBase object i.e. 'kbase' will 
become null and so as Environment Class object  'env'. 
Are KnowledgeBase object are stored as well in the database ???
or I have to create a new KnowledgeBase to load the previous 
StatefulKnowledgeSession object.
So in short how can I restore the previous session or If I cann't restore 
it can I do that by storing the Knowledgebase object and Environment 
Object in the database as well.
Please help me how can this be achieved. 
Thanks & Regards
Pardeep Ruhil


______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091112/628475d5/attachment.html 


More information about the rules-users mailing list