@Override public DispatchLayer<?> createDispatchLayer(URI dispatchLayerType, JsonNode configuration) throws DispatchLayerNotFoundException, DispatchLayerConfigurationException { DispatchLayerFactory factory = getDispatchLayerFactory(dispatchLayerType); @SuppressWarnings("unchecked") DispatchLayer<JsonNode> dispatchLayer = (DispatchLayer<JsonNode>) factory .createDispatchLayer(dispatchLayerType); try { if (configuration != null) dispatchLayer.configure(configuration); } catch (org.apache.taverna.workflowmodel.ConfigurationException e) { throw new DispatchLayerConfigurationException(e); } return dispatchLayer; }