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


Java VariableMap.putAll方法代码示例

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


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

示例1: addResultToVariableContext

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
protected void addResultToVariableContext(DmnDecisionResult evaluatedResult, VariableMap variableMap, DmnDecision evaluatedDecision) {
  List<Map<String, Object>> resultList = evaluatedResult.getResultList();

  if (resultList.isEmpty()) {
    return;
  } else if (resultList.size() == 1 && !isDecisionTableWithCollectOrRuleOrderHitPolicy(evaluatedDecision)) {
    variableMap.putAll(evaluatedResult.getSingleResult());
  } else {
    Set<String> outputs = new HashSet<String>();

    for (Map<String, Object> resultMap : resultList) {
      outputs.addAll(resultMap.keySet());
    }

    for (String output : outputs) {
      List<Object> values = evaluatedResult.collectEntries(output);
      variableMap.put(output, values);
    }
  }
}
 
开发者ID:camunda,项目名称:camunda-engine-dmn,代码行数:21,代码来源:DefaultDmnDecisionContext.java

示例2: testCatchExceptionThrownByExecuteOfSequentialDelegateExpression

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
@Deployment( resources = {
  "org/camunda/bpm/engine/test/bpmn/multiinstance/MultiInstanceTest.testCatchErrorThrownBySequentialDelegateExpression.bpmn20.xml"
})
public void testCatchExceptionThrownByExecuteOfSequentialDelegateExpression() {
  VariableMap variables = Variables.createVariables().putValue("myDelegate", new ThrowErrorDelegate());
  variables.putAll(throwException());
  String pi = runtimeService.startProcessInstanceByKey("testProcess", variables).getId();

  assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
  assertNull(runtimeService.getVariable(pi, "signaled"));

  Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
  assertNotNull(userTask);
  assertEquals("userTaskException", userTask.getTaskDefinitionKey());

  taskService.complete(userTask.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:MultiInstanceTest.java

示例3: testCatchErrorThrownByExecuteOfSequentialDelegateExpression

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
@Deployment( resources = {
  "org/camunda/bpm/engine/test/bpmn/multiinstance/MultiInstanceTest.testCatchErrorThrownBySequentialDelegateExpression.bpmn20.xml"
})
public void testCatchErrorThrownByExecuteOfSequentialDelegateExpression() {
  VariableMap variables = Variables.createVariables().putValue("myDelegate", new ThrowErrorDelegate());
  variables.putAll(throwError());
  String pi = runtimeService.startProcessInstanceByKey("testProcess", variables).getId();

  assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
  assertNull(runtimeService.getVariable(pi, "signaled"));

  Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
  assertNotNull(userTask);
  assertEquals("userTaskError", userTask.getTaskDefinitionKey());

  taskService.complete(userTask.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:MultiInstanceTest.java

示例4: testCatchExceptionThrownByExecuteOfParallelDelegateExpression

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
@Deployment( resources = {
  "org/camunda/bpm/engine/test/bpmn/multiinstance/MultiInstanceTest.testCatchErrorThrownByParallelDelegateExpression.bpmn20.xml"
})
public void testCatchExceptionThrownByExecuteOfParallelDelegateExpression() {
  VariableMap variables = Variables.createVariables().putValue("myDelegate", new ThrowErrorDelegate());
  variables.putAll(throwException());
  String pi = runtimeService.startProcessInstanceByKey("testProcess", variables).getId();

  assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
  assertNull(runtimeService.getVariable(pi, "signaled"));

  Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
  assertNotNull(userTask);
  assertEquals("userTaskException", userTask.getTaskDefinitionKey());

  taskService.complete(userTask.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:MultiInstanceTest.java

示例5: testCatchErrorThrownByExecuteOfParallelDelegateExpression

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
@Deployment( resources = {
  "org/camunda/bpm/engine/test/bpmn/multiinstance/MultiInstanceTest.testCatchErrorThrownByParallelDelegateExpression.bpmn20.xml"
})
public void testCatchErrorThrownByExecuteOfParallelDelegateExpression() {
  VariableMap variables = Variables.createVariables().putValue("myDelegate", new ThrowErrorDelegate());
  variables.putAll(throwError());
  String pi = runtimeService.startProcessInstanceByKey("testProcess", variables).getId();

  assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
  assertNull(runtimeService.getVariable(pi, "signaled"));

  Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
  assertNotNull(userTask);
  assertEquals("userTaskError", userTask.getTaskDefinitionKey());

  taskService.complete(userTask.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:MultiInstanceTest.java

示例6: testCatchExceptionThrownByExecuteOfDelegateExpression

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
@Deployment( resources = {
  "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testCatchErrorThrownByDelegateExpression.bpmn20.xml"
})
public void testCatchExceptionThrownByExecuteOfDelegateExpression() {
  VariableMap variables = Variables.createVariables().putValue("myDelegate", new ThrowErrorDelegate());
  variables.putAll(throwException());
  String pi = runtimeService.startProcessInstanceByKey("testProcess", variables).getId();

  assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
  assertNull(runtimeService.getVariable(pi, "signaled"));

  Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
  assertNotNull(userTask);
  assertEquals("userTaskException", userTask.getTaskDefinitionKey());

  taskService.complete(userTask.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:BoundaryErrorEventTest.java

示例7: testCatchErrorThrownByExecuteOfDelegateExpression

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
@Deployment( resources = {
  "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testCatchErrorThrownByDelegateExpression.bpmn20.xml"
})
public void testCatchErrorThrownByExecuteOfDelegateExpression() {
  VariableMap variables = Variables.createVariables().putValue("myDelegate", new ThrowErrorDelegate());
  variables.putAll(throwError());
  String pi = runtimeService.startProcessInstanceByKey("testProcess", variables).getId();

  assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
  assertNull(runtimeService.getVariable(pi, "signaled"));

  Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
  assertNotNull(userTask);
  assertEquals("userTaskError", userTask.getTaskDefinitionKey());

  taskService.complete(userTask.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:BoundaryErrorEventTest.java

示例8: testCatchExceptionThrownByExecuteOfDelegateExpression

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
@Deployment(resources = {
  "org/camunda/bpm/engine/test/bpmn/event/error/ErrorEventSubProcessTest.testCatchErrorThrownByDelegateExpression.bpmn20.xml"
})
public void testCatchExceptionThrownByExecuteOfDelegateExpression() {
  VariableMap variables = Variables.createVariables().putValue("myDelegate", new ThrowErrorDelegate());
  variables.putAll(throwException());
  String pi = runtimeService.startProcessInstanceByKey("testProcess", variables).getId();

  assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
  assertNull(runtimeService.getVariable(pi, "signaled"));

  Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
  assertNotNull(userTask);
  assertEquals("userTaskException", userTask.getTaskDefinitionKey());

  taskService.complete(userTask.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:ErrorEventSubProcessTest.java

示例9: testCatchErrorThrownByExecuteOfDelegateExpression

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
@Deployment(resources = {
  "org/camunda/bpm/engine/test/bpmn/event/error/ErrorEventSubProcessTest.testCatchErrorThrownByDelegateExpression.bpmn20.xml"
})
public void testCatchErrorThrownByExecuteOfDelegateExpression() {
  VariableMap variables = Variables.createVariables().putValue("myDelegate", new ThrowErrorDelegate());
  variables.putAll(throwError());
  String pi = runtimeService.startProcessInstanceByKey("testProcess", variables).getId();

  assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
  assertNull(runtimeService.getVariable(pi, "signaled"));

  Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
  assertNotNull(userTask);
  assertEquals("userTaskError", userTask.getTaskDefinitionKey());

  taskService.complete(userTask.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:ErrorEventSubProcessTest.java

示例10: startProcessById

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
public ProcessInstance startProcessById(String processDefinitionId, Map<String, Object> variables) {
  assertCommandContextNotActive();

  VariableMap cachedVariables = getAndClearCachedVariableMap();
  cachedVariables.putAll(variables);
  ProcessInstance instance = processEngine.getRuntimeService().startProcessInstanceById(processDefinitionId, cachedVariables);
  if (!instance.isEnded()) {
    setExecution(instance);
  }
  return instance;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:12,代码来源:BusinessProcess.java

示例11: startProcessByKey

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
public ProcessInstance startProcessByKey(String key, Map<String, Object> variables) {
  assertCommandContextNotActive();

  VariableMap cachedVariables = getAndClearCachedVariableMap();
  cachedVariables.putAll(variables);
  ProcessInstance instance = processEngine.getRuntimeService().startProcessInstanceByKey(key, cachedVariables);
  if (!instance.isEnded()) {
    setExecution(instance);
  }
  return instance;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:12,代码来源:BusinessProcess.java

示例12: startProcessByMessage

import org.camunda.bpm.engine.variable.VariableMap; //导入方法依赖的package包/类
public ProcessInstance startProcessByMessage(String messageName, Map<String, Object> processVariables) {
  assertCommandContextNotActive();

  VariableMap cachedVariables = getAndClearCachedVariableMap();
  cachedVariables.putAll(processVariables);
  ProcessInstance instance =  processEngine.getRuntimeService().startProcessInstanceByMessage(messageName, cachedVariables);
  if (!instance.isEnded()) {
    setExecution(instance);
  }
  return instance;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:12,代码来源:BusinessProcess.java


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