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

Mauricio Salatino salaboy at gmail.com
Thu Nov 12 11:26:54 EST 2009


Hi,
The persistence will work if you have save points (wait states) in your
process where all the process status is persisted.
If you have only automatic activities and your server crash, none of the
state will be persisted.
Greetings.

2009/11/12 <Pardeep.Ruhil at lntinfotech.com>

>
> 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
>
> ______________________________________________________________________
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091112/c87d9119/attachment.html 


More information about the rules-users mailing list