本文整理了Java中org.camunda.bpm.engine.test.Deployment.<init>()
方法的一些代码示例,展示了Deployment.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Deployment.<init>()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.test.Deployment
类名称:Deployment
方法名:<init>
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = "org/camunda/bpm/engine/test/api/externaltask/twoExternalTaskProcess.bpmn20.xml")
public void testHandleBpmnErrorReclaimedLockExpiredTaskWithBoundary() {
// given
runtimeService.startProcessInstanceByKey("twoExternalTaskProcess");
//then
handleBpmnErrorReclaimedLockExpiredTask(false);
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
@Deployment
public void testMockAvailabilityInExpressionLanguage() {
testMockAvailability();
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" })
public void testCleanupHistoryProcessesNotFinishedException() {
//given
final List<String> ids = prepareHistoricProcesses();
runtimeService.deleteProcessInstances(ids.subList(1, ids.size()), null, true, true);
try {
historyService.deleteHistoricProcessInstancesBulk(ids);
fail("Not all processes are finished exception was expected");
} catch (BadUserRequestException ex) {
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = "org/camunda/bpm/engine/test/api/externaltask/oneExternalTaskProcess.bpmn20.xml")
public void testList() {
startInstancesByKey("oneExternalTaskProcess", 5);
assertEquals(5, externalTaskService.createExternalTaskQuery().list().size());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = { "org/camunda/bpm/engine/test/api/form/util/VacationRequest_deprecated_forms.bpmn20.xml",
"org/camunda/bpm/engine/test/api/form/util/approve.form",
"org/camunda/bpm/engine/test/api/form/util/request.form",
"org/camunda/bpm/engine/test/api/form/util/adjustRequest.form" })
@Test
public void testGetStartFormByProcessDefinitionId() {
List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().list();
assertEquals(1, processDefinitions.size());
ProcessDefinition processDefinition = processDefinitions.get(0);
Object startForm = formService.getRenderedStartForm(processDefinition.getId(), "juel");
assertNotNull(startForm);
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = "org/camunda/bpm/engine/test/api/externaltask/oneExternalTaskProcess.bpmn20.xml")
public void testHandleBpmnErrorReclaimedLockExpiredTaskWithoutDefinedBoundary() {
// given
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneExternalTaskProcess");
handleBpmnErrorReclaimedLockExpiredTask(false);
assertProcessEnded(processInstance.getId());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@org.camunda.bpm.engine.test.Deployment(resources={"org/camunda/bpm/engine/test/api/repository/failingProcessCreateOneIncident.bpmn20.xml"})
public void testQueryByVersionTagLike() {
assertEquals(1, repositoryService.createProcessDefinitionQuery()
.versionTagLike("ver\\_tag\\_%")
.count());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = { "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml"})
public void testProcessDefinitionUpdateTimeToLiveNegative() {
//given
ProcessDefinition processDefinition = findOnlyProcessDefinition();
//when
try {
repositoryService.updateProcessDefinitionHistoryTimeToLive(processDefinition.getId(), -1);
fail("Exception is expected, that negative value is not allowed.");
} catch (BadUserRequestException ex) {
assertTrue(ex.getMessage().contains("greater than"));
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testUpdateHistoryTimeToLive() {
// given
// there exists a deployment containing a case definition with key "oneTaskCase"
CaseDefinition caseDefinition = findOnlyCaseDefinition();
// when
repositoryService.updateCaseDefinitionHistoryTimeToLive(caseDefinition.getId(), 6);
// then
caseDefinition = findOnlyCaseDefinition();
assertEquals(6, caseDefinition.getHistoryTimeToLive().intValue());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/api/cmmn/oneCaseTaskCase.cmmn"})
public void testQueryBySuperCaseInstanceId() {
String superCaseInstanceId = caseService.createCaseInstanceByKey("oneCaseTaskCase").getId();
CaseInstanceQuery query = caseService
.createCaseInstanceQuery()
.superCaseInstanceId(superCaseInstanceId);
verifyQueryResults(query, 1);
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = "org/camunda/bpm/engine/test/cmmn/required/RequiredRuleTest.testVariableBasedRule.cmmn")
public void testQueryByRequired() {
caseService.createCaseInstanceByKey("case", Collections.<String, Object>singletonMap("required", true));
CaseExecutionQuery query = caseService
.createCaseExecutionQuery()
.required();
verifyQueryResults(query, 1);
CaseExecution execution = query.singleResult();
assertNotNull(execution);
assertTrue(execution.isRequired());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
@Test
public void testSubmitStartFormWithFormFieldMarkedAsBusinessKey() {
String procDefId = repositoryService.createProcessDefinitionQuery().singleResult().getId();
ProcessInstance pi = formService.submitStartForm(procDefId, "foo", Variables.createVariables().putValue("secondParam", "bar"));
assertEquals("foo", pi.getBusinessKey());
List<VariableInstance> result = runtimeService.createVariableInstanceQuery().list();
assertEquals(1, result.size());
assertTrue(result.get(0).getName().equals("secondParam"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testRenderEnumField() {
runtimeService.startProcessInstanceByKey("HtmlFormEngineTest.testRenderEnumField");
Task t = taskService.createTaskQuery()
.singleResult();
String renderedForm = (String) formService.getRenderedTaskForm(t.getId());
String expectedForm = IoUtil.readFileAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testRenderEnumField.html");
assertHtmlEquals(expectedForm, renderedForm);
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = DMN_DECISION_TABLE)
@Test
public void evaluateDecisionTableByKeyWithNonExistingVersion() {
DecisionDefinition decisionDefinition = repositoryService.createDecisionDefinitionQuery().singleResult();
thrown.expect(NotFoundException.class);
thrown.expectMessage("no decision definition deployed with key = 'decision' and version = '42'");
decisionService.evaluateDecisionTableByKeyAndVersion(decisionDefinition.getKey(), 42, null);
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = { "org/camunda/bpm/engine/test/repository/one.dmn" })
public void testGetDecisionDefinition() {
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
DecisionDefinition decisionDefinition = query.singleResult();
String decisionDefinitionId = decisionDefinition.getId();
DecisionDefinition definition = repositoryService.getDecisionDefinition(decisionDefinitionId);
assertNotNull(definition);
assertEquals(decisionDefinitionId, definition.getId());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources={"org/camunda/bpm/engine/test/api/runtime/failingProcessCreateOneIncident.bpmn20.xml"})
public void testQueryByIncidentId() {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("failingProcess");
executeAvailableJobs();
List<Incident> incidentList = runtimeService.createIncidentQuery().list();
assertEquals(1, incidentList.size());
Incident incident = runtimeService.createIncidentQuery().processInstanceId(processInstance.getId()).singleResult();
List<Execution> executionList = runtimeService
.createExecutionQuery()
.incidentId(incident.getId()).list();
assertEquals(1, executionList.size());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = "org/camunda/bpm/engine/test/api/externaltask/oneExternalTaskProcess.bpmn20.xml")
public void testQueryListByBusinessKey() {
for (int i = 0; i < 5; i++) {
runtimeService.startProcessInstanceByKey("oneExternalTaskProcess", "businessKey" + i);
}
assertEquals(5, externalTaskService.createExternalTaskQuery().count());
List<ExternalTask> list = externalTaskService.createExternalTaskQuery().list();
for (ExternalTask externalTask : list) {
assertNotNull(externalTask.getBusinessKey());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = "org/camunda/bpm/engine/test/bpmn/job/oneTaskProcess.bpmn20.xml")
public void testSetJobDuedateNonTimerJob(){
runtimeService.startProcessInstanceByKey("oneTaskProcess");
Job job = managementService.createJobQuery().processDefinitionKey("oneTaskProcess").singleResult();
assertNotNull(job);
managementService.setJobDuedate(job.getId(), new Date());
job = managementService.createJobQuery().processDefinitionKey("oneTaskProcess").singleResult();
assertNotNull(job.getDuedate());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" })
public void testCleanupHistoryActivityInstances() {
//given
final List<String> ids = prepareHistoricProcesses();
runtimeService.deleteProcessInstances(ids, null, true, true);
//when
historyService.deleteHistoricProcessInstancesBulk(ids);
//then
assertEquals(0, historyService.createHistoricProcessInstanceQuery().processDefinitionKey(ONE_TASK_PROCESS).count());
assertEquals(0, historyService.createHistoricActivityInstanceQuery().count());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/api/mgmt/timerOnTask.bpmn20.xml"})
public void testDeleteJobDeletion() {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("timerOnTask");
Job timerJob = managementService.createJobQuery().processInstanceId(processInstance.getId()).singleResult();
assertNotNull("Task timer should be there", timerJob);
managementService.deleteJob(timerJob.getId());
timerJob = managementService.createJobQuery().processInstanceId(processInstance.getId()).singleResult();
assertNull("There should be no job now. It was deleted", timerJob);
}
内容来源于网络,如有侵权,请联系作者删除!