use of org.camunda.bpm.engine.test.api.runtime.util.SimpleSerializableBean in project camunda-bpm-platform by camunda.
the class RuntimeServiceTest method testGetVariableInstancesFromVariableScope.
@Deployment
@Test
public void testGetVariableInstancesFromVariableScope() {
VariableMap variables = createVariables().putValue("anIntegerVariable", 1234).putValue("anObjectValue", objectValue(new SimpleSerializableBean(10)).serializationDataFormat(Variables.SerializationDataFormats.JAVA)).putValue("anUntypedObjectValue", new SimpleSerializableBean(30));
runtimeService.startProcessInstanceByKey("testProcess", variables);
// assertions are part of the java delegate AssertVariableInstancesDelegate
// only there we can access the VariableScope methods
}
use of org.camunda.bpm.engine.test.api.runtime.util.SimpleSerializableBean in project camunda-bpm-platform by camunda.
the class RuntimeServiceTest method testUpdateVariableInProcessWithoutWaitstate.
@Deployment
@Test
public void testUpdateVariableInProcessWithoutWaitstate() {
// when a process instance is started
runtimeService.startProcessInstanceByKey("oneScriptTaskProcess", Collections.<String, Object>singletonMap("var", new SimpleSerializableBean(10)));
// then it should succeeds successfully
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().singleResult();
assertNull(processInstance);
}
use of org.camunda.bpm.engine.test.api.runtime.util.SimpleSerializableBean in project camunda-bpm-platform by camunda.
the class RuntimeServiceTest method testSetUpdateAndDeleteComplexVariable.
@Deployment
@Test
public void testSetUpdateAndDeleteComplexVariable() {
// when a process instance is started
runtimeService.startProcessInstanceByKey("oneUserTaskProcess", Collections.<String, Object>singletonMap("var", new SimpleSerializableBean(10)));
// then it should wait at the user task
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().singleResult();
assertNotNull(processInstance);
}
Aggregations