Package org.camunda.bpm.engine.runtime

Examples of org.camunda.bpm.engine.runtime.VariableInstanceQuery.singleResult()


    assertEquals(1, taskVariablesQuery.count());
    assertEquals("string", taskVar.getTypeName());
    assertEquals("taskVariable", taskVar.getName());
    assertEquals("aCustomValue", taskVar.getValue());

    VariableInstance processVar = processVariablesQuery.singleResult();

    assertEquals(1, processVariablesQuery.count());
    assertEquals("string", processVar.getTypeName());
    assertEquals("stringVar", processVar.getName());
    assertEquals("test", processVar.getValue());
View Full Code Here


    // when
    VariableInstanceQuery query1 = runtimeService.createVariableInstanceQuery().activityInstanceIdIn(tree.getId());

    // then
    VariableInstance processVariable = query1.singleResult();
    assertNotNull(processVariable);
    assertEquals("processVariable", processVariable.getName());
    assertEquals("aProcessVariable", processVariable.getValue());

    // when
View Full Code Here

    ActivityInstance taskActivityInstance = subProcessActivityInstance.getChildActivityInstances()[0];
    VariableInstanceQuery query3 = runtimeService.createVariableInstanceQuery().activityInstanceIdIn(taskActivityInstance.getId());

    // then
    VariableInstance taskVariable = query3.singleResult();
    assertNotNull(taskVariable);
    assertEquals("taskVariable", taskVariable.getName());
    assertEquals("taskVariableValue", taskVariable.getValue());
  }
View Full Code Here

    if (!task1Instance.getActivityId().equals("task1")) {
      task1Instance = tree.getChildActivityInstances()[1];
    }

    VariableInstanceQuery query = runtimeService.createVariableInstanceQuery().activityInstanceIdIn(task1Instance.getId());
    VariableInstance localVariable = query.singleResult();
    assertNotNull(localVariable);
    assertEquals("aLocalVariable", localVariable.getName());
    assertEquals("aLocalValue", localVariable.getValue());

    Task task = taskService.createTaskQuery().executionId(execution.getId()).singleResult();
View Full Code Here

    if (!task3Instance.getActivityId().equals("task3")) {
      task3Instance = tree.getChildActivityInstances()[1];
    }

    query = runtimeService.createVariableInstanceQuery().activityInstanceIdIn(task3Instance.getId());
    localVariable = query.singleResult();
    assertNotNull(localVariable);
    assertEquals("aLocalVariable", localVariable.getName());
    assertEquals("aLocalValue", localVariable.getValue());
  }
View Full Code Here

      task1Instance = tree.getChildActivityInstances()[0];
    }

    // then the local variable has activity instance Id of the subprocess
    VariableInstanceQuery query = runtimeService.createVariableInstanceQuery().activityInstanceIdIn(task1Instance.getId());
    VariableInstance localVariable = query.singleResult();
    assertNotNull(localVariable);
    assertEquals("aLocalVariable", localVariable.getName());
    assertEquals("aLocalValue", localVariable.getValue());

    // and the global variable has the activity instance Id of the process instance:
View Full Code Here

    assertEquals("aLocalVariable", localVariable.getName());
    assertEquals("aLocalValue", localVariable.getValue());

    // and the global variable has the activity instance Id of the process instance:
    query = runtimeService.createVariableInstanceQuery().activityInstanceIdIn(processInstance.getId());
    VariableInstance globalVariable = query.singleResult();
    assertNotNull(localVariable);
    assertEquals("processVariable", globalVariable.getName());
    assertEquals("aProcessVariable", globalVariable.getValue());

    taskService.complete(task.getId());
View Full Code Here

    // when binary fetching is enabled (default)
    VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();

    // then value is fetched
    VariableInstance result = query.singleResult();
    assertNotNull(result.getValue());

    // when binary fetching is disabled
    query = runtimeService.createVariableInstanceQuery().disableBinaryFetching();
View Full Code Here

    // when binary fetching is disabled
    query = runtimeService.createVariableInstanceQuery().disableBinaryFetching();

    // then value is not fetched
    result = query.singleResult();
    assertNull(result.getValue());

    // delete task
    taskService.deleteTask(task.getId(), true);
  }
View Full Code Here

    VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();

    query
      .caseExecutionIdIn(instance.getId());

    VariableInstance result = query.singleResult();

    assertNotNull(result);

    assertEquals("aVariableName", result.getName());
    assertEquals("abc", result.getValue());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.