org.camunda.bpm.engine.variable.Variables.untypedNullValue()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中org.camunda.bpm.engine.variable.Variables.untypedNullValue()方法的一些代码示例,展示了Variables.untypedNullValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Variables.untypedNullValue()方法的具体详情如下:
包路径:org.camunda.bpm.engine.variable.Variables
类名称:Variables
方法名:untypedNullValue

Variables.untypedNullValue介绍

[英]Creates a TypedValue with value null and type ValueType#NULL
[中]创建一个值为null且类型为ValueType#null的TypedValue

代码示例

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Creates a {@link TypedValue} with value {@code null} and type {@link ValueType#NULL}
 */
public static TypedValue untypedNullValue() {
 return untypedNullValue(false);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public TypedValue transform(Object value) {
 if (value == null) {
  return Variables.untypedNullValue();
 } else {
  return transformNotNullValue(value);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

public TypedValue createValue(Object value, Map<String, Object> valueInfo) {
 return Variables.untypedNullValue(isTransient(valueInfo));
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public Object mapDecisionResult(DmnDecisionResult decisionResult) {
 try {
  TypedValue typedValue = decisionResult.getSingleEntryTyped();
  if (typedValue != null) {
   return typedValue;
  }
  else {
   return Variables.untypedNullValue();
  }
 } catch (DmnEngineException e) {
  throw LOG.decisionResultMappingException(decisionResult, this, e);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public Object mapDecisionResult(DmnDecisionResult decisionResult) {
 try {
  TypedValue typedValue = decisionResult.getSingleEntryTyped();
  if (typedValue != null) {
   return typedValue;
  }
  else {
   return Variables.untypedNullValue();
  }
 } catch (DmnEngineException e) {
  throw LOG.decisionResultMappingException(decisionResult, this, e);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public Object mapDecisionResult(DmnDecisionResult decisionResult) {
 try {
  DmnDecisionResultEntries singleResult = decisionResult.getSingleResult();
  if (singleResult != null) {
   return singleResult.getEntryMap();
  } else
   return Variables.untypedNullValue();
 } catch (DmnEngineException e) {
  throw LOG.decisionResultMappingException(decisionResult, this, e);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public Object mapDecisionResult(DmnDecisionResult decisionResult) {
 try {
  DmnDecisionResultEntries singleResult = decisionResult.getSingleResult();
  if (singleResult != null) {
   return singleResult.getEntryMap();
  } else
   return Variables.untypedNullValue();
 } catch (DmnEngineException e) {
  throw LOG.decisionResultMappingException(decisionResult, this, e);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Creates an untyped value, i.e. {@link TypedValue#getType()} returns <code>null</code>
 * for the returned instance.
 */
public static TypedValue untypedValue(Object value, boolean isTransient) {
 if(value == null) {
  return untypedNullValue(isTransient);
 } else if (value instanceof TypedValueBuilder<?>) {
  return ((TypedValueBuilder<?>) value).setTransient(isTransient).create();
 } else if (value instanceof TypedValue) {
  TypedValue transientValue = (TypedValue) value;
  if (value instanceof NullValueImpl) {
   transientValue = untypedNullValue(isTransient);
  } else if (value instanceof FileValue) {
   ((FileValueImpl) transientValue).setTransient(isTransient);
  } else if (value instanceof AbstractTypedValue<?>) {
   ((AbstractTypedValue<?>) transientValue).setTransient(isTransient);
  }
  return transientValue;
 }
 else {
  // unknown value
  return new UntypedValueImpl(value, isTransient);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

protected DmnEvaluatedInput evaluateInput(DmnDecisionTableInputImpl input, VariableContext variableContext) {
 DmnEvaluatedInputImpl evaluatedInput = new DmnEvaluatedInputImpl(input);
 DmnExpressionImpl expression = input.getExpression();
 if (expression != null) {
  Object value = evaluateInputExpression(expression, variableContext);
  TypedValue typedValue = expression.getTypeDefinition().transform(value);
  evaluatedInput.setValue(typedValue);
 }
 else {
  evaluatedInput.setValue(Variables.untypedNullValue());
 }
 return evaluatedInput;
}

代码示例来源:origin: org.camunda.commons/camunda-commons-typed-values

/**
 * Creates a {@link TypedValue} with value {@code null} and type {@link ValueType#NULL}
 */
public static TypedValue untypedNullValue() {
 return untypedNullValue(false);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = { SINGLE_RESULT_BPMN, TEST_DECISION })
public void testSingleResultEmptyResult() {
 ProcessInstance processInstance = startTestProcess("empty result");
 Object result = runtimeService.getVariable(processInstance.getId(), "result");
 assertNull(result);
 TypedValue resultTyped = runtimeService.getVariableTyped(processInstance.getId(), "result");
 assertEquals(Variables.untypedNullValue(), resultTyped);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = { SINGLE_ENTRY_BPMN, TEST_DECISION })
public void testSingleEntryEmptyResult() {
 ProcessInstance processInstance = startTestProcess("empty result");
 Object result = runtimeService.getVariable(processInstance.getId(), "result");
 assertNull(result);
 TypedValue resultTyped = runtimeService.getVariableTyped(processInstance.getId(), "result");
 assertEquals(Variables.untypedNullValue(), resultTyped);
}

代码示例来源:origin: org.camunda.bpm.dmn/camunda-engine-dmn

@Override
public TypedValue transform(Object value) {
 if (value == null) {
  return Variables.untypedNullValue();
 } else {
  return transformNotNullValue(value);
 }
}

代码示例来源:origin: camunda/camunda-engine-dmn

@Override
public TypedValue transform(Object value) {
 if (value == null) {
  return Variables.untypedNullValue();
 } else {
  return transformNotNullValue(value);
 }
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Override
public Object mapDecisionResult(DmnDecisionResult decisionResult) {
 try {
  TypedValue typedValue = decisionResult.getSingleEntryTyped();
  if (typedValue != null) {
   return typedValue;
  }
  else {
   return Variables.untypedNullValue();
  }
 } catch (DmnEngineException e) {
  throw LOG.decisionResultMappingException(decisionResult, this, e);
 }
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Override
public Object mapDecisionResult(DmnDecisionResult decisionResult) {
 try {
  DmnDecisionResultEntries singleResult = decisionResult.getSingleResult();
  if (singleResult != null) {
   return singleResult.getEntryMap();
  } else
   return Variables.untypedNullValue();
 } catch (DmnEngineException e) {
  throw LOG.decisionResultMappingException(decisionResult, this, e);
 }
}

代码示例来源:origin: org.camunda.bpm.dmn/camunda-engine-dmn

protected DmnEvaluatedInput evaluateInput(DmnDecisionTableInputImpl input, VariableContext variableContext) {
 DmnEvaluatedInputImpl evaluatedInput = new DmnEvaluatedInputImpl(input);
 DmnExpressionImpl expression = input.getExpression();
 if (expression != null) {
  Object value = evaluateInputExpression(expression, variableContext);
  TypedValue typedValue = expression.getTypeDefinition().transform(value);
  evaluatedInput.setValue(typedValue);
 }
 else {
  evaluatedInput.setValue(Variables.untypedNullValue());
 }
 return evaluatedInput;
}

代码示例来源:origin: camunda/camunda-engine-dmn

protected DmnEvaluatedInput evaluateInput(DmnDecisionTableInputImpl input, VariableContext variableContext) {
 DmnEvaluatedInputImpl evaluatedInput = new DmnEvaluatedInputImpl(input);
 DmnExpressionImpl expression = input.getExpression();
 if (expression != null) {
  Object value = evaluateInputExpression(expression, variableContext);
  TypedValue typedValue = expression.getTypeDefinition().transform(value);
  evaluatedInput.setValue(typedValue);
 }
 else {
  evaluatedInput.setValue(Variables.untypedNullValue());
 }
 return evaluatedInput;
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Deployment(resources = { SINGLE_RESULT_BPMN, TEST_DECISION })
public void testSingleResultEmptyResult() {
 ProcessInstance processInstance = startTestProcess("empty result");
 Object result = runtimeService.getVariable(processInstance.getId(), "result");
 assertNull(result);
 TypedValue resultTyped = runtimeService.getVariableTyped(processInstance.getId(), "result");
 assertEquals(Variables.untypedNullValue(), resultTyped);
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Deployment(resources = { SINGLE_ENTRY_BPMN, TEST_DECISION })
public void testSingleEntryEmptyResult() {
 ProcessInstance processInstance = startTestProcess("empty result");
 Object result = runtimeService.getVariable(processInstance.getId(), "result");
 assertNull(result);
 TypedValue resultTyped = runtimeService.getVariableTyped(processInstance.getId(), "result");
 assertEquals(Variables.untypedNullValue(), resultTyped);
}

相关文章