[rules-users] FAIL - getProcessInstances() from persisted StatefulKnowledgeSession

2011-03-29 Thread Anderson Neves
Hi everybody.

I configured the session persistence and persisted an instantiated process.
When I get the session from the database and use the method
getProcessInstances(), it returns an empty collection. But, when I call
getProcessInstance(1), and 1 is the InstanceId of the ProcessInstanceInfo
(table that contains the process instance), I get the correct process
instance. Is this a bug? See the code below.

statefulSession =
JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, knowledgeBase,
null, environment);

Collation processInstances =
statefulSession.getProcessInstances(); // FAIL - return empty collection

ProcessInstance processInstance = statefulSession.getProcessInstance(1); //
OK - return the process instance


Regards,
Anderson
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] FAIL - getProcessInstances() from persisted StatefulKnowledgeSession

2011-03-30 Thread Stephan . Koops
Hi,

see javadoc of 
org.drools.runtime.process.ProcessRuntime.getProcessInstances():

 * Returns a collection of currently active process instances.  Note 
that only process
 * instances that are currently loaded and active inside the engine 
will be returned.
 * When using persistence, it is likely not all running process 
instances will be loaded
 * as their state will be stored persistently.  It is recommended not 
to use this
 * method to collect information about the state of your process 
instances but to use
 * a history log for that purpose.

If no instance is loaded yet, that this behaviour is exactly as described.

Mit freundlichen Grüssen/Best regards

i. A.
Stephan Koops
Software Engineer
We4IT GmbH



***
Sie wollen aktuelle Informationen zu Lotus-Produkten? Dann besuchen Sie unseren 
Blog:

http://www.lotus-notes-domino-blog.de
***
 


We4IT GmbH
Technologiepark 11
33100 Paderborn

Tel: +49 5251 / 70993 - 24
Fax: +49 5251 / 70993 - 01
Mobil: 
E-Mail: stephan.ko...@we4it.com


Internet: http://www.we4it.com

HRB 20740, Amtsgericht Bremen 
Geschäftsführer: Stefan Sucker, Vicente Diaz Fernandez
USt.-ID.-Nr. DE 220 859 831

Diese Nachricht ist vertraulich und ausschließlich für die adressierte Person 
und/oder Organisation bestimmt. Vertrauliche und/oder spezifische Informationen 
können hierin enthalten sein. Falls Sie ein nicht beabsichtigter Empfänger 
dieser Nachricht sind, sind das Kopieren, Verteilen und/oder das Aufnehmen aus 
dem Inhalt resultierender Handlungen untersagt. Haben Sie diese Nachricht 
fehlerhaft und/oder unvollständig erhalten, benachrichtigen Sie uns bitte 
umgehend unter unseren oben genannten Kontaktmöglichkeiten.
This message is confidential and intended solely for the person or organization 
to which it is addressed. It may contain privileged and confidential 
information. If you are not the intended recipient, you should not copy, 
distribute or take any action on reliance on it. If you have received this 
transmission in error, please notify us immediately by e-mail at the above 
address.




From:
Anderson Neves 
To:
Rules Users List 
Date:
30.03.2011 05:34
Subject:
[rules-users] FAIL - getProcessInstances() from persisted 
StatefulKnowledgeSession



Hi everybody.

I configured the session persistence and persisted an instantiated 
process. When I get the session from the database and use the method 
getProcessInstances(), it returns an empty collection. But, when I call 
getProcessInstance(1), and 1 is the InstanceId of the ProcessInstanceInfo 
(table that contains the process instance), I get the correct process 
instance. Is this a bug? See the code below.

statefulSession = 
JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, knowledgeBase, 
null, environment);

Collation processInstances = 
statefulSession.getProcessInstances(); // FAIL - return empty collection

ProcessInstance processInstance = statefulSession.getProcessInstance(1); 
// OK - return the process instance


Regards,
Anderson___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] FAIL - getProcessInstances() from persisted StatefulKnowledgeSession

2011-03-30 Thread Anderson Neves
Hi Stephan.

Thank you for the replay. Next time I will read the javadoc before asking
here.

Regards,
Anderson

2011/3/30 
>
> Hi,
>
> see javadoc of
org.drools.runtime.process.ProcessRuntime.getProcessInstances():
>
>  * Returns a collection of currently active process instances.  Note
that only process
>  * instances that are currently loaded and active inside the engine
will be returned.
>  * When using persistence, it is likely not all running process
instances will be loaded
>  * as their state will be stored persistently.  It is recommended not
to use this
>  * method to collect information about the state of your process
instances but to use
>  * a history log for that purpose.
>
> If no instance is loaded yet, that this behaviour is exactly as described.
>
> Mit freundlichen Grüssen/Best regards
>
> i. A.
> Stephan Koops
> Software Engineer
> We4IT GmbH
>
>
> ***
> Sie wollen aktuelle Informationen zu Lotus-Produkten? Dann besuchen Sie
unseren Blog:
>
> http://www.lotus-notes-domino-blog.de
> ***
>
>
> We4IT GmbH
> Technologiepark 11
> 33100 Paderborn
>
> Tel: +49 5251 / 70993 - 24
> Fax: +49 5251 / 70993 - 01
> Mobil:
> E-Mail: stephan.ko...@we4it.com
>
> Internet: http://www.we4it.com
>
> HRB 20740, Amtsgericht Bremen
> Geschäftsführer: Stefan Sucker, Vicente Diaz Fernandez
> USt.-ID.-Nr. DE 220 859 831
>
> Diese Nachricht ist vertraulich und ausschließlich für die adressierte
Person und/oder Organisation bestimmt. Vertrauliche und/oder spezifische
Informationen können hierin enthalten sein. Falls Sie ein nicht
beabsichtigter Empfänger dieser Nachricht sind, sind das Kopieren, Verteilen
und/oder das Aufnehmen aus dem Inhalt resultierender Handlungen untersagt.
Haben Sie diese Nachricht fehlerhaft und/oder unvollständig erhalten,
benachrichtigen Sie uns bitte umgehend unter unseren oben genannten
Kontaktmöglichkeiten.
> This message is confidential and intended solely for the person or
organization to which it is addressed. It may contain privileged and
confidential information. If you are not the intended recipient, you should
not copy, distribute or take any action on reliance on it. If you have
received this transmission in error, please notify us immediately by e-mail
at the above address.
>
>
> From: Anderson Neves 
> To: Rules Users List 
> Date: 30.03.2011 05:34
> Subject: [rules-users] FAIL - getProcessInstances() from persisted
 StatefulKnowledgeSession
