Hi Stephan.
Thank you for the replay. Next time I will read the javadoc before asking
here.
Regards,
Anderson
2011/3/30 <Stephan.Koops(a)we4it.com>
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.koops(a)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 <anderson.ufal(a)gmail.com>
To: Rules Users List <rules-users(a)lists.jboss.org>
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<ProcessInstance> 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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users