当前位置: 首页>>代码示例>>Java>>正文


Java HistoricDecisionInstance.getInputs方法代码示例

本文整理汇总了Java中org.camunda.bpm.engine.history.HistoricDecisionInstance.getInputs方法的典型用法代码示例。如果您正苦于以下问题:Java HistoricDecisionInstance.getInputs方法的具体用法?Java HistoricDecisionInstance.getInputs怎么用?Java HistoricDecisionInstance.getInputs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.camunda.bpm.engine.history.HistoricDecisionInstance的用法示例。


在下文中一共展示了HistoricDecisionInstance.getInputs方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: collectHistoricDecisionInputIds

import org.camunda.bpm.engine.history.HistoricDecisionInstance; //导入方法依赖的package包/类
private void collectHistoricDecisionInputIds(List<HistoricDecisionInstance> historicDecisionInstances, List<String> historicDecisionInputIds, List<String> inputByteArrayIds) {
  for (HistoricDecisionInstance historicDecisionInstance : historicDecisionInstances) {
    for (HistoricDecisionInputInstance inputInstanceEntity : historicDecisionInstance.getInputs()) {
      historicDecisionInputIds.add(inputInstanceEntity.getId());
      final String byteArrayValueId = ((HistoricDecisionInputInstanceEntity) inputInstanceEntity).getByteArrayValueId();
      if (byteArrayValueId != null) {
        inputByteArrayIds.add(byteArrayValueId);
      }
    }
  }
  assertEquals(PROCESS_INSTANCE_COUNT, historicDecisionInputIds.size());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:13,代码来源:BulkHistoryDeleteTest.java

示例2: testDecisionInputInstanceProperties

import org.camunda.bpm.engine.history.HistoricDecisionInstance; //导入方法依赖的package包/类
@Deployment(resources = { DECISION_PROCESS, DECISION_SINGLE_OUTPUT_DMN })
public void testDecisionInputInstanceProperties() {

  startProcessInstanceAndEvaluateDecision();

  HistoricDecisionInstance historicDecisionInstance = historyService.createHistoricDecisionInstanceQuery().includeInputs().singleResult();
  List<HistoricDecisionInputInstance> inputs = historicDecisionInstance.getInputs();
  assertThat(inputs, is(notNullValue()));
  assertThat(inputs.size(), is(1));

  HistoricDecisionInputInstance input = inputs.get(0);
  assertThat(input.getDecisionInstanceId(), is(historicDecisionInstance.getId()));
  assertThat(input.getClauseId(), is("in"));
  assertThat(input.getClauseName(), is("input"));
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:HistoricDecisionInstanceTest.java

示例3: testMultipleDecisionInputInstances

import org.camunda.bpm.engine.history.HistoricDecisionInstance; //导入方法依赖的package包/类
@Deployment(resources = { DECISION_PROCESS, DECISION_MULTIPLE_INPUT_DMN})
public void testMultipleDecisionInputInstances() {

  Map<String, Object> variables = new HashMap<String, Object>();
  variables.put("input1", "a");
  variables.put("input2", 1);
  runtimeService.startProcessInstanceByKey("testProcess", variables);

  HistoricDecisionInstance historicDecisionInstance = historyService.createHistoricDecisionInstanceQuery().includeInputs().singleResult();
  List<HistoricDecisionInputInstance> inputs = historicDecisionInstance.getInputs();
  assertThat(inputs.size(), is(2));

  assertThat(inputs.get(0).getValue(), is((Object) "a"));
  assertThat(inputs.get(1).getValue(), is((Object) 1));
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:HistoricDecisionInstanceTest.java

示例4: testDisableDecisionInputInstanceByteValue

import org.camunda.bpm.engine.history.HistoricDecisionInstance; //导入方法依赖的package包/类
@Deployment(resources = { DECISION_PROCESS, DECISION_SINGLE_OUTPUT_DMN })
public void testDisableDecisionInputInstanceByteValue() {

  byte[] bytes = "object".getBytes();
  startProcessInstanceAndEvaluateDecision(bytes);

  HistoricDecisionInstance historicDecisionInstance = historyService.createHistoricDecisionInstanceQuery().includeInputs().disableBinaryFetching().singleResult();
  List<HistoricDecisionInputInstance> inputs = historicDecisionInstance.getInputs();
  assertThat(inputs.size(), is(1));

  HistoricDecisionInputInstance input = inputs.get(0);
  assertThat(input.getTypeName(), is("bytes"));
  assertThat(input.getValue(), is(nullValue()));
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:15,代码来源:HistoricDecisionInstanceTest.java

示例5: decisionInputInstanceValue

import org.camunda.bpm.engine.history.HistoricDecisionInstance; //导入方法依赖的package包/类
@Test
@Deployment(resources = { DECISION_PROCESS, DECISION_SINGLE_OUTPUT_DMN })
public void decisionInputInstanceValue() {

  startProcessInstanceAndEvaluateDecision(inputValue);

  HistoricDecisionInstance historicDecisionInstance = engineRule.getHistoryService().createHistoricDecisionInstanceQuery().includeInputs().singleResult();
  List<HistoricDecisionInputInstance> inputInstances = historicDecisionInstance.getInputs();
  assertThat(inputInstances.size(), is(1));

  HistoricDecisionInputInstance inputInstance = inputInstances.get(0);
  assertThat(inputInstance.getTypeName(), is(valueType));
  assertThat(inputInstance.getValue(), is(inputValue));
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:15,代码来源:HistoricDecisionInstanceInputOutputValueTest.java

示例6: testListJsonProperty

import org.camunda.bpm.engine.history.HistoricDecisionInstance; //导入方法依赖的package包/类
@Deployment(resources = {"org/camunda/spin/plugin/DecisionSingleOutput.dmn11.xml"})
public void testListJsonProperty() {
  JsonListSerializable<String> list = new JsonListSerializable<String>();
  list.addElement("foo");

  ObjectValue objectValue = Variables.objectValue(list).serializationDataFormat(DataFormats.JSON_DATAFORMAT_NAME).create();

  VariableMap variables = Variables.createVariables()
    .putValueTyped("input1", objectValue);

  decisionService.evaluateDecisionTableByKey("testDecision", variables);

  HistoricDecisionInstance testDecision = historyService.createHistoricDecisionInstanceQuery().decisionDefinitionKey("testDecision").includeInputs().includeOutputs().singleResult();
  assertNotNull(testDecision);

  List<HistoricDecisionInputInstance> inputs = testDecision.getInputs();
  assertEquals(1, inputs.size());

  HistoricDecisionInputInstance inputInstance = inputs.get(0);
  assertEquals(list.getListProperty(), inputInstance.getValue());

  List<HistoricDecisionOutputInstance> outputs = testDecision.getOutputs();
  assertEquals(1, outputs.size());

  HistoricDecisionOutputInstance outputInstance = outputs.get(0);
  assertEquals(list.getListProperty(), outputInstance.getValue());

}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:29,代码来源:HistoricDecisionInstanceSerializationTest.java


注:本文中的org.camunda.bpm.engine.history.HistoricDecisionInstance.getInputs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。