class DefaultFailedMessageRetrier extends FailedMessageRetrierImp {

  @Override
  public void addWorkflow(Workflow workflow) throws CoreException {
    String key = workflow.obtainWorkflowId();
    if (getWorkflows().keySet().contains(key)) {
      log.warn("duplicate workflow ID [" + key + "]");
      throw new CoreException("Workflows cannot be uniquely identified");
    }
    log.debug("adding workflow with key [" + key + "]");
    getWorkflows().put(key, workflow);
  }

}