> 
>
>
> Hi everybody.
>
> I configured the session persistence and persisted an instantiated
process. When I get the session from the database and use the method
getProcessInstances(), it returns an empty collection. But, when I call
getProcessInstance(1), and 1 is the InstanceId of the ProcessInstanceInfo
(table that contains the process instance), I get the correct process
instance. Is this a bug? See the code below.
>
> statefulSession =
JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, knowledgeBase,
null, environment);
>
> Collation processInstances =
statefulSession.getProcessInstances(); // FAIL - return empty collection
>
> ProcessInstance processInstance = statefulSession.getProcessInstance(1);
// OK - return the process instance
>
>
> Regards,
> Anderson___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] FAIL - getProcessInstances() from persisted StatefulKnowledgeSession

2011-03-30 Thread Esteban Aliverti
Actually, as far as I remember, getProcessInstances() from a restored
session will ALWAYS return an empty list.

Best,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


2011/3/30 Anderson Neves 

> Hi Stephan.
>
> Thank you for the replay. Next time I will read the javadoc before asking
> here.
>
> Regards,
> Anderson
>
> 2011/3/30 
>
> >
> > Hi,
> >
> > see javadoc of
> org.drools.runtime.process.ProcessRuntime.getProcessInstances():
> >
> >  * Returns a collection of currently active process instances.  Note
> that only process
> >  * instances that are currently loaded and active inside the engine
> will be returned.
> >  * When using persistence, it is likely not all running process
> instances will be loaded
> >  * as their state will be stored persistently.  It is recommended not
> to use this
> >  * method to collect information about the state of your process
> instances but to use
> >  * a history log for that purpose.
> >
> > If no instance is loaded yet, that this behaviour is exactly as
> described.
> >
> > Mit freundlichen Grüssen/Best regards
> >
> > i. A.
> > Stephan Koops
> > Software Engineer
> > We4IT GmbH
> >
> >
> > ***
> > Sie wollen aktuelle Informationen zu Lotus-Produkten? Dann besuchen Sie
> unseren Blog:
> >
> > http://www.lotus-notes-domino-blog.de
> > ***
> >
> >
> > We4IT GmbH
> > Technologiepark 11
> > 33100 Paderborn
> >
> > Tel: +49 5251 / 70993 - 24
> > Fax: +49 5251 / 70993 - 01
> > Mobil:
> > E-Mail: stephan.ko...@we4it.com
> >
> > Internet: http://www.we4it.com
> >
> > HRB 20740, Amtsgericht Bremen
> > Geschäftsführer: Stefan Sucker, Vicente Diaz Fernandez
> > USt.-ID.-Nr. DE 220 859 831
> >
> > Diese Nachricht ist vertraulich und ausschließlich für die adressierte
> Person und/oder Organisation bestimmt. Vertrauliche und/oder spezifische
> Informationen können hierin enthalten sein. Falls Sie ein nicht
> beabsichtigter Empfänger dieser Nachricht sind, sind das Kopieren, Verteilen
> und/oder das Aufnehmen aus dem Inhalt resultierender Handlungen untersagt.
> Haben Sie diese Nachricht fehlerhaft und/oder unvollständig erhalten,
> benachrichtigen Sie uns bitte umgehend unter unseren oben genannten
> Kontaktmöglichkeiten.
> > This message is confidential and intended solely for the person or
> organization to which it is addressed. It may contain privileged and
> confidential information. If you are not the intended recipient, you should
> not copy, distribute or take any action on reliance on it. If you have
> received this transmission in error, please notify us immediately by e-mail
> at the above address.
> >
> >
> > From: Anderson Neves 
> > To: Rules Users List 
> > Date: 30.03.2011 05:34
> > Subject: [rules-users] FAIL - getProcessInstances() from persisted
>  StatefulKnowledgeSession
> > 
> >
> >
> > Hi everybody.
> >
> > I configured the session persistence and persisted an instantiated
> process. When I get the session from the database and use the method
> getProcessInstances(), it returns an empty collection. But, when I call
> getProcessInstance(1), and 1 is the InstanceId of the ProcessInstanceInfo
> (table that contains the process instance), I get the correct process
> instance. Is this a bug? See the code below.
> >
> > statefulSession =
> JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, knowledgeBase,
> null, environment);
> >
> > Collation processInstances =
> statefulSession.getProcessInstances(); // FAIL - return empty collection
> >
> > ProcessInstance processInstance = statefulSession.getProcessInstance(1);
> // OK - return the process instance
> >
> >
> > Regards,
> > Anderson___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users