wp ren
2013-04-11 02:05:30 UTC
wp ren [https://community.jboss.org/people/bird86] created the document:
"JBPM5.4 integration Spring, Spring using the JTA transaction manager"
To view the document, visit: https://community.jboss.org/docs/DOC-48575
--------------------------------------------------------------
need the jars of the followingïŒ
Loading Image... Loading Image...
public class IntegrationSpringTest {
         @Test
         public void testSpring() {
                   JBPMHelper.setupDataSource();
Â
                   ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                                       "spring-conf.xml");
Â
                   StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) context
                                       .getBean("ksession");
                   LocalHTWorkItemHandler humanTaskHandler = (LocalHTWorkItemHandler)context.getBean("localHTWorkItemHandler");
                   UserGroupCallbackManager.getInstance().setCallback(new DefaultUserGroupCallbackImpl("classpath:/usergroups.properties"));
                   ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
Â
                   JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);
Â
                   ksession.startProcess("com.sample.bpmn.hello");
Â
                   logger.dispose();
                   ksession.dispose();
Â
Â
                   try {
                             humanTaskHandler.dispose();
                   } catch (Exception e) {
Â
                   }
Â
Â
Â
                   /*
                   * org.springframework.orm.jpa.LocalEntityManagerFactoryBean;
                   * org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
                   */
         }
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-48575]
Create a new document in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034]
"JBPM5.4 integration Spring, Spring using the JTA transaction manager"
To view the document, visit: https://community.jboss.org/docs/DOC-48575
--------------------------------------------------------------
need the jars of the followingïŒ
Loading Image... Loading Image...
public class IntegrationSpringTest {
         @Test
         public void testSpring() {
                   JBPMHelper.setupDataSource();
Â
                   ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                                       "spring-conf.xml");
Â
                   StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) context
                                       .getBean("ksession");
                   LocalHTWorkItemHandler humanTaskHandler = (LocalHTWorkItemHandler)context.getBean("localHTWorkItemHandler");
                   UserGroupCallbackManager.getInstance().setCallback(new DefaultUserGroupCallbackImpl("classpath:/usergroups.properties"));
                   ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
Â
                   JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);
Â
                   ksession.startProcess("com.sample.bpmn.hello");
Â
                   logger.dispose();
                   ksession.dispose();
Â
Â
                   try {
                             humanTaskHandler.dispose();
                   } catch (Exception e) {
Â
                   }
Â
Â
Â
                   /*
                   * org.springframework.orm.jpa.LocalEntityManagerFactoryBean;
                   * org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
                   */
         }
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-48575]
Create a new document in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034]