wqe wqe [https://community.jboss.org/people/drupalspring] created the discussion
"Scope of the LocalTaskService" To view the discussion, visit: https://community.jboss.org/message/763152#763152 -------------------------------------------------------------- According to this https://community.jboss.org/thread/205868 thread ,since the session will keep the state likes facts or timer , I use "one process instance per session" +architecture+ in which each process instance is created and manutiplated by their own dedicate session. For the human task , I use the LocalTaskService which is defined as singleton Spring bean. So , after creating the session from an application scoped Knowledge base , I registered the work item handler using the following code . StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env); TaskService localTaskService = (TaskService)springContext.getBean("localTaskService"); LocalHTWorkItemHandler humanTaskHandler = new LocalHTWorkItemHandler(localTaskService, session); session.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler); All the session use the same localTaskService instance to call the related API to do the human task operations . Is it okay or should I create the localTaskService for each session ? I ask because it seems that calling the method of localTaskService instance will somehow invoke the method on StatefulKnowledgeSession instance . -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/763152#763152] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
