StringTokenizer st = new StringTokenizer(customActionlets, ",");
while (st.hasMoreTokens()) {
String clazz = st.nextToken();
try {
WorkFlowActionlet actionlet = (WorkFlowActionlet) Class.forName(clazz.trim()).newInstance();
actionletList.add(actionlet);
} catch (Exception e) {
Logger.error(WorkflowAPIImpl.class, e.getMessage(), e);
}
}
// get the included (shipped with) actionlet classes
for (Class<WorkFlowActionlet> z : actionletClasses) {
try {
actionletList.add(z.newInstance());
} catch (InstantiationException e) {
Logger.error(WorkflowAPIImpl.class, e.getMessage(), e);
} catch (IllegalAccessException e) {
Logger.error(WorkflowAPIImpl.class, e.getMessage(), e);
}
}
Collections.sort(actionletList, new ActionletComparator());
actionletMap = new LinkedHashMap<String, WorkFlowActionlet>();
for(WorkFlowActionlet actionlet : actionletList){
try {
actionletMap.put(actionlet.getClass().getCanonicalName(),actionlet.getClass().newInstance());
if ( !actionletClasses.contains( actionlet.getClass() ) ) {
actionletClasses.add( actionlet.getClass() );
}
} catch (InstantiationException e) {
Logger.error(WorkflowAPIImpl.class,e.getMessage(),e);
} catch (IllegalAccessException e) {
Logger.error(WorkflowAPIImpl.class,e.getMessage(),e);