本文整理汇总了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);
}
}
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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;
}
示例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;
}
示例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;
}