org.camunda.bpm.engine.test.Deployment类的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中org.camunda.bpm.engine.test.Deployment类的一些代码示例,展示了Deployment类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Deployment类的具体详情如下:
包路径:org.camunda.bpm.engine.test.Deployment
类名称:Deployment

Deployment介绍

暂无

代码示例

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/timer/IntermediateTimerEventTest.testExpression.bpmn20.xml"})	 
public void testTimeExpressionWithoutMinutes() throws Exception {
   Date dt = new Date();
   Date dueDate = testExpression(new SimpleDateFormat("yyyy-MM-dd'T'HH").format(new Date()));
   assertEquals(new SimpleDateFormat("yyyy-MM-dd'T'HH").format(dt),new SimpleDateFormat("yyyy-MM-dd'T'HH").format(dueDate));
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/timer/IntermediateTimerEventTest.testExpression.bpmn20.xml"})	  
public void testTimeExpressionComplete() throws Exception {
   Date dt = new Date();
   
   Date dueDate = testExpression(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(dt));
   assertEquals(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(dt),new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(dueDate));		    	  
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/async/FoxJobRetryCmdTest.testFailedIntermediateThrowingSignalEvent.bpmn20.xml",
  "org/camunda/bpm/engine/test/bpmn/async/FoxJobRetryCmdTest.failingSignalStart.bpmn20.xml" })
public void FAILING_testFailedIntermediateThrowingSignalEvent() {
 ProcessInstance pi = runtimeService.startProcessInstanceByKey("failedIntermediateThrowingSignalEvent");
 assertJobRetriesForActivity(pi, "failingSignalEvent");
}

代码示例来源: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 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));
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Test
@Deployment(resources = SUBPROCESS_PROCESS)
public void testReturnVariablesFromStartWithoutDeserializationWithWaitstate() throws Exception {
 testVariablesWithoutDeserialization("subprocess");
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Test
@Deployment
public void testMockAvailabilityInExpressionLanguage() {
 testMockAvailability();
}

代码示例来源:origin: camunda/camunda-bpm-platform

@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);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment
public void testSequentialScriptTasks() {
 Map<String, Object> vars = new HashMap<String, Object>();
 vars.put("sum", 0);
 vars.put("nrOfLoops", 5);
 runtimeService.startProcessInstanceByKey("miSequentialScriptTask", vars);
 Execution waitStateExecution = runtimeService.createExecutionQuery().singleResult();
 int sum = (Integer) runtimeService.getVariable(waitStateExecution.getId(), "sum");
 assertEquals(10, sum);
}

代码示例来源: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/oneTaskProcess.bpmn20.xml"})
@Test
public void testDeleteProcessInstancesAsyncWithEmptyList() throws Exception {
 thrown.expect(ProcessEngineException.class);
 thrown.expectMessage("processInstanceIds is empty");
 runtimeService.deleteProcessInstancesAsync(new ArrayList<String>(), null, TESTING_INSTANCE_DELETE);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = {
 "org/camunda/bpm/engine/test/bpmn/scripttask/ExternalScriptTaskTest.testScriptInDeploymentAsVariable.bpmn20.xml",
 "org/camunda/bpm/engine/test/bpmn/scripttask/greeting.py"
})
public void testScriptInDeploymentAsVariable() {
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("scriptPath", "deployment://org/camunda/bpm/engine/test/bpmn/scripttask/greeting.py");
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process", variables);
 String greeting = (String) runtimeService.getVariable(processInstance.getId(), "greeting");
 assertNotNull(greeting);
 assertEquals("Greetings camunda BPM speaking", greeting);
}

代码示例来源: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/bpmn/parse/FoxFailedJobParseListenerTest.testTimer.bpmn20.xml" })
public void testIntermediateCatchTimerEventWithFailedJobRetryTimeCycle() {
 ProcessInstance pi = runtimeService.startProcessInstanceByKey("intermediateTimerEventWithFailedJobRetryTimeCycle");
 ActivityImpl timer = findActivity(pi, "timerEventWithFailedJobRetryTimeCycle");
 checkFoxFailedJobConfig(timer);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment
public void testExecutionAvailable() {
 Map<String, Object> vars = new HashMap<String, Object>();
 vars.put("myVar", new ExecutionTestVariable());
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testExecutionAvailableProcess", vars);
 // Check of the testMethod has been called with the current execution
 String value = (String) runtimeService.getVariable(processInstance.getId(), "testVar");
 assertNotNull(value);
 assertEquals("myValue", value);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Test
@Deployment(resources={"org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml"})
public void testGetVariablesByEmptyList() {
 // given
 String processInstanceId = runtimeService.startProcessInstanceByKey("oneTaskProcess").getId();
 // when
 Map<String, Object> variables = runtimeService.getVariables(processInstanceId, new ArrayList<String>());
 // then
 assertNotNull(variables);
 assertTrue(variables.isEmpty());
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Test
@Deployment(resources={"org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml"})
public void testGetVariablesLocalTypedByEmptyList() {
 // given
 String processInstanceId = runtimeService.startProcessInstanceByKey("oneTaskProcess").getId();
 // when
 Map<String, Object> variables = runtimeService.getVariablesLocalTyped(processInstanceId, new ArrayList<String>(), false);
 // then
 assertNotNull(variables);
 assertTrue(variables.isEmpty());
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment
public void testParseProcessDefinitionStartable() {
 List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().list();
 assertNotNull(processDefinitions);
 assertEquals(1, processDefinitions.size());
 assertFalse(processDefinitions.get(0).isStartableInTasklist());
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment
 public void testParseExternalTaskWithStringTopic() {
  Map<String, Object> variables = new HashMap<String, Object>();

  runtimeService.startProcessInstanceByKey("oneExternalTaskWithStringTopicProcess", variables);
  ExternalTask task = externalTaskService.createExternalTaskQuery().singleResult();
  assertEquals("testTopicString", task.getTopicName());
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources={"org/camunda/bpm/engine/test/api/task/TaskQueryTest.testProcessDefinition.bpmn20.xml"})
public void testQueryByInvalidActivityInstanceId() throws Exception {
 runtimeService.startProcessInstanceByKey("oneTaskProcess");
 assertEquals(0, taskService.createTaskQuery().activityInstanceIdIn("anInvalidActivityInstanceId").list().size());
}

相关文章

微信公众号

最新文章

更多