public static void registerWorkItemHandlers(BPMComponentImplementationModel model, ClassLoader loader, ProcessRuntime processRuntime, RuntimeManager runtimeManager, ServiceDomain serviceDomain) {
ComponentModel componentModel = model.getComponent();
QName componentName = componentModel.getQName();
String componentTNS = componentModel.getTargetNamespace();
Set<String> registeredNames = new HashSet<String>();
WorkItemHandlersModel workItemHandlersModel = model.getWorkItemHandlers();
if (workItemHandlersModel != null) {
for (WorkItemHandlerModel workItemHandlerModel : workItemHandlersModel.getWorkItemHandlers()) {
Class<? extends WorkItemHandler> workItemHandlerClass = (Class<? extends WorkItemHandler>)workItemHandlerModel.getClazz(loader);
if (workItemHandlerClass == null) {
throw BPMMessages.MESSAGES.couldNotLoadWorkItemHandlerClass(workItemHandlerModel.getModelConfiguration().getAttribute("class"));
}
WorkItemHandler workItemHandler = newWorkItemHandler(workItemHandlerClass, processRuntime, runtimeManager);