use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode in project Activiti by Activiti.
the class ClassDelegate method execute.
// Activity Behavior
public void execute(ActivityExecution execution) throws Exception {
boolean isSkipExpressionEnabled = SkipExpressionUtil.isSkipExpressionEnabled(execution, skipExpression);
if (!isSkipExpressionEnabled || (isSkipExpressionEnabled && !SkipExpressionUtil.shouldSkipFlowElement(execution, skipExpression))) {
if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) {
ObjectNode taskElementProperties = Context.getBpmnOverrideElementProperties(serviceTaskId, execution.getProcessDefinitionId());
if (taskElementProperties != null && taskElementProperties.has(DynamicBpmnConstants.SERVICE_TASK_CLASS_NAME)) {
String overrideClassName = taskElementProperties.get(DynamicBpmnConstants.SERVICE_TASK_CLASS_NAME).asText();
if (StringUtils.isNotEmpty(overrideClassName) && overrideClassName.equals(className) == false) {
className = overrideClassName;
activityBehaviorInstance = null;
}
}
}
if (activityBehaviorInstance == null) {
activityBehaviorInstance = getActivityBehaviorInstance(execution);
}
try {
activityBehaviorInstance.execute(execution);
} catch (BpmnError error) {
ErrorPropagation.propagateError(error, execution);
} catch (Exception e) {
if (!ErrorPropagation.mapException(e, execution, mapExceptions)) {
throw e;
}
}
}
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode in project metacat by Netflix.
the class MetadataV1Resource method getDataMetadata.
/**
* {@inheritDoc}
*/
@Override
public DataMetadataDto getDataMetadata(final DataMetadataGetRequestDto metadataGetRequestDto) {
return requestWrapper.processRequest("getDataMetadata", () -> {
DataMetadataDto result = null;
if (metadataGetRequestDto.getUri() != null) {
final Optional<ObjectNode> o = userMetadataService.getDataMetadata(metadataGetRequestDto.getUri());
if (o.isPresent()) {
result = new DataMetadataDto();
result.setDataMetadata(o.get());
result.setUri(metadataGetRequestDto.getUri());
}
}
return result;
});
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode in project metacat by Netflix.
the class BaseUserMetadataService method populateMetadata.
/**
* Populate the given metadata.
*
* @param holder metadata
*/
@Override
public void populateMetadata(final HasMetadata holder) {
Optional<ObjectNode> metadata = Optional.empty();
if (holder instanceof HasDataMetadata) {
final HasDataMetadata dataDto = (HasDataMetadata) holder;
if (dataDto.isDataExternal()) {
metadata = getDataMetadata(dataDto.getDataUri());
}
}
Optional<ObjectNode> definitionMetadata = Optional.empty();
if (holder instanceof HasDefinitionMetadata) {
final HasDefinitionMetadata definitionDto = (HasDefinitionMetadata) holder;
definitionMetadata = getDefinitionMetadata(definitionDto.getDefinitionName());
}
populateMetadata(holder, definitionMetadata.orElse(null), metadata.orElse(null));
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode in project heron by twitter.
the class MarathonScheduler method getLabels.
protected ObjectNode getLabels(ObjectMapper mapper) {
ObjectNode labelNode = mapper.createObjectNode();
labelNode.put(MarathonConstants.ENVIRONMENT, Context.environ(config));
return labelNode;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode in project heron by twitter.
the class MarathonScheduler method getPorts.
protected ArrayNode getPorts(ObjectMapper mapper) {
ArrayNode ports = mapper.createArrayNode();
for (String portName : MarathonConstants.PORT_NAMES) {
ObjectNode port = mapper.createObjectNode();
port.put(MarathonConstants.PORT, 0);
port.put(MarathonConstants.PROTOCOL, MarathonConstants.TCP);
port.put(MarathonConstants.PORT_NAME, portName);
ports.add(port);
}
return ports;
}
Aggregations