[jBPM] - Resuming processes revisited
by Richard Evans
Richard Evans [https://community.jboss.org/people/r3vans] created the discussion
"Resuming processes revisited"
To view the discussion, visit: https://community.jboss.org/message/745059#745059
--------------------------------------------------------------
Firstly apologies for creating a new thread on an oft-discussed topic. This is partly because I want to make sure I get up-to-date info and partly because there is a new question in here.
JBPM 5.3
I have a number of processes with *100% async* service handlers. Many of the processes have handlers that poll a back-end for data, driven by a timer (delay=30s).
I am trying to resume after halt. By default I use a kSession created in in a spring context using the <drools:> namespace. As the config is fairly complex I use this to help me restore the session as follows. If I restore the session, I don't use the default session
kSession = JPAKnowledgeService.loadStatefulKnowledgeSession(id,
kSession.getKnowledgeBase(),
kSession.getSessionConfiguration(),
kSession.getEnvironment());
//?kSession.signalEvent("Trigger", null); //Seen this in one post?
Q1. Is there any reason I should NOT initialise from a prev ksession like this? I don’t want to have to create env and config in code as well as spring config
Q2. Should processes resume without further action (they don’t, even if not timers)
Q3. Should timers resume in 5.3? I know that this has been a subject of hot debate in the past.
Q4. If not, any suggestions on how to
* - EITHER resume processes stuck on timers
* - OR implement polling without timers (e.g. halt processes awaiting an a signal from an externally scheduled call to kSession.signalEvent())
Thanks in anticipation.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/745059#745059]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[jBPM] - Outofmemory exception when using jbpm api
by roxy1987
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion
"Outofmemory exception when using jbpm api"
To view the discussion, visit: https://community.jboss.org/message/747365#747365
--------------------------------------------------------------
Hi,
Whenever I use Configuration object to create process engine, it takes up a huge amount of memory and is not getting dereferenced for garbage collection on exit. I am using custom configuration. The code is below. Please some one get me out of this pickle. It is really urgent and any help would be highly appreciated. Thanks.
public static Configuration getConfiguration()
{
org.hibernate.cfg.Configuration configuration = new org.hibernate.cfg.Configuration();
Configuration configuration2 = new Configuration();
try
{
configuration.configure("jbpm.hibernate.cfg.xml");
String encrpytedPassword= configuration.getProperty("hibernate.connection.password");
String decryptedPwd = Encrypt.decrypt(encrpytedPassword);
configuration.setProperty("hibernate.connection.password",decryptedPwd);
configuration2.setHibernateSessionFactory(configuration.buildSessionFactory());
encrpytedPassword = null; decryptedPwd = null;
} catch(Exception e)
{
CustomErrorHandler.handleException(e, "CustomConfig");
}
configuration = null;
return configuration2;
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/747365#747365]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months