for (int ii = 0; ii < serviceReferences.size(); ii++) {
AlgorithmFactory factory =
bContext.getService(serviceReferences.get(ii));
if (factory != null) {
Algorithm algorithm = factory.createAlgorithm(
convertedData, this.parameters, this.ciShellContext);
try {
convertedData = algorithm.execute();
} catch(AlgorithmExecutionException e) {
boolean isLastStep = (ii == serviceReferences.size() - 1);
if (isLastStep && isHandler(serviceReferences.get(ii))) {
/* If the last step of the converter chain is a
* handler and it is the first (and so only) step