use of org.camunda.bpm.engine.variable.value.FileValue in project camunda-bpm-platform by camunda.
the class FileValueProcessSerializationTest method testSerializeNullEncoding.
@Test
@Deployment(resources = ONE_TASK_PROCESS)
public void testSerializeNullEncoding() {
ProcessInstance pi = runtimeService.startProcessInstanceByKey("oneTaskProcess", Variables.createVariables().putValue("fileVar", Variables.fileValue("test.txt").mimeType("some mimetype").file("ABC".getBytes()).create()));
FileValue fileVar = runtimeService.getVariableTyped(pi.getId(), "fileVar");
assertNull(fileVar.getEncoding());
}
use of org.camunda.bpm.engine.variable.value.FileValue in project camunda-bpm-platform by camunda.
the class TaskQueryTest method testQueryByFileCaseInstanceVariableValueEquals.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn" })
public void testQueryByFileCaseInstanceVariableValueEquals() {
FileValue fileValue = createDefaultFileValue();
String variableName = "aFileValue";
startDefaultCaseWithVariable(fileValue, variableName);
TaskQuery query = taskService.createTaskQuery();
try {
query.caseInstanceVariableValueEquals(variableName, fileValue).list();
fail();
} catch (ProcessEngineException e) {
assertThat(e.getMessage(), containsString("Variables of type File cannot be used to query"));
}
}
use of org.camunda.bpm.engine.variable.value.FileValue in project camunda-bpm-platform by camunda.
the class TaskQueryTest method testQueryByFileCaseInstanceVariableValueLessThan.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn" })
public void testQueryByFileCaseInstanceVariableValueLessThan() {
FileValue fileValue = createDefaultFileValue();
String variableName = "aFileValue";
startDefaultCaseWithVariable(fileValue, variableName);
TaskQuery query = taskService.createTaskQuery();
try {
query.caseInstanceVariableValueLessThan(variableName, fileValue).list();
fail();
} catch (ProcessEngineException e) {
assertThat(e.getMessage(), containsString("Variables of type File cannot be used to query"));
}
}
use of org.camunda.bpm.engine.variable.value.FileValue in project camunda-bpm-platform by camunda.
the class TaskQueryTest method testQueryByFileCaseInstanceVariableValueGreaterThan.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/cmmn/oneTaskCaseWithManualActivation.cmmn" })
public void testQueryByFileCaseInstanceVariableValueGreaterThan() {
FileValue fileValue = createDefaultFileValue();
String variableName = "aFileValue";
startDefaultCaseWithVariable(fileValue, variableName);
startDefaultCaseExecutionManually();
TaskQuery query = taskService.createTaskQuery();
try {
query.caseInstanceVariableValueGreaterThan(variableName, fileValue).list();
fail();
} catch (ProcessEngineException e) {
assertThat(e.getMessage(), containsString("Variables of type File cannot be used to query"));
}
}
use of org.camunda.bpm.engine.variable.value.FileValue in project camunda-bpm-platform by camunda.
the class TaskQueryTest method testQueryByFileCaseInstanceVariableValueLessThanOrEqual.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn" })
public void testQueryByFileCaseInstanceVariableValueLessThanOrEqual() {
FileValue fileValue = createDefaultFileValue();
String variableName = "aFileValue";
startDefaultCaseWithVariable(fileValue, variableName);
TaskQuery query = taskService.createTaskQuery();
try {
query.caseInstanceVariableValueLessThanOrEquals(variableName, fileValue).list();
fail();
} catch (ProcessEngineException e) {
assertThat(e.getMessage(), containsString("Variables of type File cannot be used to query"));
}
}
Aggregations