@After public void closeProcessEngines() { Iterator<ProcessEngine> iterator = createdProcessEngines.iterator(); while (iterator.hasNext()) { ProcessEngine processEngine = iterator.next(); processEngine.close(); ProcessEngines.unregister(processEngine); iterator.remove(); } }
@Override protected void finished(Description description) { deleteHistoryCleanupJob(); processEngine.close(); ProcessEngines.unregister(processEngine); processEngine = null; }
protected void closeDownProcessEngine() { super.closeDownProcessEngine(); if (otherProcessEngine != null) { otherProcessEngine.close(); ProcessEngines.unregister(otherProcessEngine); otherProcessEngine = null; } }
@Override public void close() { ProcessEngines.unregister(this); if(processEngineConfiguration.isMetricsEnabled()) { processEngineConfiguration.getDbMetricsReporter().stop(); } if ((jobExecutor != null)) { // unregister process engine with Job Executor jobExecutor.unregisterProcessEngine(this); } commandExecutorSchemaOperations.execute(new SchemaOperationProcessEngineClose()); processEngineConfiguration.close(); LOG.processEngineClosed(name); }
@Override public void close() { ProcessEngines.unregister(this); if(processEngineConfiguration.isMetricsEnabled()) { processEngineConfiguration.getDbMetricsReporter().stop(); } if ((jobExecutor != null)) { // unregister process engine with Job Executor jobExecutor.unregisterProcessEngine(this); } commandExecutorSchemaOperations.execute(new SchemaOperationProcessEngineClose()); processEngineConfiguration.close(); LOG.processEngineClosed(name); }
@Override protected void closeDownProcessEngine() { super.closeDownProcessEngine(); final ProcessEngine otherProcessEngine = ProcessEngines.getProcessEngine(PROCESS_ENGINE_NAME); if (otherProcessEngine != null) { ((ProcessEngineConfigurationImpl)otherProcessEngine.getProcessEngineConfiguration()).getCommandExecutorTxRequired().execute(new Command<Void>() { public Void execute(CommandContext commandContext) { List<Job> jobs = otherProcessEngine.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } return null; } }); otherProcessEngine.close(); ProcessEngines.unregister(otherProcessEngine); } }
@After public void closeProcessEngines() { Iterator<ProcessEngine> iterator = createdProcessEngines.iterator(); while (iterator.hasNext()) { ProcessEngine processEngine = iterator.next(); processEngine.close(); ProcessEngines.unregister(processEngine); iterator.remove(); } }
@After public void cleanUp() { identityService.deleteTenant(TENANT_ONE); identityService.deleteTenant(TENANT_TWO); identityService.deleteGroup(GROUP_ONE); identityService.deleteGroup(GROUP_TWO); identityService.deleteUser(USER_ONE); identityService.deleteUser(USER_TWO); if (processEngine != null) { for (Tenant deleteTenant : processEngine.getIdentityService().createTenantQuery().list()) { processEngine.getIdentityService().deleteTenant(deleteTenant.getId()); } for (Authorization authorization : processEngine.getAuthorizationService().createAuthorizationQuery().list()) { processEngine.getAuthorizationService().deleteAuthorization(authorization.getId()); } processEngine.close(); ProcessEngines.unregister(processEngine); processEngine = null; } }
protected void closeDownProcessEngine() { super.closeDownProcessEngine(); if (otherProcessEngine != null) { otherProcessEngine.close(); ProcessEngines.unregister(otherProcessEngine); otherProcessEngine = null; } }
@Override protected void finished(Description description) { deleteHistoryCleanupJob(); processEngine.close(); ProcessEngines.unregister(processEngine); processEngine = null; }
@After public void cleanUp() { for (User user : identityService.createUserQuery().list()) { identityService.deleteUser(user.getId()); } for (Group group : identityService.createGroupQuery().list()) { identityService.deleteGroup(group.getId()); } ClockUtil.setCurrentTime(new Date()); if (processEngine != null) { for (User user : processEngine.getIdentityService().createUserQuery().list()) { processEngine.getIdentityService().deleteUser(user.getId()); } for (Group group : processEngine.getIdentityService().createGroupQuery().list()) { processEngine.getIdentityService().deleteGroup(group.getId()); } for (Tenant tenant : processEngine.getIdentityService().createTenantQuery().list()) { processEngine.getIdentityService().deleteTenant(tenant.getId()); } for (Authorization authorization : processEngine.getAuthorizationService().createAuthorizationQuery().list()) { processEngine.getAuthorizationService().deleteAuthorization(authorization.getId()); } processEngine.close(); ProcessEngines.unregister(processEngine); processEngine = null; } }
@Override public void close() { ProcessEngines.unregister(this); if(processEngineConfiguration.isMetricsEnabled()) { processEngineConfiguration.getDbMetricsReporter().stop(); } if ((jobExecutor != null)) { // unregister process engine with Job Executor jobExecutor.unregisterProcessEngine(this); } commandExecutorSchemaOperations.execute(new SchemaOperationProcessEngineClose()); processEngineConfiguration.close(); LOG.processEngineClosed(name); }
@Override protected void closeDownProcessEngine() { super.closeDownProcessEngine(); final ProcessEngine otherProcessEngine = ProcessEngines.getProcessEngine(PROCESS_ENGINE_NAME); if (otherProcessEngine != null) { ((ProcessEngineConfigurationImpl)otherProcessEngine.getProcessEngineConfiguration()).getCommandExecutorTxRequired().execute(new Command<Void>() { public Void execute(CommandContext commandContext) { List<Job> jobs = otherProcessEngine.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } return null; } }); otherProcessEngine.close(); ProcessEngines.unregister(otherProcessEngine); } }
@After public void cleanUp() { identityService.deleteTenant(TENANT_ONE); identityService.deleteTenant(TENANT_TWO); identityService.deleteGroup(GROUP_ONE); identityService.deleteGroup(GROUP_TWO); identityService.deleteUser(USER_ONE); identityService.deleteUser(USER_TWO); if (processEngine != null) { for (Tenant deleteTenant : processEngine.getIdentityService().createTenantQuery().list()) { processEngine.getIdentityService().deleteTenant(deleteTenant.getId()); } for (Authorization authorization : processEngine.getAuthorizationService().createAuthorizationQuery().list()) { processEngine.getAuthorizationService().deleteAuthorization(authorization.getId()); } processEngine.close(); ProcessEngines.unregister(processEngine); processEngine = null; } }
@After public void cleanUp() { for (User user : identityService.createUserQuery().list()) { identityService.deleteUser(user.getId()); } for (Group group : identityService.createGroupQuery().list()) { identityService.deleteGroup(group.getId()); } ClockUtil.setCurrentTime(new Date()); if (processEngine != null) { for (User user : processEngine.getIdentityService().createUserQuery().list()) { processEngine.getIdentityService().deleteUser(user.getId()); } for (Group group : processEngine.getIdentityService().createGroupQuery().list()) { processEngine.getIdentityService().deleteGroup(group.getId()); } for (Tenant tenant : processEngine.getIdentityService().createTenantQuery().list()) { processEngine.getIdentityService().deleteTenant(tenant.getId()); } for (Authorization authorization : processEngine.getAuthorizationService().createAuthorizationQuery().list()) { processEngine.getAuthorizationService().deleteAuthorization(authorization.getId()); } processEngine.close(); ProcessEngines.unregister(processEngine); processEngine = null; } }