本文整理汇总了Java中org.camunda.bpm.engine.history.HistoricVariableInstance类的典型用法代码示例。如果您正苦于以下问题:Java HistoricVariableInstance类的具体用法?Java HistoricVariableInstance怎么用?Java HistoricVariableInstance使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HistoricVariableInstance类属于org.camunda.bpm.engine.history包,在下文中一共展示了HistoricVariableInstance类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: executeList
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
public List<HistoricVariableInstance> executeList(CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults) {
List<HistoricVariableInstance> historicVariableInstances = commandContext
.getHistoricVariableInstanceManager()
.findHistoricVariableInstancesByNativeQuery(parameterMap, firstResult, maxResults);
if (historicVariableInstances!=null) {
for (HistoricVariableInstance historicVariableInstance: historicVariableInstances) {
HistoricVariableInstanceEntity variableInstanceEntity = (HistoricVariableInstanceEntity) historicVariableInstance;
try {
variableInstanceEntity.getTypedValue(isCustomObjectDeserializationEnabled);
} catch(Exception t) {
// do not fail if one of the variables fails to load
LOG.exceptionWhileGettingValueForVariable(t);
}
}
}
return historicVariableInstances;
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:20,代码来源:NativeHistoricVariableInstanceQueryImpl.java
示例2: getVariables
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
/**
* Gets all the process variables of a running process instance.
*
* @param id Id of the process instance
* @return {@link Map} of the variables
*/
public Map<String, Object> getVariables(String id) {
eq(processExists(id), true, () -> new MissingObject(Process.class, id));
return historyService.createHistoricVariableInstanceQuery()
.processInstanceId(id)
.activityInstanceIdIn(id)
.list()
.stream()
.filter(v -> v.getName() != null)
.filter(v -> v.getValue() != null)
.collect(Collectors.toMap(
HistoricVariableInstance::getName,
HistoricVariableInstance::getValue
));
}
开发者ID:LIBCAS,项目名称:ARCLib,代码行数:22,代码来源:ProcessList.java
示例3: testStartByMessageWithVariables
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Test
@Deployment(resources = {"org/camunda/bpm/scenario/test/processes/StartByTest.bpmn"})
public void testStartByMessageWithVariables() {
when(scenario.waitsAtReceiveTask("ReceiveTask")).thenReturn(new ReceiveTaskAction() {
@Override
public void execute(EventSubscriptionDelegate message) throws Exception {
message.receive();
}
});
Scenario run = Scenario.run(scenario).startBy(new ProcessStarter() {
@Override
public ProcessInstance start() {
return rule.getRuntimeService().startProcessInstanceByMessage("msg_StartEvent1", withVariables("variable", true));
}
}).execute();
HistoricVariableInstance variable = historyService().createHistoricVariableInstanceQuery().variableName("variable").singleResult();
assertThat(variable).isNotNull();
assertThat((Boolean) variable.getValue()).isTrue();
verify(scenario, times(1)).hasFinished("StartEvent1");
verify(scenario, times(1)).hasFinished("EndEvent");
}
开发者ID:camunda,项目名称:camunda-bpm-assert-scenario,代码行数:26,代码来源:StartByTest.java
示例4: testSelectHistoricVariableInstances
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Deployment(resources = ONE_TASK_PROCESS)
public void testSelectHistoricVariableInstances() throws JSONException {
if (processEngineConfiguration.getHistoryLevel().getId() >=
HistoryLevel.HISTORY_LEVEL_AUDIT.getId()) {
ProcessInstance instance = runtimeService.startProcessInstanceByKey("oneTaskProcess");
JsonSerializable bean = new JsonSerializable("a String", 42, false);
runtimeService.setVariable(instance.getId(), "simpleBean", objectValue(bean).serializationDataFormat(JSON_FORMAT_NAME).create());
HistoricVariableInstance historicVariable = historyService.createHistoricVariableInstanceQuery().singleResult();
assertNotNull(historicVariable.getValue());
assertNull(historicVariable.getErrorMessage());
assertEquals(ValueType.OBJECT.getName(), historicVariable.getTypeName());
assertEquals(ValueType.OBJECT.getName(), historicVariable.getVariableTypeName());
JsonSerializable historyValue = (JsonSerializable) historicVariable.getValue();
assertEquals(bean.getStringProperty(), historyValue.getStringProperty());
assertEquals(bean.getIntProperty(), historyValue.getIntProperty());
assertEquals(bean.getBooleanProperty(), historyValue.getBooleanProperty());
}
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:23,代码来源:HistoricVariableJsonSerializationTest.java
示例5: testSelectHistoricSerializedValues
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Deployment(resources = ONE_TASK_PROCESS)
public void testSelectHistoricSerializedValues() throws JSONException {
if (processEngineConfiguration.getHistoryLevel().getId() >=
HistoryLevel.HISTORY_LEVEL_AUDIT.getId()) {
ProcessInstance instance = runtimeService.startProcessInstanceByKey("oneTaskProcess");
JsonSerializable bean = new JsonSerializable("a String", 42, false);
runtimeService.setVariable(instance.getId(), "simpleBean", objectValue(bean).serializationDataFormat(JSON_FORMAT_NAME));
HistoricVariableInstance historicVariable = historyService.createHistoricVariableInstanceQuery().singleResult();
assertNotNull(historicVariable.getValue());
assertNull(historicVariable.getErrorMessage());
ObjectValue typedValue = (ObjectValue) historicVariable.getTypedValue();
assertEquals(JSON_FORMAT_NAME, typedValue.getSerializationDataFormat());
JSONAssert.assertEquals(bean.toExpectedJsonString(),new String(typedValue.getValueSerialized()), true);
assertEquals(JsonSerializable.class.getName(), typedValue.getObjectTypeName());
}
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:22,代码来源:HistoricVariableJsonSerializationTest.java
示例6: testMessageEndEventWithConnector
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@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());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:23,代码来源:ConnectProcessEnginePluginTest.java
示例7: executeList
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
public List<HistoricVariableInstance> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
ensureVariablesInitialized();
List<HistoricVariableInstance> historicVariableInstances = commandContext
.getHistoricVariableInstanceManager()
.findHistoricVariableInstancesByQueryCriteria(this, page);
if (historicVariableInstances!=null) {
for (HistoricVariableInstance historicVariableInstance: historicVariableInstances) {
HistoricVariableInstanceEntity variableInstanceEntity = (HistoricVariableInstanceEntity) historicVariableInstance;
if (shouldFetchValue(variableInstanceEntity)) {
try {
variableInstanceEntity.getTypedValue(isCustomObjectDeserializationEnabled);
} catch(Exception t) {
// do not fail if one of the variables fails to load
LOG.exceptionWhileGettingValueForVariable(t);
}
}
}
}
return historicVariableInstances;
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:26,代码来源:HistoricVariableInstanceQueryImpl.java
示例8: testSubmitTaskFormForStandaloneTask
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Test
public void testSubmitTaskFormForStandaloneTask() {
// given
String id = "standaloneTask";
Task task = taskService.newTask(id);
taskService.saveTask(task);
// when
formService.submitTaskForm(task.getId(), Variables.createVariables().putValue("foo", "bar"));
if (processEngineConfiguration.getHistoryLevel().getId() >= HistoryLevel.HISTORY_LEVEL_AUDIT.getId()) {
HistoricVariableInstance variableInstance = historyService
.createHistoricVariableInstanceQuery()
.taskIdIn(id)
.singleResult();
assertNotNull(variableInstance);
assertEquals("foo", variableInstance.getName());
assertEquals("bar", variableInstance.getValue());
}
taskService.deleteTask(id, true);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:FormServiceTest.java
示例9: testStandaloneTaskRemoveVariableLocalWithReadPermissionOnTask
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_AUDIT)
public void testStandaloneTaskRemoveVariableLocalWithReadPermissionOnTask() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, taskId, userId, UPDATE);
disableAuthorization();
taskService.setVariable(taskId, VARIABLE_NAME, VARIABLE_VALUE);
enableAuthorization();
// when
taskService.removeVariableLocal(taskId, VARIABLE_NAME);
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 0);
enableAuthorization();
deleteTask(taskId, true);
HistoricVariableInstance deletedVariable = historyService.createHistoricVariableInstanceQuery().includeDeleted().singleResult();
Assert.assertEquals("DELETED", deletedVariable.getState());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:TaskAuthorizationTest.java
示例10: testStandaloneTaskRemoveVariableLocalWithReadPermissionOnAnyTask
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_AUDIT)
public void testStandaloneTaskRemoveVariableLocalWithReadPermissionOnAnyTask() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, ANY, userId, UPDATE);
disableAuthorization();
taskService.setVariable(taskId, VARIABLE_NAME, VARIABLE_VALUE);
enableAuthorization();
// when
taskService.removeVariableLocal(taskId, VARIABLE_NAME);
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 0);
enableAuthorization();
deleteTask(taskId, true);
HistoricVariableInstance deletedVariable = historyService.createHistoricVariableInstanceQuery().includeDeleted().singleResult();
Assert.assertEquals("DELETED", deletedVariable.getState());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:TaskAuthorizationTest.java
示例11: testStandaloneTaskRemoveVariablesLocalWithReadPermissionOnTask
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_AUDIT)
public void testStandaloneTaskRemoveVariablesLocalWithReadPermissionOnTask() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, taskId, userId, UPDATE);
disableAuthorization();
taskService.setVariable(taskId, VARIABLE_NAME, VARIABLE_VALUE);
enableAuthorization();
// when
taskService.removeVariablesLocal(taskId, Arrays.asList(VARIABLE_NAME));
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 0);
enableAuthorization();
deleteTask(taskId, true);
HistoricVariableInstance deletedVariable = historyService.createHistoricVariableInstanceQuery().includeDeleted().singleResult();
Assert.assertEquals("DELETED", deletedVariable.getState());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:TaskAuthorizationTest.java
示例12: testStandaloneTaskRemoveVariablesLocalWithReadPermissionOnAnyTask
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_AUDIT)
public void testStandaloneTaskRemoveVariablesLocalWithReadPermissionOnAnyTask() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, ANY, userId, UPDATE);
disableAuthorization();
taskService.setVariable(taskId, VARIABLE_NAME, VARIABLE_VALUE);
enableAuthorization();
// when
taskService.removeVariablesLocal(taskId, Arrays.asList(VARIABLE_NAME));
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 0);
enableAuthorization();
deleteTask(taskId, true);
HistoricVariableInstance deletedVariable = historyService.createHistoricVariableInstanceQuery().includeDeleted().singleResult();
Assert.assertEquals("DELETED", deletedVariable.getState());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:TaskAuthorizationTest.java
示例13: checkVariables
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
private void checkVariables(VariableMap map, int expectedSize) {
List<HistoricVariableInstance> variables = engineRule.getHistoryService()
.createHistoricVariableInstanceQuery()
.orderByVariableName()
.asc()
.list();
assertEquals(expectedSize, variables.size());
assertEquals(variables.size(), map.size());
for (HistoricVariableInstance instance : variables) {
assertTrue(map.containsKey(instance.getName()));
Object instanceValue = instance.getTypedValue().getValue();
Object mapValue = map.getValueTyped(instance.getName()).getValue();
if (instanceValue == null) {
assertNull(mapValue);
} else if (instanceValue instanceof byte[]) {
assertTrue(Arrays.equals((byte[]) instanceValue, (byte[]) mapValue));
} else {
assertEquals(instanceValue, mapValue);
}
}
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:24,代码来源:ProcessInstantiationWithVariablesInReturnTest.java
示例14: createTransientVariablesUsingFluentBuilder
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Test
public void createTransientVariablesUsingFluentBuilder() {
// given
BpmnModelInstance simpleInstanceWithListener = Bpmn.createExecutableProcess("Process")
.startEvent()
.camundaExecutionListenerClass(ExecutionListener.EVENTNAME_END, ReadTransientVariableExecutionListener.class)
.userTask()
.endEvent()
.done();
testRule.deploy(simpleInstanceWithListener);
// when
runtimeService.createProcessInstanceByKey("Process")
.setVariables(Variables.createVariables().putValue(VARIABLE_NAME, Variables.stringValue("dlsd", true)))
.execute();
// then
List<VariableInstance> variableInstances = runtimeService.createVariableInstanceQuery().list();
List<HistoricVariableInstance> historicVariableInstances = historyService.createHistoricVariableInstanceQuery().list();
assertEquals(0, variableInstances.size());
assertEquals(0, historicVariableInstances.size());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:23,代码来源:TransientVariableTest.java
示例15: createVariablesUsingVariableMap
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Test
public void createVariablesUsingVariableMap() {
// given
BpmnModelInstance simpleInstanceWithListener = Bpmn.createExecutableProcess("Process")
.startEvent()
.camundaExecutionListenerClass(ExecutionListener.EVENTNAME_END, ReadTransientVariableExecutionListener.class)
.userTask()
.endEvent()
.done();
testRule.deploy(simpleInstanceWithListener);
// when
VariableMap variables = Variables.createVariables();
variables.put(VARIABLE_NAME, Variables.untypedValue(true, true));
runtimeService.startProcessInstanceByKey("Process",
variables
);
// then
List<VariableInstance> variableInstances = runtimeService.createVariableInstanceQuery().list();
List<HistoricVariableInstance> historicVariableInstances = historyService.createHistoricVariableInstanceQuery().list();
assertEquals(0, variableInstances.size());
assertEquals(0, historicVariableInstances.size());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:TransientVariableTest.java
示例16: testSignalWithTransientVariables
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Test
public void testSignalWithTransientVariables() {
// given
BpmnModelInstance instance = Bpmn.createExecutableProcess("Process")
.startEvent()
.intermediateCatchEvent("signalCatch")
.signal("signal")
.scriptTask("scriptTask")
.scriptFormat("javascript")
.camundaResultVariable("abc")
.scriptText("execution.setVariable('abc', foo);")
.endEvent()
.done();
testRule.deploy(instance);
runtimeService.startProcessInstanceByKey("Process");
// when
runtimeService.signalEventReceived("signal",
Variables.createVariables().putValue("foo", Variables.stringValue("bar", true)));
// then
List<HistoricVariableInstance> variables = historyService.createHistoricVariableInstanceQuery().list();
assertEquals(1, variables.size());
assertEquals("abc", variables.get(0).getName());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:27,代码来源:TransientVariableTest.java
示例17: testDeleteAndInsertTheSameVariableByteArray
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Test
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_AUDIT)
public void testDeleteAndInsertTheSameVariableByteArray() {
BpmnModelInstance bpmnModel =
Bpmn.createExecutableProcess("serviceTaskProcess")
.startEvent()
.userTask("userTask")
.serviceTask("service")
.camundaClass(DeleteAndInsertVariableDelegate.class)
.userTask("userTask1")
.endEvent()
.done();
ProcessDefinition processDefinition = testHelper.deployAndGetDefinition(bpmnModel);
VariableMap variables = Variables.createVariables().putValue("listVar", Arrays.asList(new int[] { 1, 2, 3 }));
ProcessInstance instance = engineRule.getRuntimeService().startProcessInstanceById(processDefinition.getId(), variables);
Task task = engineRule.getTaskService().createTaskQuery().singleResult();
engineRule.getTaskService().complete(task.getId());
VariableInstance variable = engineRule.getRuntimeService().createVariableInstanceQuery().processInstanceIdIn(instance.getId()).variableName("listVar").singleResult();
assertNotNull(variable);
assertEquals("stringValue", variable.getValue());
HistoricVariableInstance historicVariable = engineRule.getHistoryService().createHistoricVariableInstanceQuery().singleResult();
assertEquals(variable.getName(), historicVariable.getName());
assertEquals(HistoricVariableInstance.STATE_CREATED, historicVariable.getState());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:27,代码来源:ModifyVariableInSameTransactionTest.java
示例18: testDeleteAndInsertTheSameVariable
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Test
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_AUDIT)
public void testDeleteAndInsertTheSameVariable() {
BpmnModelInstance bpmnModel =
Bpmn.createExecutableProcess("serviceTaskProcess")
.startEvent()
.userTask("userTask")
.serviceTask("service")
.camundaClass(DeleteAndInsertVariableDelegate.class)
.userTask("userTask1")
.endEvent()
.done();
ProcessDefinition processDefinition = testHelper.deployAndGetDefinition(bpmnModel);
VariableMap variables = Variables.createVariables().putValue("foo", "firstValue");
ProcessInstance instance = engineRule.getRuntimeService().startProcessInstanceById(processDefinition.getId(), variables);
Task task = engineRule.getTaskService().createTaskQuery().singleResult();
engineRule.getTaskService().complete(task.getId());
VariableInstance variable = engineRule.getRuntimeService().createVariableInstanceQuery().processInstanceIdIn(instance.getId()).variableName("foo").singleResult();
assertNotNull(variable);
assertEquals("secondValue", variable.getValue());
HistoricVariableInstance historicVariable = engineRule.getHistoryService().createHistoricVariableInstanceQuery().singleResult();
assertEquals(variable.getName(), historicVariable.getName());
assertEquals(HistoricVariableInstance.STATE_CREATED, historicVariable.getState());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:27,代码来源:ModifyVariableInSameTransactionTest.java
示例19: testNativeHistoricVariableInstanceTest
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Deployment(resources = {"org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml"})
public void testNativeHistoricVariableInstanceTest() {
Date date = Calendar.getInstance().getTime();
Map<String, Object> vars = new HashMap<String, Object>();
vars.put("stringVar", "abcdef");
vars.put("dateVar", date);
runtimeService.startProcessInstanceByKey(ONE_TASK_PROCESS, vars);
assertEquals(2, historyService.createNativeHistoricVariableInstanceQuery().sql("SELECT count(*) FROM " + managementService.getTableName(HistoricVariableInstance.class)).count());
assertEquals(1, historyService.createNativeHistoricVariableInstanceQuery().sql("SELECT * FROM " + managementService.getTableName(HistoricVariableInstance.class)).listPage(0, 1).size());
List<HistoricVariableInstance> variables = historyService.createNativeHistoricVariableInstanceQuery().sql("SELECT * FROM " + managementService.getTableName(HistoricVariableInstance.class)).list();
assertEquals(2, variables.size());
for (HistoricVariableInstance variable : variables) {
assertTrue(vars.containsKey(variable.getName()));
assertEquals(vars.get(variable.getName()), variable.getValue());
vars.remove(variable.getName());
}
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:20,代码来源:HistoryServiceTest.java
示例20: testCleanupHistoryCaseInstanceVariables
import org.camunda.bpm.engine.history.HistoricVariableInstance; //导入依赖的package包/类
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn" })
public void testCleanupHistoryCaseInstanceVariables() {
// given
// create case instances
List<String> caseInstanceIds = new ArrayList<String>();
int instanceCount = 10;
for (int i = 0; i < instanceCount; i++) {
VariableMap variables = Variables.createVariables();
CaseInstance caseInstance = caseService.createCaseInstanceByKey("oneTaskCase", variables.putValue("name" + i, "theValue"));
caseInstanceIds.add(caseInstance.getId());
terminateAndCloseCaseInstance(caseInstance.getId(), variables);
}
// assume
List<HistoricVariableInstance> variablesInstances = historyService.createHistoricVariableInstanceQuery().list();
assertEquals(instanceCount, variablesInstances.size());
// when
historyService.deleteHistoricCaseInstancesBulk(caseInstanceIds);
// then
variablesInstances = historyService.createHistoricVariableInstanceQuery().list();
assertEquals(0, variablesInstances.size());
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:BulkHistoryDeleteTest.java
注:本文中的org.camunda.bpm.engine.history.HistoricVariableInstance类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论