Search in sources :

Example 1 with MyEntity

use of org.jbpm.persistence.session.objects.MyEntity in project jbpm by kiegroup.

the class VariablePersistenceStrategyTest method testAbortWorkItemWithVariablePersistence.

@Test
public void testAbortWorkItemWithVariablePersistence() throws Exception {
    MyEntity myEntity = new MyEntity("This is a test Entity");
    MyVariableSerializable myVariableSerializable = new MyVariableSerializable("This is a test SerializableObject");
    EntityManager em = emf.createEntityManager();
    UserTransaction utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
    utx.begin();
    em.joinTransaction();
    em.persist(myEntity);
    utx.commit();
    em.close();
    Environment env = createEnvironment();
    KieBase kbase = createKnowledgeBase("VPSProcessWithWorkItems.rf");
    KieSession ksession = createSession(kbase, env);
    logger.debug("### Starting process ###");
    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("x", "SomeString");
    parameters.put("y", myEntity);
    parameters.put("z", myVariableSerializable);
    long processInstanceId = ksession.startProcess("com.sample.ruleflow", parameters).getId();
    TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
    WorkItem workItem = handler.getWorkItem();
    assertNotNull(workItem);
    logger.debug("### Retrieving process instance ###");
    ksession = reloadSession(ksession, kbase, env);
    WorkflowProcessInstance processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    assertEquals("SomeString", processInstance.getVariable("x"));
    assertEquals("This is a test Entity", ((MyEntity) processInstance.getVariable("y")).getTest());
    assertEquals("This is a test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("z")).getText());
    assertNull(processInstance.getVariable("a"));
    assertNull(processInstance.getVariable("b"));
    assertNull(processInstance.getVariable("c"));
    logger.debug("### Completing first work item ###");
    Map<String, Object> results = new HashMap<String, Object>();
    results.put("zeta", processInstance.getVariable("z"));
    results.put("equis", processInstance.getVariable("x") + "->modifiedResult");
    // we simulate a failure here, aborting the work item
    ksession.getWorkItemManager().abortWorkItem(workItem.getId());
    workItem = handler.getWorkItem();
    assertNotNull(workItem);
    logger.debug("### Retrieving process instance ###");
    ksession = reloadSession(ksession, kbase, env);
    processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    logger.debug("######## Getting the already Persisted Variables #########");
    // we expect the variables to be unmodifed
    assertEquals("SomeString", processInstance.getVariable("x"));
    assertEquals("This is a test Entity", ((MyEntity) processInstance.getVariable("y")).getTest());
    assertEquals("This is a test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("z")).getText());
    assertEquals("Some new String", processInstance.getVariable("a"));
    assertEquals("This is a new test Entity", ((MyEntity) processInstance.getVariable("b")).getTest());
    assertEquals("This is a new test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("c")).getText());
}
Also used : MyEntity(org.jbpm.persistence.session.objects.MyEntity) UserTransaction(javax.transaction.UserTransaction) TestWorkItemHandler(org.jbpm.persistence.session.objects.TestWorkItemHandler) HashMap(java.util.HashMap) WorkItem(org.kie.api.runtime.process.WorkItem) InitialContext(javax.naming.InitialContext) EntityManager(javax.persistence.EntityManager) KieBase(org.kie.api.KieBase) Environment(org.kie.api.runtime.Environment) KieSession(org.kie.api.runtime.KieSession) MyVariableSerializable(org.jbpm.persistence.session.objects.MyVariableSerializable) WorkflowProcessInstance(org.kie.api.runtime.process.WorkflowProcessInstance) AbstractBaseTest(org.jbpm.test.util.AbstractBaseTest) Test(org.junit.Test)

Example 2 with MyEntity

use of org.jbpm.persistence.session.objects.MyEntity in project jbpm by kiegroup.

the class VariablePersistenceStrategyTest method testPersistenceVariablesSubProcess.

@Test
public void testPersistenceVariablesSubProcess() throws NamingException, NotSupportedException, SystemException, RollbackException, HeuristicMixedException, HeuristicRollbackException {
    MyEntity myEntity = new MyEntity("This is a test Entity with annotation in fields");
    MyEntityMethods myEntityMethods = new MyEntityMethods("This is a test Entity with annotations in methods");
    MyEntityOnlyFields myEntityOnlyFields = new MyEntityOnlyFields("This is a test Entity with annotations in fields and without accesors methods");
    MyVariableSerializable myVariableSerializable = new MyVariableSerializable("This is a test SerializableObject");
    EntityManager em = emf.createEntityManager();
    UserTransaction utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
    utx.begin();
    em.joinTransaction();
    em.persist(myEntity);
    em.persist(myEntityMethods);
    em.persist(myEntityOnlyFields);
    utx.commit();
    em.close();
    Environment env = createEnvironment();
    KieBase kbase = createKnowledgeBase("VariablePersistenceStrategySubProcess.rf");
    KieSession ksession = createSession(kbase, env);
    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("x", "SomeString");
    parameters.put("y", myEntity);
    parameters.put("m", myEntityMethods);
    parameters.put("f", myEntityOnlyFields);
    parameters.put("z", myVariableSerializable);
    long processInstanceId = ksession.startProcess("com.sample.ruleflow", parameters).getId();
    TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
    WorkItem workItem = handler.getWorkItem();
    assertNotNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    ProcessInstance processInstance = ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null);
    workItem = handler.getWorkItem();
    assertNotNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    processInstance = ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null);
    workItem = handler.getWorkItem();
    assertNotNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    processInstance = ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null);
    workItem = handler.getWorkItem();
    assertNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    processInstance = ksession.getProcessInstance(processInstanceId);
    assertNull(processInstance);
}
Also used : MyEntity(org.jbpm.persistence.session.objects.MyEntity) UserTransaction(javax.transaction.UserTransaction) TestWorkItemHandler(org.jbpm.persistence.session.objects.TestWorkItemHandler) HashMap(java.util.HashMap) WorkItem(org.kie.api.runtime.process.WorkItem) InitialContext(javax.naming.InitialContext) MyEntityOnlyFields(org.jbpm.persistence.session.objects.MyEntityOnlyFields) EntityManager(javax.persistence.EntityManager) MyEntityMethods(org.jbpm.persistence.session.objects.MyEntityMethods) KieBase(org.kie.api.KieBase) Environment(org.kie.api.runtime.Environment) KieSession(org.kie.api.runtime.KieSession) ProcessInstance(org.kie.api.runtime.process.ProcessInstance) WorkflowProcessInstance(org.kie.api.runtime.process.WorkflowProcessInstance) MyVariableSerializable(org.jbpm.persistence.session.objects.MyVariableSerializable) AbstractBaseTest(org.jbpm.test.util.AbstractBaseTest) Test(org.junit.Test)

