* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
public class ExecuteNodeExecutor extends AbstractSvcLogicNodeExecutor {
private static final Logger LOG = LoggerFactory
.getLogger(ExecuteNodeExecutor.class);
+ private static final String FAILURE="failure";
private static final String pluginErrorMessage = "Could not execute plugin. SvcLogic status will be set to failure.";
public SvcLogicNode execute(SvcLogicServiceBase svc, SvcLogicNode node,
String pluginName = SvcLogicExpressionResolver.evaluate(
node.getAttribute("plugin"), node, ctx);
- String outValue = "failure";
+ String outValue = FAILURE;
if (LOG.isDebugEnabled()) {
LOG.debug("execute node encountered - looking for plugin "
} else {
try {
- Map<String, String> parmMap = new HashMap<String, String>();
+ Map<String, String> parmMap = new HashMap<>();
Set<Map.Entry<String, SvcLogicExpression>> parmSet = node
.getParameterSet();
}else{
LOG.error(pluginErrorMessage, e);
}
- outValue = "failure";
- ctx.setStatus("failure");
+ outValue = FAILURE;
+ ctx.setStatus(FAILURE);
} catch (IllegalAccessException e) {
LOG.error(pluginErrorMessage, e);
- outValue = "failure";
- ctx.setStatus("failure");
+ outValue = FAILURE;
+ ctx.setStatus(FAILURE);
} catch (IllegalArgumentException e) {
LOG.error(pluginErrorMessage, e);
- outValue = "failure";
- ctx.setStatus("failure");
+ outValue = FAILURE;
+ ctx.setStatus(FAILURE);
}
}