public DeploymentBuilder addDeploymentResourcesByName(String deploymentId, List<String> resourceNames) { ensureNotNull(NotValidException.class, "deploymentId", deploymentId); ensureNotNull(NotValidException.class, "resourceNames", resourceNames); ensureNotEmpty(NotValidException.class, "resourceNames", resourceNames); ensureNotContainsNull(NotValidException.class, "resourceNames", resourceNames); CollectionUtil.addCollectionToMapOfSets(deploymentResourcesByName, deploymentId, resourceNames); return this; }
public void submitRejectedBatch(String engineName, List<String> jobIds) { CollectionUtil.addToMapOfLists(rejectedJobBatchesByEngine, engineName, jobIds); }
public DeploymentBuilder addDeploymentResourceById(String deploymentId, String resourceId) { ensureNotNull(NotValidException.class, "deploymentId", deploymentId); ensureNotNull(NotValidException.class, "resourceId", resourceId); CollectionUtil.addToMapOfSets(deploymentResourcesById, deploymentId, resourceId); return this; }
public HistoricJobLogQuery activityIdIn(String... activityIds) { List<String> activityIdList = CollectionUtil.asArrayList(activityIds); ensureNotContainsNull("activityIds", activityIdList); ensureNotContainsEmptyString("activityIds", activityIdList); this.activityIds = activityIds; return this; }
/** * Test for bug ACT-10: whitespaces/newlines in expressions lead to exceptions */ @Deployment public void testWhitespaceInExpression() { // Starting a process instance will lead to an exception if whitespace are incorrectly handled runtimeService.startProcessInstanceByKey("whiteSpaceInExpression", CollectionUtil.singletonMap("input", 1)); }
protected void flushDbOperationManager() { // obtain totally ordered operation list from operation manager List<DbOperation> operationsToFlush = dbOperationManager.calculateFlush(); if (operationsToFlush == null || operationsToFlush.size() == 0) { return; } LOG.databaseFlushSummary(operationsToFlush); // If we want to delete all table data as bulk operation, on tables which have self references, // We need to turn the foreign key check off on MySQL and MariaDB. // On other databases we have to do nothing, the mapped statement will be empty. if (isIgnoreForeignKeysForNextFlush) { persistenceSession.executeNonEmptyUpdateStmt(TOGGLE_FOREIGN_KEY_STMT, false); persistenceSession.flushOperations(); } try { final List<List<DbOperation>> batches = CollectionUtil.partition(operationsToFlush, BATCH_SIZE); for (List<DbOperation> batch : batches) { flushDbOperations(batch); } } finally { if (isIgnoreForeignKeysForNextFlush) { persistenceSession.executeNonEmptyUpdateStmt(TOGGLE_FOREIGN_KEY_STMT, true); persistenceSession.flushOperations(); isIgnoreForeignKeysForNextFlush = false; } } }
public HistoricJobLogQuery executionIdIn(String... executionIds) { List<String> executionIdList = CollectionUtil.asArrayList(executionIds); ensureNotContainsNull("executionIds", executionIdList); ensureNotContainsEmptyString("executionIds", executionIdList); this.executionIds = executionIds; return this; }
/** * Test for bug ACT-10: whitespaces/newlines in expressions lead to exceptions */ @Deployment public void testWhitespaceInExpression() { // Starting a process instance will lead to an exception if whitespace are // incorrectly handled runtimeService.startProcessInstanceByKey("inclusiveWhiteSpaceInExpression", CollectionUtil.singletonMap("input", 1)); }
protected void flushDbOperationManager() { // obtain totally ordered operation list from operation manager List<DbOperation> operationsToFlush = dbOperationManager.calculateFlush(); if (operationsToFlush == null || operationsToFlush.size() == 0) { return; } LOG.databaseFlushSummary(operationsToFlush); // If we want to delete all table data as bulk operation, on tables which have self references, // We need to turn the foreign key check off on MySQL and MariaDB. // On other databases we have to do nothing, the mapped statement will be empty. if (isIgnoreForeignKeysForNextFlush) { persistenceSession.executeNonEmptyUpdateStmt(TOGGLE_FOREIGN_KEY_STMT, false); persistenceSession.flushOperations(); } try { final List<List<DbOperation>> batches = CollectionUtil.partition(operationsToFlush, BATCH_SIZE); for (List<DbOperation> batch : batches) { flushDbOperations(batch); } } finally { if (isIgnoreForeignKeysForNextFlush) { persistenceSession.executeNonEmptyUpdateStmt(TOGGLE_FOREIGN_KEY_STMT, true); persistenceSession.flushOperations(); isIgnoreForeignKeysForNextFlush = false; } } }
public void submitAdditionalJobBatch(String engineName, List<String> jobIds) { CollectionUtil.addToMapOfLists(additionalJobBatchesByEngine, engineName, jobIds); }
public HistoricJobLogQuery activityIdIn(String... activityIds) { List<String> activityIdList = CollectionUtil.asArrayList(activityIds); ensureNotContainsNull("activityIds", activityIdList); ensureNotContainsEmptyString("activityIds", activityIdList); this.activityIds = activityIds; return this; }
@Deployment public void testHtmlMail() throws Exception { runtimeService.startProcessInstanceByKey("htmlMail", CollectionUtil.singletonMap("gender", "male")); List<WiserMessage> messages = wiser.getMessages(); assertEquals(1, messages.size()); assertEmailSend(messages.get(0), true, "Test", "Mr. <b>Kermit</b>", "camunda@localhost", Arrays.asList("kermit@camunda.org"), null); }
public DeploymentBuilder addDeploymentResourceById(String deploymentId, String resourceId) { ensureNotNull(NotValidException.class, "deploymentId", deploymentId); ensureNotNull(NotValidException.class, "resourceId", resourceId); CollectionUtil.addToMapOfSets(deploymentResourcesById, deploymentId, resourceId); return this; }
public DeploymentBuilder addDeploymentResourcesById(String deploymentId, List<String> resourceIds) { ensureNotNull(NotValidException.class, "deploymentId", deploymentId); ensureNotNull(NotValidException.class, "resourceIds", resourceIds); ensureNotEmpty(NotValidException.class, "resourceIds", resourceIds); ensureNotContainsNull(NotValidException.class, "resourceIds", resourceIds); CollectionUtil.addCollectionToMapOfSets(deploymentResourcesById, deploymentId, resourceIds); return this; }
protected void flushDbOperationManager() { // obtain totally ordered operation list from operation manager List<DbOperation> operationsToFlush = dbOperationManager.calculateFlush(); if (operationsToFlush == null || operationsToFlush.size() == 0) { return; } LOG.databaseFlushSummary(operationsToFlush); // If we want to delete all table data as bulk operation, on tables which have self references, // We need to turn the foreign key check off on MySQL and MariaDB. // On other databases we have to do nothing, the mapped statement will be empty. if (isIgnoreForeignKeysForNextFlush) { persistenceSession.executeNonEmptyUpdateStmt(TOGGLE_FOREIGN_KEY_STMT, false); persistenceSession.flushOperations(); } try { final List<List<DbOperation>> batches = CollectionUtil.partition(operationsToFlush, BATCH_SIZE); for (List<DbOperation> batch : batches) { flushDbOperations(batch); } } finally { if (isIgnoreForeignKeysForNextFlush) { persistenceSession.executeNonEmptyUpdateStmt(TOGGLE_FOREIGN_KEY_STMT, true); persistenceSession.flushOperations(); isIgnoreForeignKeysForNextFlush = false; } } }
public void submitAdditionalJobBatch(String engineName, List<String> jobIds) { CollectionUtil.addToMapOfLists(additionalJobBatchesByEngine, engineName, jobIds); }
public HistoricJobLogQuery executionIdIn(String... executionIds) { List<String> executionIdList = CollectionUtil.asArrayList(executionIds); ensureNotContainsNull("executionIds", executionIdList); ensureNotContainsEmptyString("executionIds", executionIdList); this.executionIds = executionIds; return this; }
@Deployment public void testHtmlMail() throws Exception { runtimeService.startProcessInstanceByKey("htmlMail", CollectionUtil.singletonMap("gender", "male")); List<WiserMessage> messages = wiser.getMessages(); assertEquals(1, messages.size()); assertEmailSend(messages.get(0), true, "Test", "Mr. <b>Kermit</b>", "camunda@localhost", Arrays.asList("kermit@camunda.org"), null); }
public DeploymentBuilder addDeploymentResourceByName(String deploymentId, String resourceName) { ensureNotNull(NotValidException.class, "deploymentId", deploymentId); ensureNotNull(NotValidException.class, "resourceName", resourceName); CollectionUtil.addToMapOfSets(deploymentResourcesByName, deploymentId, resourceName); return this; }
public DeploymentBuilder addDeploymentResourcesById(String deploymentId, List<String> resourceIds) { ensureNotNull(NotValidException.class, "deploymentId", deploymentId); ensureNotNull(NotValidException.class, "resourceIds", resourceIds); ensureNotEmpty(NotValidException.class, "resourceIds", resourceIds); ensureNotContainsNull(NotValidException.class, "resourceIds", resourceIds); CollectionUtil.addCollectionToMapOfSets(deploymentResourcesById, deploymentId, resourceIds); return this; }