public static FlowControllerDescription createFlowControllerDescription(
Class<? extends FlowController> flowControllerClass,
ConfigurationParameter[] configurationParameters, Object[] configurationValues,
Map<String, ExternalResourceDescription> externalResources)
throws ResourceInitializationException {
FlowControllerDescription desc = new FlowControllerDescription_impl();
desc.setFrameworkImplementation(Constants.JAVA_FRAMEWORK_NAME);
desc.setImplementationName(flowControllerClass.getName());
// set parameters
setParameters(desc, flowControllerClass, configurationParameters, configurationValues);
// Configure resource meta data
ResourceMetaData meta = desc.getMetaData();
ResourceMetaDataFactory.configureResourceMetaData(meta, flowControllerClass);
// Extract external resource dependencies
desc.setExternalResourceDependencies(createExternalResourceDependencies(flowControllerClass));
// Bind External Resources
if (externalResources != null) {
for (Entry<String, ExternalResourceDescription> e : externalResources.entrySet()) {
bindExternalResource(desc, e.getKey(), e.getValue());