diff --git a/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/worker/SchedulerService.java b/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/worker/SchedulerService.java index c9654ec0729c2604d78b438824cb41723fa72032..2793a4c46072551978394aa6ef614cc28ff5a352 100644 --- a/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/worker/SchedulerService.java +++ b/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/worker/SchedulerService.java @@ -102,8 +102,9 @@ public class SchedulerService extends AbstractLifecycleBean { public void selectWorker(Map request) throws JSONException { String type = (String) request.get(WorkerService.TYPE); DossierService.ACTION_DOSSIER action = DossierService.ACTION_DOSSIER.valueOf((String) request.get(ACTION)); - - if (WorkerService.TYPE_DOSSIER.equals(type) || WorkerService.TYPE_DOCUMENT.equals(type)) { + if(WorkerService.TYPE_EVENT.equals(type)) { + taskExecutor.submit(workerService.getHandler(request)); + } else if (WorkerService.TYPE_DOSSIER.equals(type) || WorkerService.TYPE_DOCUMENT.equals(type)) { String id = (String) request.get(WorkerService.ID); // (id == null) peut arriver pour les mails direct par exemple diff --git a/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/worker/WorkerService.java b/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/worker/WorkerService.java index 3e7d7e0588d5ffd4f67520f7d07d05e5ef53f35b..0b5d7abb9d0a40b976a933eab2a4ab3a1be359ce 100644 --- a/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/worker/WorkerService.java +++ b/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/worker/WorkerService.java @@ -42,6 +42,7 @@ public interface WorkerService { String TYPE = "type"; String TYPE_DOSSIER = "dossier"; String TYPE_DOCUMENT = "document"; + String TYPE_EVENT = "event"; String TYPE_MAIL = "mail"; String WORKSPACE = "workspace://SpacesStore/"; String USERNAME = "username"; @@ -49,6 +50,9 @@ public interface WorkerService { String ACTION = "action"; String DOSSIER_CIBLE = "dossierCible"; String AUTOMATIC = "auto"; + String EVENT = "event"; + String PARENT = "parent"; + String OLD_PARENT = "old_parent"; /** * Returns a runnable which can handle the request passed in parameter.