();     } }  private void addShutdownHook(final String workflowName) {     Runtime.getRuntime().addShutdownHook(new Thread() {         public void run() {             disableControlMessageStatus(workflowName);         }     });     log.info("Shut Down Hook Attached for the thread processing the workflow :"+workflowName); }  private synchronized void enableControlMessageStatus(String workflowName) {     if (workflowName != null) {         controlMessageStateMap.put(workflowName, true);         log.info("Thread processing the "+workflowName+" is added to the status map");     } }  private synchronized void disableControlMessageStatus(String workflowName) {     if (workflowName != null) {         controlMessageStateMap.remove(workflowName);         log.info("Thread processing the "+workflowName+" is released from the status map");     } }  