use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class ConnectProcessEnginePluginTest method testMessageEndEventWithConnector.
@Deployment
public void testMessageEndEventWithConnector() {
String outputParamValue = "someMessageEndOutputValue";
String inputVariableValue = "someMessageEndInputVariableValue";
TestConnector.responseParameters.put("someOutputParameter", outputParamValue);
Map<String, Object> vars = new HashMap<String, Object>();
vars.put("someInputVariable", inputVariableValue);
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process_sending_with_connector", vars);
assertProcessEnded(processInstance.getId());
// validate input parameter
assertNotNull(TestConnector.requestParameters.get("reqParam1"));
assertEquals(inputVariableValue, TestConnector.requestParameters.get("reqParam1"));
// validate connector output
HistoricVariableInstance variable = historyService.createHistoricVariableInstanceQuery().variableName("out1").singleResult();
assertNotNull(variable);
assertEquals(outputParamValue, variable.getValue());
}
use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class ConnectProcessEnginePluginTest method testConnectorWithScriptInputOutputMapping.
@Deployment
public void testConnectorWithScriptInputOutputMapping() {
int x = 3;
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("x", x);
runtimeService.startProcessInstanceByKey("testProcess", variables);
// validate input parameter
Object in = TestConnector.requestParameters.get("in");
assertNotNull(in);
assertEquals(2 * x, in);
// validate output parameter
VariableInstance out = runtimeService.createVariableInstanceQuery().variableName("out").singleResult();
assertNotNull(out);
assertEquals(3 * x, out.getValue());
}
use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class MultiInstanceTest method testParallelMultiInstanceServiceTasks.
@Test
@Deployment
public void testParallelMultiInstanceServiceTasks() {
BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);
businessProcess.setVariable("list", Arrays.asList(new String[] { "1", "2" }));
businessProcess.startProcessByKey("miParallelScriptTask");
}
use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class ThreadContextAssociationTest method testBusinessProcessScopedWithJobExecutor.
@Test
@Deployment
public void testBusinessProcessScopedWithJobExecutor() throws InterruptedException {
String pid = runtimeService.startProcessInstanceByKey("processkey").getId();
waitForJobExecutorToProcessAllJobs(5000l, 25l);
assertNull(managementService.createJobQuery().singleResult());
ProcessScopedMessageBean messageBean = (ProcessScopedMessageBean) runtimeService.getVariable(pid, "processScopedMessageBean");
assertEquals("test", messageBean.getMessage());
runtimeService.signal(pid);
}
use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class ElTest method testSetBeanProperty.
@Test
@Deployment
public void testSetBeanProperty() throws Exception {
MessageBean messageBean = getBeanInstance(MessageBean.class);
runtimeService.startProcessInstanceByKey("setBeanProperty");
assertEquals("Greetings from Berlin", messageBean.getMessage());
}
Aggregations