Example 3 with MyEntity

use of org.jbpm.persistence.session.objects.MyEntity in project jbpm by kiegroup.

the class VariablePersistenceStrategyTest method testPersistenceVariables.

@Test
public void testPersistenceVariables() throws NamingException, NotSupportedException, SystemException, RollbackException, HeuristicMixedException, HeuristicRollbackException {
    EntityManager em = emf.createEntityManager();
    UserTransaction utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
    if (utx.getStatus() == Status.STATUS_NO_TRANSACTION) {
        utx.begin();
        em.joinTransaction();
    }
    int origNumMyEntities = em.createQuery("select i from MyEntity i").getResultList().size();
    int origNumMyEntityMethods = em.createQuery("select i from MyEntityMethods i").getResultList().size();
    int origNumMyEntityOnlyFields = em.createQuery("select i from MyEntityOnlyFields i").getResultList().size();
    if (utx.getStatus() == Status.STATUS_ACTIVE) {
        utx.commit();
    }
    // Setup entities
    MyEntity myEntity = new MyEntity("This is a test Entity with annotation in fields");
    MyEntityMethods myEntityMethods = new MyEntityMethods("This is a test Entity with annotations in methods");
    MyEntityOnlyFields myEntityOnlyFields = new MyEntityOnlyFields("This is a test Entity with annotations in fields and without accesors methods");
    MyVariableSerializable myVariableSerializable = new MyVariableSerializable("This is a test SerializableObject");
    // persist entities
    utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
    utx.begin();
    em.joinTransaction();
    em.persist(myEntity);
    em.persist(myEntityMethods);
    em.persist(myEntityOnlyFields);
    utx.commit();
    em.close();
    // More setup
    Environment env = createEnvironment();
    KieBase kbase = createKnowledgeBase("VariablePersistenceStrategyProcess.rf");
    KieSession ksession = createSession(kbase, env);
    logger.debug("### Starting process ###");
    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("x", "SomeString");
    parameters.put("y", myEntity);
    parameters.put("m", myEntityMethods);
    parameters.put("f", myEntityOnlyFields);
    parameters.put("z", myVariableSerializable);
    // Start process
    long processInstanceId = ksession.startProcess("com.sample.ruleflow", parameters).getId();
    TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
    WorkItem workItem = handler.getWorkItem();
    assertNotNull(workItem);
    // Test results
    List<?> result = emf.createEntityManager().createQuery("select i from MyEntity i").getResultList();
    assertEquals(origNumMyEntities + 1, result.size());
    result = emf.createEntityManager().createQuery("select i from MyEntityMethods i").getResultList();
    assertEquals(origNumMyEntityMethods + 1, result.size());
    result = emf.createEntityManager().createQuery("select i from MyEntityOnlyFields i").getResultList();
    assertEquals(origNumMyEntityOnlyFields + 1, result.size());
    logger.debug("### Retrieving process instance ###");
    ksession = reloadSession(ksession, kbase, env);
    WorkflowProcessInstance processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    assertEquals("SomeString", processInstance.getVariable("x"));
    assertEquals("This is a test Entity with annotation in fields", ((MyEntity) processInstance.getVariable("y")).getTest());
    assertEquals("This is a test Entity with annotations in methods", ((MyEntityMethods) processInstance.getVariable("m")).getTest());
    assertEquals("This is a test Entity with annotations in fields and without accesors methods", ((MyEntityOnlyFields) processInstance.getVariable("f")).test);
    assertEquals("This is a test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("z")).getText());
    assertNull(processInstance.getVariable("a"));
    assertNull(processInstance.getVariable("b"));
    assertNull(processInstance.getVariable("c"));
    logger.debug("### Completing first work item ###");
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null);
    workItem = handler.getWorkItem();
    assertNotNull(workItem);
    logger.debug("### Retrieving process instance ###");
    ksession = reloadSession(ksession, kbase, env);
    processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    assertEquals("SomeString", processInstance.getVariable("x"));
    assertEquals("This is a test Entity with annotation in fields", ((MyEntity) processInstance.getVariable("y")).getTest());
    assertEquals("This is a test Entity with annotations in methods", ((MyEntityMethods) processInstance.getVariable("m")).getTest());
    assertEquals("This is a test Entity with annotations in fields and without accesors methods", ((MyEntityOnlyFields) processInstance.getVariable("f")).test);
    assertEquals("This is a test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("z")).getText());
    assertEquals("Some new String", processInstance.getVariable("a"));
    assertEquals("This is a new test Entity", ((MyEntity) processInstance.getVariable("b")).getTest());
    assertEquals("This is a new test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("c")).getText());
    logger.debug("### Completing second work item ###");
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null);
    workItem = handler.getWorkItem();
    assertNotNull(workItem);
    logger.debug("### Retrieving process instance ###");
    ksession = reloadSession(ksession, kbase, env);
    processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    assertEquals("SomeString", processInstance.getVariable("x"));
    assertEquals("This is a test Entity with annotation in fields", ((MyEntity) processInstance.getVariable("y")).getTest());
    assertEquals("This is a test Entity with annotations in methods", ((MyEntityMethods) processInstance.getVariable("m")).getTest());
    assertEquals("This is a test Entity with annotations in fields and without accesors methods", ((MyEntityOnlyFields) processInstance.getVariable("f")).test);
    assertEquals("This is a test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("z")).getText());
    assertEquals("Some changed String", processInstance.getVariable("a"));
    assertEquals("This is a changed test Entity", ((MyEntity) processInstance.getVariable("b")).getTest());
    assertEquals("This is a changed test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("c")).getText());
    logger.debug("### Completing third work item ###");
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null);
    workItem = handler.getWorkItem();
    assertNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNull(processInstance);
}
Also used : UserTransaction(javax.transaction.UserTransaction) MyEntity(org.jbpm.persistence.session.objects.MyEntity) TestWorkItemHandler(org.jbpm.persistence.session.objects.TestWorkItemHandler) HashMap(java.util.HashMap) WorkItem(org.kie.api.runtime.process.WorkItem) InitialContext(javax.naming.InitialContext) MyEntityOnlyFields(org.jbpm.persistence.session.objects.MyEntityOnlyFields) EntityManager(javax.persistence.EntityManager) MyEntityMethods(org.jbpm.persistence.session.objects.MyEntityMethods) KieBase(org.kie.api.KieBase) Environment(org.kie.api.runtime.Environment) KieSession(org.kie.api.runtime.KieSession) MyVariableSerializable(org.jbpm.persistence.session.objects.MyVariableSerializable) WorkflowProcessInstance(org.kie.api.runtime.process.WorkflowProcessInstance) AbstractBaseTest(org.jbpm.test.util.AbstractBaseTest) Test(org.junit.Test)

Example 4 with MyEntity

use of org.jbpm.persistence.session.objects.MyEntity in project jbpm by kiegroup.

the class VariablePersistenceStrategyTest method testWorkItemWithVariablePersistence.

@Test
public void testWorkItemWithVariablePersistence() throws Exception {
    MyEntity myEntity = new MyEntity("This is a test Entity");
    MyVariableSerializable myVariableSerializable = new MyVariableSerializable("This is a test SerializableObject");
    EntityManager em = emf.createEntityManager();
    UserTransaction utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
    utx.begin();
    em.joinTransaction();
    em.persist(myEntity);
    utx.commit();
    em.close();
    Environment env = createEnvironment();
    KieBase kbase = createKnowledgeBase("VPSProcessWithWorkItems.rf");
    KieSession ksession = createSession(kbase, env);
    logger.debug("### Starting process ###");
    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("x", "SomeString");
    parameters.put("y", myEntity);
    parameters.put("z", myVariableSerializable);
    long processInstanceId = ksession.startProcess("com.sample.ruleflow", parameters).getId();
    TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
    WorkItem workItem = handler.getWorkItem();
    assertNotNull(workItem);
    logger.debug("### Retrieving process instance ###");
    ksession = reloadSession(ksession, kbase, env);
    WorkflowProcessInstance processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    assertEquals("SomeString", processInstance.getVariable("x"));
    assertEquals("This is a test Entity", ((MyEntity) processInstance.getVariable("y")).getTest());
    assertEquals("This is a test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("z")).getText());
    assertNull(processInstance.getVariable("a"));
    assertNull(processInstance.getVariable("b"));
    assertNull(processInstance.getVariable("c"));
    logger.debug("### Completing first work item ###");
    Map<String, Object> results = new HashMap<String, Object>();
    results.put("zeta", processInstance.getVariable("z"));
    results.put("equis", processInstance.getVariable("x") + "->modifiedResult");
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), results);
    workItem = handler.getWorkItem();
    assertNotNull(workItem);
    logger.debug("### Retrieving process instance ###");
    ksession = reloadSession(ksession, kbase, env);
    processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    logger.debug("######## Getting the already Persisted Variables #########");
    assertEquals("SomeString->modifiedResult", processInstance.getVariable("x"));
    assertEquals("This is a test Entity", ((MyEntity) processInstance.getVariable("y")).getTest());
    assertEquals("This is a test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("z")).getText());
    assertEquals("Some new String", processInstance.getVariable("a"));
    assertEquals("This is a new test Entity", ((MyEntity) processInstance.getVariable("b")).getTest());
    assertEquals("This is a new test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("c")).getText());
    logger.debug("### Completing second work item ###");
    results = new HashMap<String, Object>();
    results.put("zeta", processInstance.getVariable("z"));
    results.put("equis", processInstance.getVariable("x"));
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), results);
    workItem = handler.getWorkItem();
    assertNotNull(workItem);
    logger.debug("### Retrieving process instance ###");
    ksession = reloadSession(ksession, kbase, env);
    processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    assertEquals("SomeString->modifiedResult", processInstance.getVariable("x"));
    assertEquals("This is a test Entity", ((MyEntity) processInstance.getVariable("y")).getTest());
    assertEquals("This is a test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("z")).getText());
    assertEquals("Some changed String", processInstance.getVariable("a"));
    assertEquals("This is a changed test Entity", ((MyEntity) processInstance.getVariable("b")).getTest());
    assertEquals("This is a changed test SerializableObject", ((MyVariableSerializable) processInstance.getVariable("c")).getText());
    logger.debug("### Completing third work item ###");
    results = new HashMap<String, Object>();
    results.put("zeta", processInstance.getVariable("z"));
    results.put("equis", processInstance.getVariable("x"));
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), results);
    workItem = handler.getWorkItem();
    assertNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);
    assertNull(processInstance);
}
Also used : MyEntity(org.jbpm.persistence.session.objects.MyEntity) UserTransaction(javax.transaction.UserTransaction) TestWorkItemHandler(org.jbpm.persistence.session.objects.TestWorkItemHandler) HashMap(java.util.HashMap) WorkItem(org.kie.api.runtime.process.WorkItem) InitialContext(javax.naming.InitialContext) EntityManager(javax.persistence.EntityManager) KieBase(org.kie.api.KieBase) Environment(org.kie.api.runtime.Environment) KieSession(org.kie.api.runtime.KieSession) MyVariableSerializable(org.jbpm.persistence.session.objects.MyVariableSerializable) WorkflowProcessInstance(org.kie.api.runtime.process.WorkflowProcessInstance) AbstractBaseTest(org.jbpm.test.util.AbstractBaseTest) Test(org.junit.Test)

Example 5 with MyEntity

use of org.jbpm.persistence.session.objects.MyEntity in project jbpm by kiegroup.

the class VariablePersistenceStrategyTest method testPersistenceVariablesWithTypeChange.

@Test
public void testPersistenceVariablesWithTypeChange() throws NamingException, NotSupportedException, SystemException, RollbackException, HeuristicMixedException, HeuristicRollbackException {
    MyEntity myEntity = new MyEntity("This is a test Entity with annotation in fields");
    MyEntityMethods myEntityMethods = new MyEntityMethods("This is a test Entity with annotations in methods");
    MyEntityOnlyFields myEntityOnlyFields = new MyEntityOnlyFields("This is a test Entity with annotations in fields and without accesors methods");
    MyVariableSerializable myVariableSerializable = new MyVariableSerializable("This is a test SerializableObject");
    EntityManager em = emf.createEntityManager();
    UserTransaction utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
    int s = utx.getStatus();
    if (utx.getStatus() == Status.STATUS_NO_TRANSACTION) {
        utx.begin();
    }
    em.joinTransaction();
    em.persist(myEntity);
    em.persist(myEntityMethods);
    em.persist(myEntityOnlyFields);
    if (utx.getStatus() == Status.STATUS_ACTIVE) {
        utx.commit();
    }
    em.close();
    Environment env = createEnvironment();
    KieBase kbase = createKnowledgeBase("VariablePersistenceStrategyProcessTypeChange.rf");
    KieSession ksession = createSession(kbase, env);
    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("x", "SomeString");
    parameters.put("y", myEntity);
    parameters.put("m", myEntityMethods);
    parameters.put("f", myEntityOnlyFields);
    parameters.put("z", myVariableSerializable);
    long processInstanceId = ksession.startProcess("com.sample.ruleflow", parameters).getId();
    TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
    WorkItem workItem = handler.getWorkItem();
    assertNotNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    ProcessInstance processInstance = ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null);
    workItem = handler.getWorkItem();
    assertNotNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    processInstance = ksession.getProcessInstance(processInstanceId);
    assertNotNull(processInstance);
    ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null);
    workItem = handler.getWorkItem();
    assertNull(workItem);
    ksession = reloadSession(ksession, kbase, env);
    processInstance = ksession.getProcessInstance(processInstanceId);
    assertNull(processInstance);
}
Also used : MyEntity(org.jbpm.persistence.session.objects.MyEntity) UserTransaction(javax.transaction.UserTransaction) TestWorkItemHandler(org.jbpm.persistence.session.objects.TestWorkItemHandler) HashMap(java.util.HashMap) WorkItem(org.kie.api.runtime.process.WorkItem) InitialContext(javax.naming.InitialContext) MyEntityOnlyFields(org.jbpm.persistence.session.objects.MyEntityOnlyFields) EntityManager(javax.persistence.EntityManager) MyEntityMethods(org.jbpm.persistence.session.objects.MyEntityMethods) KieBase(org.kie.api.KieBase) Environment(org.kie.api.runtime.Environment) KieSession(org.kie.api.runtime.KieSession) ProcessInstance(org.kie.api.runtime.process.ProcessInstance) WorkflowProcessInstance(org.kie.api.runtime.process.WorkflowProcessInstance) MyVariableSerializable(org.jbpm.persistence.session.objects.MyVariableSerializable) AbstractBaseTest(org.jbpm.test.util.AbstractBaseTest) Test(org.junit.Test)

Aggregations

HashMap (java.util.HashMap)5 InitialContext (javax.naming.InitialContext)5 EntityManager (javax.persistence.EntityManager)5 UserTransaction (javax.transaction.UserTransaction)5 MyEntity (org.jbpm.persistence.session.objects.MyEntity)5 MyVariableSerializable (org.jbpm.persistence.session.objects.MyVariableSerializable)5 TestWorkItemHandler (org.jbpm.persistence.session.objects.TestWorkItemHandler)5 AbstractBaseTest (org.jbpm.test.util.AbstractBaseTest)5 Test (org.junit.Test)5 KieBase (org.kie.api.KieBase)5 Environment (org.kie.api.runtime.Environment)5 KieSession (org.kie.api.runtime.KieSession)5 WorkItem (org.kie.api.runtime.process.WorkItem)5 WorkflowProcessInstance (org.kie.api.runtime.process.WorkflowProcessInstance)5 MyEntityMethods (org.jbpm.persistence.session.objects.MyEntityMethods)3 MyEntityOnlyFields (org.jbpm.persistence.session.objects.MyEntityOnlyFields)3 ProcessInstance (org.kie.api.runtime.process.ProcessInstance)2