jBPM 6.0 ksession clustering -


my application based on jbpm 5 , because of clustering problems testing jbpm 6 replace old version. used example from: https://github.com/jsvitak/jbpm-6-examples/tree/master/rewards-basic

unfortunately, far have tested it, still has issues sharing same ksession multiple nodes.

the runtimemanager set use singleton strategy.

  runtimeenvironment environment = runtimeenvironmentbuilder.factory.get()             .newdefaultbuilder()             .entitymanagerfactory(emf)             .addasset(resourcefactory.newclasspathresource("rewards-basic.bpmn"), resourcetype.bpmn2)             .get();          environment.getenvironment().set(environmentname.use_pessimistic_locking, true);     singletonmanager = runtimemanagerfactory.factory.get().newsingletonruntimemanager(environment);     runtimeengine runtime = singletonmanager.getruntimeengine(new context() {         @override         public object getcontextid() {             return singletonmanager.getidentifier();         }     });   kiesession ksession = runtime.getkiesession();          map<string, object> params = new hashmap<string, object>();         params.put("recipient", recipient);         processinstance processinstance = ksession.startprocess(                 "com.sample.rewards-basic", params); 

the test simple:

  1. create first process on node 1
  2. create second process on node 2

and after step two, facing same hibernate exception jbpm 5:

caused by: org.hibernate.staleobjectstateexception: row updated or deleted transaction (or unsaved-value mapping incorrect): [org.drools.persistence.info.sessioninfo#1]

on jbpm 5 reloading ksession database, refering workaround.

my application has requirement same process instance must accessible different users logged different nodes. processes have human task, stateful , considered long-running (days, months). tasks carried out quickly.

so, questions are:

  1. can use same ksession on multiple nodes?
  2. if not, other mechanisms of jbpm 6 synchronize processes' states between nodes?
  3. if use different approach, timers , events work in multiple nodes environment?

some answers questions above have been written in jbpm forum: https://community.jboss.org/message/863749#863749


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -