Search in sources :

Example 6 with UpdateStringCommand

use of org.jbpm.shared.services.impl.commands.UpdateStringCommand in project jbpm by kiegroup.

the class UserTaskServiceEJBIntegrationTest method cleanup.

@After
public void cleanup() {
    if (processInstanceId != null) {
        // let's abort process instance to leave the system in clear state
        processService.abortProcessInstance(processInstanceId);
        ProcessInstance pi = processService.getProcessInstance(processInstanceId);
        assertNull(pi);
    }
    int deleted = 0;
    deleted += commandService.execute(new UpdateStringCommand("delete from  NodeInstanceLog nid"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  ProcessInstanceLog pid"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  VariableInstanceLog vsd"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  AuditTaskImpl vsd"));
    System.out.println("Deleted " + deleted);
    cleanupSingletonSessionId();
    if (units != null && !units.isEmpty()) {
        for (DeploymentUnit unit : units) {
            deploymentService.undeploy(unit);
        }
        units.clear();
    }
}
Also used : UpdateStringCommand(org.jbpm.shared.services.impl.commands.UpdateStringCommand) ProcessInstance(org.kie.api.runtime.process.ProcessInstance) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) After(org.junit.After)

Example 7 with UpdateStringCommand

use of org.jbpm.shared.services.impl.commands.UpdateStringCommand in project jbpm by kiegroup.

the class DeactivateDeploymentServiceWithSyncTest method cleanup.

@After
public void cleanup() {
    if (invoker != null) {
        invoker.stop();
    }
    int deleted = 0;
    deleted += commandService.execute(new UpdateStringCommand("delete from  DeploymentStoreEntry dse"));
    logger.info("Deleted " + deleted);
    cleanupSingletonSessionId();
    if (units != null && !units.isEmpty()) {
        for (DeploymentUnit unit : units) {
            deploymentService.undeploy(unit);
        }
        units.clear();
    }
    close();
}
Also used : UpdateStringCommand(org.jbpm.shared.services.impl.commands.UpdateStringCommand) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) After(org.junit.After)

Example 8 with UpdateStringCommand

use of org.jbpm.shared.services.impl.commands.UpdateStringCommand in project jbpm by kiegroup.

the class DeploymentServiceWithSyncTest method cleanup.

@After
public void cleanup() {
    if (invoker != null) {
        invoker.stop();
    }
    int deleted = 0;
    deleted += commandService.execute(new UpdateStringCommand("delete from  DeploymentStoreEntry dse"));
    logger.info("Deleted " + deleted);
    cleanupSingletonSessionId();
    if (units != null && !units.isEmpty()) {
        for (DeploymentUnit unit : units) {
            deploymentService.undeploy(unit);
        }
        units.clear();
    }
    close();
}
Also used : UpdateStringCommand(org.jbpm.shared.services.impl.commands.UpdateStringCommand) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) After(org.junit.After)

Example 9 with UpdateStringCommand

use of org.jbpm.shared.services.impl.commands.UpdateStringCommand in project jbpm by kiegroup.

the class RuntimeDataServiceEJBIntegrationTest method cleanup.

@After
public void cleanup() {
    if (processInstanceId != null) {
        // let's abort process instance to leave the system in clear state
        processService.abortProcessInstance(processInstanceId);
        ProcessInstance pi = processService.getProcessInstance(processInstanceId);
        assertNull(pi);
    }
    int deleted = 0;
    deleted += commandService.execute(new UpdateStringCommand("delete from  NodeInstanceLog nid"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  ProcessInstanceLog pid"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  VariableInstanceLog vsd"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  AuditTaskImpl vsd"));
    System.out.println("Deleted " + deleted);
    cleanupSingletonSessionId();
    if (units != null && !units.isEmpty()) {
        for (DeploymentUnit unit : units) {
            deploymentService.undeploy(unit);
        }
        units.clear();
    }
}
Also used : UpdateStringCommand(org.jbpm.shared.services.impl.commands.UpdateStringCommand) ProcessInstance(org.kie.api.runtime.process.ProcessInstance) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) After(org.junit.After)

Example 10 with UpdateStringCommand

use of org.jbpm.shared.services.impl.commands.UpdateStringCommand in project jbpm by kiegroup.

the class RuntimeDataServiceImplSecurityTest method cleanup.

@After
public void cleanup() {
    if (processInstanceId != null) {
        // let's abort process instance to leave the system in clear state
        processService.abortProcessInstance(processInstanceId);
        ProcessInstance pi = processService.getProcessInstance(processInstanceId);
        assertNull(pi);
    }
    int deleted = 0;
    deleted += commandService.execute(new UpdateStringCommand("delete from  NodeInstanceLog nid"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  ProcessInstanceLog pid"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  VariableInstanceLog vsd"));
    deleted += commandService.execute(new UpdateStringCommand("delete from  AuditTaskImpl vsd"));
    System.out.println("Deleted " + deleted);
    cleanupSingletonSessionId();
    if (units != null && !units.isEmpty()) {
        for (DeploymentUnit unit : units) {
            deploymentService.undeploy(unit);
        }
        units.clear();
    }
}
Also used : UpdateStringCommand(org.jbpm.shared.services.impl.commands.UpdateStringCommand) ProcessInstance(org.kie.api.runtime.process.ProcessInstance) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) After(org.junit.After)

Aggregations

UpdateStringCommand (org.jbpm.shared.services.impl.commands.UpdateStringCommand)10 KModuleDeploymentUnit (org.jbpm.kie.services.impl.KModuleDeploymentUnit)6 DeploymentUnit (org.jbpm.services.api.model.DeploymentUnit)6 After (org.junit.After)6 HashMap (java.util.HashMap)4 ProcessInstance (org.kie.api.runtime.process.ProcessInstance)4 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1 EntityManagerFactory (javax.persistence.EntityManagerFactory)1 QueryNotFoundException (org.jbpm.services.api.query.QueryNotFoundException)1 TransactionalCommandService (org.jbpm.shared.services.impl.TransactionalCommandService)1 ExecutionResults (org.kie.api.executor.ExecutionResults)1