From a5d64695211d83e1af9eabb8a739fc0cf54578a3 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 03 Nov 2014 16:45:23 +0000
Subject: [PATCH] OPENDJ-1545 Remove Workflow, NetworkGroups and related attempts at building a proxy

---
 opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElement.java                                      |   46 -
 opendj3-server-dev/src/admin/messages/NetworkGroupCfgDefn.properties                                                      |    3 
 opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GlobalConfiguration.xml       |   33 -
 opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java             |  121 ---
 opendj3-server-dev/src/server/org/opends/server/core/WorkflowImpl.java                                                    |  116 --
 opendj3-server-dev/src/server/org/opends/server/core/WorkflowTopologyNode.java                                            |   11 
 opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml                                       |   25 
 opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/NetworkGroupTest.java          |   53 -
 opendj3-server-dev/src/server/org/opends/server/core/CoreConfigManager.java                                               |   19 
 opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroup.java                                      |  222 ------
 /dev/null                                                                                                                 |  469 --------------
 opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java                                                 |  467 +------------
 opendj3-server-dev/resource/config/config.ldif                                                                            |   15 
 opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowTopologyTest.java                    |   37 
 opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml |   32 
 opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml                                     |   33 -
 opendj3-server-dev/src/admin/messages/GlobalCfgDefn.properties                                                            |    3 
 opendj3-server-dev/src/server/org/opends/server/workflowelement/ObservableWorkflowElementState.java                       |   39 -
 opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java                 |    7 
 opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml                               |   32 
 opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootConfiguration.xml         |   25 
 opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowConfigurationTest.java               |  134 ----
 opendj3-server-dev/src/admin/messages/RootCfgDefn.properties                                                              |    7 
 23 files changed, 133 insertions(+), 1,816 deletions(-)

diff --git a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GlobalConfiguration.xml b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GlobalConfiguration.xml
index 74e915a..8442b7b 100644
--- a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GlobalConfiguration.xml
+++ b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/GlobalConfiguration.xml
@@ -761,39 +761,6 @@
       </ldap:attribute>
     </adm:profile>
   </adm:property>
-  <adm:property name="workflow-configuration-mode" hidden="true">
-    <adm:synopsis>
-      Specifies the workflow configuration mode (auto vs. manual).
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>auto</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:enumeration>
-        <adm:value name="auto">
-          <adm:synopsis>
-            In the "auto" configuration mode, there is no workflow
-            configuration. The workflows are created automatically based
-            on the backend configuration. There is one workflow per
-            backend base DN.
-          </adm:synopsis>
-        </adm:value>
-        <adm:value name="manual">
-          <adm:synopsis>
-            In the "manual" configuration mode, each workflow is created
-            according to its description in the configuration.
-          </adm:synopsis>
-        </adm:value>
-      </adm:enumeration>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-workflow-configuration-mode</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
   <adm:property name="etime-resolution" mandatory="false">
     <adm:synopsis>
       Specifies the resolution to use for operation elapsed processing time (etime)
diff --git a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalBackendWorkflowElementConfiguration.xml b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalBackendWorkflowElementConfiguration.xml
deleted file mode 100644
index a0591ac..0000000
--- a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalBackendWorkflowElementConfiguration.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ! CDDL HEADER START
-  !
-  ! The contents of this file are subject to the terms of the
-  ! Common Development and Distribution License, Version 1.0 only
-  ! (the "License").  You may not use this file except in compliance
-  ! with the License.
-  !
-  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-  ! or http://forgerock.org/license/CDDLv1.0.html.
-  ! See the License for the specific language governing permissions
-  ! and limitations under the License.
-  !
-  ! When distributing Covered Code, include this CDDL HEADER in each
-  ! file and include the License file at legal-notices/CDDLv1_0.txt.
-  ! If applicable, add the following below this CDDL HEADER, with the
-  ! fields enclosed by brackets "[]" replaced with your own identifying
-  ! information:
-  !      Portions Copyright [yyyy] [name of copyright owner]
-  !
-  ! CDDL HEADER END
-  !
-  !
-  !      Copyright 2007-2009 Sun Microsystems, Inc.
-  ! -->
-<adm:managed-object name="local-backend-workflow-element"
-  plural-name="local-backend-workflow-elements"
-  package="org.forgerock.opendj.server.config" extends="workflow-element"
-  xmlns:adm="http://opendj.forgerock.org/admin"
-  xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
-  <adm:synopsis>
-    The
-    <adm:user-friendly-name />
-    provides access to a backend.
-  </adm:synopsis>
-  <adm:tag name="user-management" />
-  <adm:profile name="ldap">
-    <ldap:object-class>
-      <ldap:name>ds-cfg-local-backend-workflow-element</ldap:name>
-      <ldap:superior>ds-cfg-workflow-element</ldap:superior>
-    </ldap:object-class>
-  </adm:profile>
-  <adm:property-override name="java-class" advanced="true">
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>
-          org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement
-        </adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-  </adm:property-override>
-  <adm:property name="backend" mandatory="true" read-only="true">
-    <adm:synopsis>
-      Identifies the backend accessed by the workflow element.
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:aggregation relation-name="backend" parent-path="/">
-      </adm:aggregation>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-backend</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-</adm:managed-object>
diff --git a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml
index b070ec6..10e5994 100644
--- a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml
+++ b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NetworkGroupConfiguration.xml
@@ -23,7 +23,7 @@
   !
   !
   !      Copyright 2007-2009 Sun Microsystems, Inc.
-  !      Portions copyright 2013 ForgeRock AS.
+  !      Portions copyright 2013-2014 ForgeRock AS.
   ! -->
 <adm:managed-object name="network-group"
   plural-name="network-groups"
@@ -108,36 +108,6 @@
       </ldap:attribute>
     </adm:profile>
   </adm:property>
-  <adm:property name="workflow" multi-valued="true">
-    <adm:synopsis>
-      Specifies a set of workflows which should be accessible from this
-      <adm:user-friendly-name/>
-      .
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:alias>
-        <adm:synopsis>No workflows will be accessible.</adm:synopsis>
-      </adm:alias>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:aggregation relation-name="workflow"
-        parent-path="/">
-        <adm:constraint>
-          <adm:synopsis>
-            The referenced workflows must be enabled.
-          </adm:synopsis>
-          <adm:target-is-enabled-condition>
-            <adm:contains property="enabled" value="true"/>
-          </adm:target-is-enabled-condition>
-        </adm:constraint>
-      </adm:aggregation>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-workflow</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
   <adm:property name="allowed-auth-method" multi-valued="true">
     <adm:synopsis>
       Specifies a set of allowed authorization methods that clients
diff --git a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootConfiguration.xml b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootConfiguration.xml
index c7f3e72..e9ff924 100644
--- a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootConfiguration.xml
+++ b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/RootConfiguration.xml
@@ -436,31 +436,6 @@
       <cli:relation>
         <cli:default-property name="enabled" />
         <cli:default-property name="priority" />
-        <cli:default-property name="workflow" />
-      </cli:relation>
-    </adm:profile>
-  </adm:relation>
-  <adm:relation name="workflow" hidden="true">
-    <adm:one-to-many />
-    <adm:profile name="ldap">
-      <ldap:rdn-sequence>cn=Workflows,cn=config</ldap:rdn-sequence>
-    </adm:profile>
-    <adm:profile name="cli">
-      <cli:relation>
-        <cli:default-property name="enabled" />
-      </cli:relation>
-    </adm:profile>
-  </adm:relation>
-  <adm:relation name="workflow-element" hidden="true">
-    <adm:one-to-many />
-    <adm:profile name="ldap">
-      <ldap:rdn-sequence>
-        cn=Workflow elements,cn=config
-      </ldap:rdn-sequence>
-    </adm:profile>
-    <adm:profile name="cli">
-      <cli:relation>
-        <cli:default-property name="enabled" />
       </cli:relation>
     </adm:profile>
   </adm:relation>
diff --git a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkflowConfiguration.xml b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkflowConfiguration.xml
deleted file mode 100644
index dda42b1..0000000
--- a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkflowConfiguration.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ! CDDL HEADER START
-  !
-  ! The contents of this file are subject to the terms of the
-  ! Common Development and Distribution License, Version 1.0 only
-  ! (the "License").  You may not use this file except in compliance
-  ! with the License.
-  !
-  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-  ! or http://forgerock.org/license/CDDLv1.0.html.
-  ! See the License for the specific language governing permissions
-  ! and limitations under the License.
-  !
-  ! When distributing Covered Code, include this CDDL HEADER in each
-  ! file and include the License file at legal-notices/CDDLv1_0.txt.
-  ! If applicable, add the following below this CDDL HEADER, with the
-  ! fields enclosed by brackets "[]" replaced with your own identifying
-  ! information:
-  !      Portions Copyright [yyyy] [name of copyright owner]
-  !
-  ! CDDL HEADER END
-  !
-  !
-  !      Copyright 2007-2010 Sun Microsystems, Inc.
-  !      Portions Copyright 2011 ForgeRock AS
-  ! -->
-<adm:managed-object name="workflow" plural-name="workflows"
-  package="org.forgerock.opendj.server.config"
-  xmlns:adm="http://opendj.forgerock.org/admin"
-  xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
-  <adm:synopsis>
-    The
-    <adm:user-friendly-name />
-    is a list of processing steps (Work Flow Elements) that are applied
-    to data as it is retrieved from the directory server.
-  </adm:synopsis>
-  <adm:tag name="core-server" />
-  <adm:profile name="ldap">
-    <ldap:object-class>
-      <ldap:name>ds-cfg-workflow</ldap:name>
-      <ldap:superior>top</ldap:superior>
-    </ldap:object-class>
-  </adm:profile>
-  <adm:property name="enabled" mandatory="true">
-    <adm:synopsis>
-      Indicates whether the
-      <adm:user-friendly-name />
-      is enabled for use in the server.
-    </adm:synopsis>
-    <adm:description>
-      If a
-      <adm:user-friendly-name />
-      is not enabled, then its contents are not accessible when
-      processing operations.
-    </adm:description>
-    <adm:syntax>
-      <adm:boolean />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-enabled</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="workflow-element" mandatory="true">
-    <adm:synopsis>
-      Specifies the root Workflow Element in the
-      <adm:user-friendly-name />
-      .
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:aggregation relation-name="workflow-element"
-        parent-path="/">
-        <adm:constraint>
-          <adm:synopsis>
-            The referenced workflow element must be enabled.
-          </adm:synopsis>
-          <adm:target-is-enabled-condition>
-            <adm:contains property="enabled" value="true" />
-          </adm:target-is-enabled-condition>
-        </adm:constraint>
-      </adm:aggregation>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-workflow-element</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="base-dn" mandatory="true" read-only="true">
-    <adm:synopsis>
-      Specifies the base DN of the data targeted by the
-      <adm:user-friendly-name />
-      .
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:dn />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-base-dn</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-</adm:managed-object>
diff --git a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkflowElementConfiguration.xml b/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkflowElementConfiguration.xml
deleted file mode 100644
index 2d48b17..0000000
--- a/opendj-config-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/WorkflowElementConfiguration.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ! CDDL HEADER START
-  !
-  ! The contents of this file are subject to the terms of the
-  ! Common Development and Distribution License, Version 1.0 only
-  ! (the "License").  You may not use this file except in compliance
-  ! with the License.
-  !
-  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-  ! or http://forgerock.org/license/CDDLv1.0.html.
-  ! See the License for the specific language governing permissions
-  ! and limitations under the License.
-  !
-  ! When distributing Covered Code, include this CDDL HEADER in each
-  ! file and include the License file at legal-notices/CDDLv1_0.txt.
-  ! If applicable, add the following below this CDDL HEADER, with the
-  ! fields enclosed by brackets "[]" replaced with your own identifying
-  ! information:
-  !      Portions Copyright [yyyy] [name of copyright owner]
-  !
-  ! CDDL HEADER END
-  !
-  !
-  !      Copyright 2007-2010 Sun Microsystems, Inc.
-  ! -->
-<adm:managed-object name="workflow-element"
-  plural-name="workflow-elements" package="org.forgerock.opendj.server.config"
-  xmlns:adm="http://opendj.forgerock.org/admin"
-  xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
-  <adm:synopsis>
-    <adm:user-friendly-plural-name />
-    implement a single processing step in a Work Flow.
-  </adm:synopsis>
-  <adm:description>
-    A
-    <adm:user-friendly-name />
-    can perform a task such as mapping DNs, renaming attributes,
-    filtering attributes, joining data sources, proxying, or
-    load-balancing. The simplest
-    <adm:user-friendly-name />
-    is the Local Backend Work Flow Element, which routes data
-    to a Backend.
-  </adm:description>
-  <adm:tag name="core-server" />
-  <adm:profile name="ldap">
-    <ldap:object-class>
-      <ldap:name>ds-cfg-workflow-element</ldap:name>
-      <ldap:superior>top</ldap:superior>
-    </ldap:object-class>
-  </adm:profile>
-  <adm:property name="enabled" mandatory="true">
-    <adm:synopsis>
-      Indicates whether the
-      <adm:user-friendly-name />
-      is enabled for use in the server.
-    </adm:synopsis>
-    <adm:description>
-      If a
-      <adm:user-friendly-name />
-      is not enabled, then its contents are not accessible when
-      processing operations.
-    </adm:description>
-    <adm:syntax>
-      <adm:boolean />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-enabled</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="java-class" mandatory="true">
-    <adm:synopsis>
-      Specifies the fully-qualified name of the Java class that provides the
-      <adm:user-friendly-name />
-      implementation.
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:java-class>
-        <adm:instance-of>
-          org.opends.server.workflowelement.WorkflowElement
-        </adm:instance-of>
-      </adm:java-class>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-java-class</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-</adm:managed-object>
diff --git a/opendj3-server-dev/resource/config/config.ldif b/opendj3-server-dev/resource/config/config.ldif
index fed73e2..7b558a1 100644
--- a/opendj3-server-dev/resource/config/config.ldif
+++ b/opendj3-server-dev/resource/config/config.ldif
@@ -2636,18 +2636,3 @@
 objectClass: ds-cfg-branch
 cn: Extensions
 
-dn: cn=Network Groups,cn=config
-objectClass: top
-objectClass: ds-cfg-branch
-cn: Network Groups
-
-dn: cn=Workflows,cn=config
-objectClass: top
-objectClass: ds-cfg-branch
-cn: Workflows
-
-dn: cn=Workflow Elements,cn=config
-objectClass: top
-objectClass: ds-cfg-branch
-cn: Workflow Elements
-
diff --git a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
index e009e71..f15f74e 100644
--- a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
+++ b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
@@ -767,39 +767,6 @@
       </ldap:attribute>
     </adm:profile>
   </adm:property>
-  <adm:property name="workflow-configuration-mode" hidden="true">
-    <adm:synopsis>
-      Specifies the workflow configuration mode (auto vs. manual).
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>auto</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:enumeration>
-        <adm:value name="auto">
-          <adm:synopsis>
-            In the "auto" configuration mode, there is no workflow
-            configuration. The workflows are created automatically based
-            on the backend configuration. There is one workflow per
-            backend base DN.
-          </adm:synopsis>
-        </adm:value>
-        <adm:value name="manual">
-          <adm:synopsis>
-            In the "manual" configuration mode, each workflow is created
-            according to its description in the configuration.
-          </adm:synopsis>
-        </adm:value>
-      </adm:enumeration>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-workflow-configuration-mode</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
   <adm:property name="etime-resolution" mandatory="false">
     <adm:synopsis>
       Specifies the resolution to use for operation elapsed processing time (etime)
diff --git a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/LocalBackendWorkflowElementConfiguration.xml b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/LocalBackendWorkflowElementConfiguration.xml
deleted file mode 100644
index 157155a..0000000
--- a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/LocalBackendWorkflowElementConfiguration.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ! CDDL HEADER START
-  !
-  ! The contents of this file are subject to the terms of the
-  ! Common Development and Distribution License, Version 1.0 only
-  ! (the "License").  You may not use this file except in compliance
-  ! with the License.
-  !
-  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-  ! or http://forgerock.org/license/CDDLv1.0.html.
-  ! See the License for the specific language governing permissions
-  ! and limitations under the License.
-  !
-  ! When distributing Covered Code, include this CDDL HEADER in each
-  ! file and include the License file at legal-notices/CDDLv1_0.txt.
-  ! If applicable, add the following below this CDDL HEADER, with the
-  ! fields enclosed by brackets "[]" replaced with your own identifying
-  ! information:
-  !      Portions Copyright [yyyy] [name of copyright owner]
-  !
-  ! CDDL HEADER END
-  !
-  !
-  !      Copyright 2007-2009 Sun Microsystems, Inc.
-  ! -->
-<adm:managed-object name="local-backend-workflow-element"
-  plural-name="local-backend-workflow-elements"
-  package="org.opends.server.admin.std" extends="workflow-element"
-  xmlns:adm="http://www.opends.org/admin"
-  xmlns:ldap="http://www.opends.org/admin-ldap">
-  <adm:synopsis>
-    The
-    <adm:user-friendly-name />
-    provides access to a backend.
-  </adm:synopsis>
-  <adm:tag name="user-management" />
-  <adm:profile name="ldap">
-    <ldap:object-class>
-      <ldap:name>ds-cfg-local-backend-workflow-element</ldap:name>
-      <ldap:superior>ds-cfg-workflow-element</ldap:superior>
-    </ldap:object-class>
-  </adm:profile>
-  <adm:property-override name="java-class" advanced="true">
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>
-          org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement
-        </adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-  </adm:property-override>
-  <adm:property name="backend" mandatory="true" read-only="true">
-    <adm:synopsis>
-      Identifies the backend accessed by the workflow element.
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:aggregation relation-name="backend" parent-path="/">
-      </adm:aggregation>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-backend</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-</adm:managed-object>
diff --git a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml
index 382ed33..6fabaf3 100644
--- a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml
+++ b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml
@@ -23,7 +23,7 @@
   !
   !
   !      Copyright 2007-2009 Sun Microsystems, Inc.
-  !      Portions copyright 2013 ForgeRock AS.
+  !      Portions copyright 2013-2014 ForgeRock AS.
   ! -->
 <adm:managed-object name="network-group"
   plural-name="network-groups"
@@ -108,36 +108,6 @@
       </ldap:attribute>
     </adm:profile>
   </adm:property>
-  <adm:property name="workflow" multi-valued="true">
-    <adm:synopsis>
-      Specifies a set of workflows which should be accessible from this
-      <adm:user-friendly-name/>
-      .
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:alias>
-        <adm:synopsis>No workflows will be accessible.</adm:synopsis>
-      </adm:alias>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:aggregation relation-name="workflow"
-        parent-path="/">
-        <adm:constraint>
-          <adm:synopsis>
-            The referenced workflows must be enabled.
-          </adm:synopsis>
-          <adm:target-is-enabled-condition>
-            <adm:contains property="enabled" value="true"/>
-          </adm:target-is-enabled-condition>
-        </adm:constraint>
-      </adm:aggregation>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-workflow</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
   <adm:property name="allowed-auth-method" multi-valued="true">
     <adm:synopsis>
       Specifies a set of allowed authorization methods that clients
diff --git a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml
index a235f62..fbac903 100644
--- a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml
+++ b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/RootConfiguration.xml
@@ -436,31 +436,6 @@
       <cli:relation>
         <cli:default-property name="enabled" />
         <cli:default-property name="priority" />
-        <cli:default-property name="workflow" />
-      </cli:relation>
-    </adm:profile>
-  </adm:relation>
-  <adm:relation name="workflow" hidden="true">
-    <adm:one-to-many />
-    <adm:profile name="ldap">
-      <ldap:rdn-sequence>cn=Workflows,cn=config</ldap:rdn-sequence>
-    </adm:profile>
-    <adm:profile name="cli">
-      <cli:relation>
-        <cli:default-property name="enabled" />
-      </cli:relation>
-    </adm:profile>
-  </adm:relation>
-  <adm:relation name="workflow-element" hidden="true">
-    <adm:one-to-many />
-    <adm:profile name="ldap">
-      <ldap:rdn-sequence>
-        cn=Workflow elements,cn=config
-      </ldap:rdn-sequence>
-    </adm:profile>
-    <adm:profile name="cli">
-      <cli:relation>
-        <cli:default-property name="enabled" />
       </cli:relation>
     </adm:profile>
   </adm:relation>
diff --git a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/WorkflowConfiguration.xml b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/WorkflowConfiguration.xml
deleted file mode 100644
index 70e158e..0000000
--- a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/WorkflowConfiguration.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ! CDDL HEADER START
-  !
-  ! The contents of this file are subject to the terms of the
-  ! Common Development and Distribution License, Version 1.0 only
-  ! (the "License").  You may not use this file except in compliance
-  ! with the License.
-  !
-  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-  ! or http://forgerock.org/license/CDDLv1.0.html.
-  ! See the License for the specific language governing permissions
-  ! and limitations under the License.
-  !
-  ! When distributing Covered Code, include this CDDL HEADER in each
-  ! file and include the License file at legal-notices/CDDLv1_0.txt.
-  ! If applicable, add the following below this CDDL HEADER, with the
-  ! fields enclosed by brackets "[]" replaced with your own identifying
-  ! information:
-  !      Portions Copyright [yyyy] [name of copyright owner]
-  !
-  ! CDDL HEADER END
-  !
-  !
-  !      Copyright 2007-2010 Sun Microsystems, Inc.
-  !      Portions Copyright 2011 ForgeRock AS
-  ! -->
-<adm:managed-object name="workflow" plural-name="workflows"
-  package="org.opends.server.admin.std"
-  xmlns:adm="http://www.opends.org/admin"
-  xmlns:ldap="http://www.opends.org/admin-ldap">
-  <adm:synopsis>
-    The
-    <adm:user-friendly-name />
-    is a list of processing steps (Work Flow Elements) that are applied
-    to data as it is retrieved from the directory server.
-  </adm:synopsis>
-  <adm:tag name="core-server" />
-  <adm:profile name="ldap">
-    <ldap:object-class>
-      <ldap:name>ds-cfg-workflow</ldap:name>
-      <ldap:superior>top</ldap:superior>
-    </ldap:object-class>
-  </adm:profile>
-  <adm:property name="enabled" mandatory="true">
-    <adm:synopsis>
-      Indicates whether the
-      <adm:user-friendly-name />
-      is enabled for use in the server.
-    </adm:synopsis>
-    <adm:description>
-      If a
-      <adm:user-friendly-name />
-      is not enabled, then its contents are not accessible when
-      processing operations.
-    </adm:description>
-    <adm:syntax>
-      <adm:boolean />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-enabled</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="workflow-element" mandatory="true">
-    <adm:synopsis>
-      Specifies the root Workflow Element in the
-      <adm:user-friendly-name />
-      .
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:aggregation relation-name="workflow-element"
-        parent-path="/">
-        <adm:constraint>
-          <adm:synopsis>
-            The referenced workflow element must be enabled.
-          </adm:synopsis>
-          <adm:target-is-enabled-condition>
-            <adm:contains property="enabled" value="true" />
-          </adm:target-is-enabled-condition>
-        </adm:constraint>
-      </adm:aggregation>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-workflow-element</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="base-dn" mandatory="true" read-only="true">
-    <adm:synopsis>
-      Specifies the base DN of the data targeted by the
-      <adm:user-friendly-name />
-      .
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:dn />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-base-dn</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-</adm:managed-object>
diff --git a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/WorkflowElementConfiguration.xml b/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/WorkflowElementConfiguration.xml
deleted file mode 100644
index 8a3cc09..0000000
--- a/opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/WorkflowElementConfiguration.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ! CDDL HEADER START
-  !
-  ! The contents of this file are subject to the terms of the
-  ! Common Development and Distribution License, Version 1.0 only
-  ! (the "License").  You may not use this file except in compliance
-  ! with the License.
-  !
-  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-  ! or http://forgerock.org/license/CDDLv1.0.html.
-  ! See the License for the specific language governing permissions
-  ! and limitations under the License.
-  !
-  ! When distributing Covered Code, include this CDDL HEADER in each
-  ! file and include the License file at legal-notices/CDDLv1_0.txt.
-  ! If applicable, add the following below this CDDL HEADER, with the
-  ! fields enclosed by brackets "[]" replaced with your own identifying
-  ! information:
-  !      Portions Copyright [yyyy] [name of copyright owner]
-  !
-  ! CDDL HEADER END
-  !
-  !
-  !      Copyright 2007-2010 Sun Microsystems, Inc.
-  ! -->
-<adm:managed-object name="workflow-element"
-  plural-name="workflow-elements" package="org.opends.server.admin.std"
-  xmlns:adm="http://www.opends.org/admin"
-  xmlns:ldap="http://www.opends.org/admin-ldap">
-  <adm:synopsis>
-    <adm:user-friendly-plural-name />
-    implement a single processing step in a Work Flow.
-  </adm:synopsis>
-  <adm:description>
-    A
-    <adm:user-friendly-name />
-    can perform a task such as mapping DNs, renaming attributes,
-    filtering attributes, joining data sources, proxying, or
-    load-balancing. The simplest
-    <adm:user-friendly-name />
-    is the Local Backend Work Flow Element, which routes data
-    to a Backend.
-  </adm:description>
-  <adm:tag name="core-server" />
-  <adm:profile name="ldap">
-    <ldap:object-class>
-      <ldap:name>ds-cfg-workflow-element</ldap:name>
-      <ldap:superior>top</ldap:superior>
-    </ldap:object-class>
-  </adm:profile>
-  <adm:property name="enabled" mandatory="true">
-    <adm:synopsis>
-      Indicates whether the
-      <adm:user-friendly-name />
-      is enabled for use in the server.
-    </adm:synopsis>
-    <adm:description>
-      If a
-      <adm:user-friendly-name />
-      is not enabled, then its contents are not accessible when
-      processing operations.
-    </adm:description>
-    <adm:syntax>
-      <adm:boolean />
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-enabled</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-  <adm:property name="java-class" mandatory="true">
-    <adm:synopsis>
-      Specifies the fully-qualified name of the Java class that provides the
-      <adm:user-friendly-name />
-      implementation.
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:java-class>
-        <adm:instance-of>
-          org.opends.server.workflowelement.WorkflowElement
-        </adm:instance-of>
-      </adm:java-class>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-java-class</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
-</adm:managed-object>
diff --git a/opendj3-server-dev/src/admin/messages/GlobalCfgDefn.properties b/opendj3-server-dev/src/admin/messages/GlobalCfgDefn.properties
index 948cb4d..ab1e2ea 100644
--- a/opendj3-server-dev/src/admin/messages/GlobalCfgDefn.properties
+++ b/opendj3-server-dev/src/admin/messages/GlobalCfgDefn.properties
@@ -80,9 +80,6 @@
 property.smtp-server.syntax.string.pattern.synopsis=A hostname, optionally followed by a ":" followed by a port number.
 property.time-limit.synopsis=Specifies the maximum length of time that should be spent processing a single search operation.
 property.time-limit.description=A value of 0 seconds indicates that no time limit is enforced. Note that this is the default server-wide time limit, but it may be overridden on a per-user basis using the ds-rlim-time-limit operational attribute.
-property.workflow-configuration-mode.synopsis=Specifies the workflow configuration mode (auto vs. manual).
-property.workflow-configuration-mode.syntax.enumeration.value.auto.synopsis=In the "auto" configuration mode, there is no workflow configuration. The workflows are created automatically based on the backend configuration. There is one workflow per backend base DN.
-property.workflow-configuration-mode.syntax.enumeration.value.manual.synopsis=In the "manual" configuration mode, each workflow is created according to its description in the configuration.
 property.writability-mode.synopsis=Specifies the kinds of write operations the directory server can process.
 property.writability-mode.syntax.enumeration.value.disabled.synopsis=The directory server rejects all write operations that are requested of it, regardless of their origin.
 property.writability-mode.syntax.enumeration.value.enabled.synopsis=The directory server attempts to process all write operations that are requested of it, regardless of their origin.
diff --git a/opendj3-server-dev/src/admin/messages/NetworkGroupCfgDefn.properties b/opendj3-server-dev/src/admin/messages/NetworkGroupCfgDefn.properties
index d03a95d..b7b68bf 100644
--- a/opendj3-server-dev/src/admin/messages/NetworkGroupCfgDefn.properties
+++ b/opendj3-server-dev/src/admin/messages/NetworkGroupCfgDefn.properties
@@ -30,9 +30,6 @@
 property.is-security-mandatory.requires-admin-action.synopsis=Changes to this property take effect immediately and do not interfere with connections that may have already been established.
 property.priority.synopsis=Specifies the priority for this Network Group.
 property.priority.description=A client connection is first compared against the Network Group with the lowest priority. If the client connection does not match its connection criteria, then the client connection is compared against the Network Group with next lowest priority, and so on. If no Network Group is selected then the client connection is rejected.
-property.workflow.synopsis=Specifies a set of workflows which should be accessible from this Network Group .
-property.workflow.default-behavior.alias.synopsis=No workflows will be accessible.
-property.workflow.syntax.aggregation.constraint-synopsis=The referenced workflows must be enabled.
 relation.network-group-qos-policy.user-friendly-name=Network Group QOS Policy
 relation.network-group-qos-policy.user-friendly-plural-name=Network Group QOS Policies
 relation.network-group-qos-policy.synopsis=Specifies the set of quality of service (QoS) policies enforced by the QOS Policy .
diff --git a/opendj3-server-dev/src/admin/messages/RootCfgDefn.properties b/opendj3-server-dev/src/admin/messages/RootCfgDefn.properties
index 8e787e7..c257c3f 100644
--- a/opendj3-server-dev/src/admin/messages/RootCfgDefn.properties
+++ b/opendj3-server-dev/src/admin/messages/RootCfgDefn.properties
@@ -119,13 +119,6 @@
 relation.virtual-attribute.user-friendly-plural-name=Virtual Attributes
 relation.virtual-attribute.synopsis=Virtual Attributes are responsible for dynamically generating attribute values that appear in entries but are not persistently stored in the backend.
 relation.virtual-attribute.description=Virtual attributes are associated with a virtual attribute provider, which contains the logic for generating the value.
-relation.workflow.user-friendly-name=Workflow
-relation.workflow.user-friendly-plural-name=Workflows
-relation.workflow.synopsis=The Workflow is a list of processing steps (Work Flow Elements) that are applied to data as it is retrieved from the directory server.
-relation.workflow-element.user-friendly-name=Workflow Element
-relation.workflow-element.user-friendly-plural-name=Workflow Elements
-relation.workflow-element.synopsis=Workflow Elements implement a single processing step in a Work Flow.
-relation.workflow-element.description=A Workflow Element can perform a task such as mapping DNs, renaming attributes, filtering attributes, joining data sources, proxying, or load-balancing. The simplest Workflow Element is the Local Backend Work Flow Element, which routes data to a Backend.
 relation.work-queue.user-friendly-name=Work Queue
 relation.work-queue.synopsis=The Work Queue provides the configuration for the server work queue and is responsible for ensuring that requests received from clients are processed in a timely manner.
 relation.work-queue.description=Only a single work queue can be defined in the server. Whenever a connection handler receives a client request, it should place the request in the work queue to be processed appropriately.
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/CoreConfigManager.java b/opendj3-server-dev/src/server/org/opends/server/core/CoreConfigManager.java
index c971662..c356916 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/CoreConfigManager.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/CoreConfigManager.java
@@ -34,7 +34,6 @@
 import org.opends.server.admin.server.ConfigurationChangeListener;
 import org.opends.server.admin.server.ServerManagementContext;
 import org.opends.server.admin.std.meta.GlobalCfgDefn;
-import org.opends.server.admin.std.meta.GlobalCfgDefn.WorkflowConfigurationMode;
 import org.opends.server.admin.std.meta.GlobalCfgDefn.DisabledPrivilege;
 import org.opends.server.admin.std.meta.GlobalCfgDefn.InvalidAttributeSyntaxBehavior;
 import org.opends.server.admin.std.meta.GlobalCfgDefn.SingleStructuralObjectclassBehavior;
@@ -153,24 +152,6 @@
     setIdleTimeLimit(globalConfig.getIdleTimeLimit());
     setSaveConfigOnSuccessfulStartup(globalConfig.isSaveConfigOnSuccessfulStartup());
 
-    // If the workflow configuration mode has changed then reconfigure
-    // the workflows-only if the server is running. If the server is not
-    // running (ie. the server is starting up) simply update the workflow
-    // configuration mode as the workflow configuration is processed
-    // elsewhere.
-    WorkflowConfigurationMode oldMode =
-      DirectoryServer.getWorkflowConfigurationMode();
-    WorkflowConfigurationMode newMode =
-      globalConfig.getWorkflowConfigurationMode();
-    if (DirectoryServer.isRunning())
-    {
-      DirectoryServer.reconfigureWorkflows(oldMode, newMode);
-    }
-    else
-    {
-      DirectoryServer.setWorkflowConfigurationMode(newMode);
-    }
-
     setUseNanoTime(globalConfig.getEtimeResolution() == GlobalCfgDefn.EtimeResolution.NANOSECONDS);
     setMaxAllowedConnections(globalConfig.getMaxAllowedClientConnections());
     setMaxPersistentSearchLimit(globalConfig.getMaxPsearches());
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java b/opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java
index 42577cf..1a313a5 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java
@@ -68,7 +68,6 @@
 import org.opends.server.admin.AdministrationDataSync;
 import org.opends.server.admin.ClassLoaderProvider;
 import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.admin.std.meta.GlobalCfgDefn.WorkflowConfigurationMode;
 import org.opends.server.admin.std.server.AlertHandlerCfg;
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
 import org.opends.server.admin.std.server.ConnectionHandlerCfg;
@@ -128,7 +127,6 @@
 import org.opends.server.controls.PasswordPolicyErrorType;
 import org.opends.server.controls.PasswordPolicyResponseControl;
 import org.opends.server.core.networkgroups.NetworkGroup;
-import org.opends.server.core.networkgroups.NetworkGroupConfigManager;
 import org.opends.server.crypto.CryptoManagerImpl;
 import org.opends.server.crypto.CryptoManagerSync;
 import org.opends.server.extensions.ConfigFileHandler;
@@ -213,8 +211,6 @@
 import org.opends.server.util.SetupUtils;
 import org.opends.server.util.TimeThread;
 import org.opends.server.util.VersionCompatibilityIssue;
-import org.opends.server.workflowelement.WorkflowElement;
-import org.opends.server.workflowelement.WorkflowElementConfigManager;
 import org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement;
 
 import com.forgerock.opendj.cli.ArgumentConstants;
@@ -227,7 +223,6 @@
 import com.forgerock.opendj.util.OperatingSystem;
 
 import static org.forgerock.util.Reject.*;
-import static org.opends.messages.ConfigMessages.*;
 import static org.opends.messages.CoreMessages.*;
 import static org.opends.messages.ToolMessages.*;
 import static org.opends.server.config.ConfigConstants.*;
@@ -840,34 +835,6 @@
   private WritabilityMode writabilityMode;
 
   /**
-   * The mappings between the names and WorkflowElements registered with the
-   * Directory Server.
-   */
-  private final ConcurrentMap<String, WorkflowElement> workflowElements =
-          new ConcurrentHashMap<String, WorkflowElement>();
-
-  /** The workflow configuration mode (auto or manual). */
-  private WorkflowConfigurationMode workflowConfigurationMode;
-
-  /**
-   * The network group config manager for the Directory Server. This config
-   * manager is used when the workflow configuration mode is 'manual'.
-   */
-  private NetworkGroupConfigManager networkGroupConfigManager;
-
-  /**
-   * The workflow config manager for the Directory Server. This config manager
-   * is used when the workflow configuration mode is 'manual'.
-   */
-  private WorkflowConfigManager workflowConfigManager;
-
-  /**
-   * The workflow element config manager for the Directory Server. This config
-   * manager is used when the workflow configuration mode is 'manual'.
-   */
-  private WorkflowElementConfigManager workflowElementConfigManager;
-
-  /**
    * The maximum size that internal buffers will be allowed to grow to until
    * they are trimmed.
    */
@@ -1591,17 +1558,8 @@
       // and initialize the workflows when workflow configuration mode is auto.
       initializeBackends();
 
-      // When workflow configuration mode is manual, do configure the
-      // workflows now, else just configure the remaining workflows
-      // (rootDSE and config backend).
-      if (workflowConfigurationModeIsAuto())
-      {
-        createAndRegisterRemainingWorkflows();
-      }
-      else
-      {
-        configureWorkflowsManual();
-      }
+      // configure the remaining workflows (rootDSE and config backend).
+      createAndRegisterRemainingWorkflows();
 
       // Check for and initialize user configured entry cache if any.
       // If not then stick with default entry cache initialized earlier.
@@ -2216,16 +2174,13 @@
    *
    * @param baseDN  the DN of the workflow to deregister
    */
-  private static void deregisterWorkflowWithInternalNetworkGroup(
-      DN baseDN
-      )
+  private static void deregisterWorkflowWithInternalNetworkGroup(DN baseDN)
   {
     // Get the internal network group and deregister all the workflows
     // being configured for the backend (there is one workflow per
     // backend base DN).
     NetworkGroup internalNetworkGroup = NetworkGroup.getInternalNetworkGroup();
-    Workflow workflow = internalNetworkGroup.deregisterWorkflow(baseDN);
-    WorkflowImpl workflowImpl = (WorkflowImpl) workflow;
+    WorkflowImpl workflowImpl = (WorkflowImpl) internalNetworkGroup.deregisterWorkflow(baseDN);
     workflowImpl.deregister();
   }
 
@@ -2241,25 +2196,25 @@
    *                              workflow conflicts with the workflow
    *                              ID of an existing workflow.
    */
-  private static void createAndRegisterWorkflowsWithDefaultNetworkGroup(
-      Backend backend) throws DirectoryException
+  private static void createAndRegisterWorkflowsWithDefaultNetworkGroup(Backend<?> backend) throws DirectoryException
   {
     // Create a workflow for each backend base DN and register the workflow
     // with the default/internal/admin network group.
     for (DN curBaseDN: backend.getBaseDNs())
     {
-      WorkflowImpl workflowImpl = createWorkflow(curBaseDN, backend);
-      registerWorkflowWithAdminNetworkGroup(workflowImpl);
-      registerWorkflowWithInternalNetworkGroup(workflowImpl);
-      // Special case for cn=config
-      // it must not be added to the default ng except in auto mode
-      if (!curBaseDN.equals(DN.valueOf(DN_CONFIG_ROOT))
-          || workflowConfigurationModeIsAuto()) {
-        registerWorkflowWithDefaultNetworkGroup(workflowImpl);
-      }
+      createAndRegisterWorkflowWithDefaultNetworkGroup(curBaseDN, backend);
     }
   }
 
+  private static void createAndRegisterWorkflowWithDefaultNetworkGroup(DN baseDN, Backend<?> backend)
+      throws DirectoryException
+  {
+    WorkflowImpl workflowImpl = createWorkflow(baseDN, backend);
+    NetworkGroup.getAdminNetworkGroup().registerWorkflow(workflowImpl);
+    NetworkGroup.getInternalNetworkGroup().registerWorkflow(workflowImpl);
+    NetworkGroup.getDefaultNetworkGroup().registerWorkflow(workflowImpl);
+  }
+
 
   /**
    * Creates one workflow for a given base DN in a backend.
@@ -2273,8 +2228,7 @@
    *                              workflow conflicts with the workflow
    *                              ID of an existing workflow.
    */
-  private static WorkflowImpl createWorkflow(DN baseDN, Backend backend)
-      throws DirectoryException
+  private static WorkflowImpl createWorkflow(DN baseDN, Backend<?> backend) throws DirectoryException
   {
     String backendID = backend.getBackendID();
 
@@ -2304,63 +2258,6 @@
 
 
   /**
-   * Registers a workflow with the default network group. This method
-   * is intended to be called when workflow configuration mode is auto.
-   *
-   * @param workflowImpl  The workflow to register with the
-   *                      default network group
-   *
-   * @throws  DirectoryException  If the workflow is already registered with
-   *                              the default network group
-   */
-  private static void registerWorkflowWithDefaultNetworkGroup(
-      WorkflowImpl workflowImpl
-      ) throws DirectoryException
-  {
-    NetworkGroup defaultNetworkGroup = NetworkGroup.getDefaultNetworkGroup();
-    defaultNetworkGroup.registerWorkflow(workflowImpl);
-  }
-
-
-  /**
-   * Registers a workflow with the admin network group. This method
-   * is intended to be called when workflow configuration mode is auto.
-   *
-   * @param workflowImpl  The workflow to register with the
-   *                      admin network group
-   *
-   * @throws  DirectoryException  If the workflow is already registered with
-   *                              the admin network group
-   */
-  private static void registerWorkflowWithAdminNetworkGroup(
-      WorkflowImpl workflowImpl
-      ) throws DirectoryException
-  {
-    NetworkGroup adminNetworkGroup = NetworkGroup.getAdminNetworkGroup();
-    adminNetworkGroup.registerWorkflow(workflowImpl);
-  }
-
-
-  /**
-   * Registers a workflow with the internal network group. This method
-   * is intended to be called when workflow configuration mode is auto.
-   *
-   * @param workflowImpl  The workflow to register with the
-   *                      internal network group
-   *
-   * @throws  DirectoryException  If the workflow is already registered with
-   *                              the internal network group
-   */
-  private static void registerWorkflowWithInternalNetworkGroup(
-      WorkflowImpl workflowImpl
-      ) throws DirectoryException
-  {
-    NetworkGroup internalNetworkGroup = NetworkGroup.getInternalNetworkGroup();
-    internalNetworkGroup.registerWorkflow(workflowImpl);
-  }
-
-
-  /**
    * Creates the missing workflows, one for the config backend and one for
    * the rootDSE backend.
    *
@@ -2387,159 +2284,6 @@
 
 
   /**
-   * Reconfigures the workflows when configuration mode has changed.
-   * This method is invoked when workflows need to be reconfigured
-   * while the server is running. If the reconfiguration is valid
-   * then the method update the workflow configuration mode.
-   *
-   * @param oldMode  the current workflow configuration mode
-   * @param newMode  the new workflow configuration mode
-   */
-  public static void reconfigureWorkflows(
-      WorkflowConfigurationMode oldMode,
-      WorkflowConfigurationMode newMode)
-  {
-    if (oldMode == WorkflowConfigurationMode.AUTO
-        && newMode == WorkflowConfigurationMode.MANUAL)
-    {
-      // move to manual mode
-      try
-      {
-        setWorkflowConfigurationMode(newMode);
-        directoryServer.configureWorkflowsManual();
-      }
-      catch (Exception e)
-      {
-        // rollback to auto mode
-        try
-        {
-           setWorkflowConfigurationMode(oldMode);
-           directoryServer.configureWorkflowsAuto();
-        }
-        catch (Exception ee)
-        {
-          // rollback to auto mode is failing too!!
-          // well, just log an error message and suggest the admin
-          // to restart the server with the last valid config...
-          logger.error(ERR_CONFIG_WORKFLOW_CANNOT_CONFIGURE_MANUAL);
-        }
-      }
-    }
-    else if (oldMode == WorkflowConfigurationMode.MANUAL
-        && newMode == WorkflowConfigurationMode.AUTO)
-    {
-      // move to auto mode
-      try
-      {
-        setWorkflowConfigurationMode(newMode);
-        directoryServer.configureWorkflowsAuto();
-      }
-      catch (Exception e)
-      {
-        // rollback to manual mode
-        try
-        {
-           setWorkflowConfigurationMode(oldMode);
-           directoryServer.configureWorkflowsManual();
-        }
-        catch (Exception ee)
-        {
-          // rollback to auto mode is failing too!!
-          // well, just log an error message and suggest the admin
-          // to restart the server with the last valid config...
-          logger.error(ERR_CONFIG_WORKFLOW_CANNOT_CONFIGURE_AUTO);
-        }
-      }
-    }
-  }
-
-
-  /**
-   * Configures the workflows when configuration mode is manual.
-   *
-   * @throws  ConfigException  If there is a problem with the Directory Server
-   *                           configuration that prevents a critical component
-   *                           from being instantiated.
-   *
-   * @throws  InitializationException  If some other problem occurs while
-   *                                   attempting to initialize and start the
-   *                                   Directory Server.
-   */
-  private void configureWorkflowsManual()
-      throws ConfigException, InitializationException
-  {
-    // First of all re-initialize the current workflow configuration
-    NetworkGroup.resetConfig();
-    WorkflowImpl.resetConfig();
-    directoryServer.workflowElements.clear();
-
-    // We now need to complete the workflow creation for the
-    // config backend and rootDSE backend.
-    createAndRegisterRemainingWorkflows();
-
-    // Then configure the workflows
-    workflowElementConfigManager = new WorkflowElementConfigManager(serverContext);
-    workflowElementConfigManager.initializeWorkflowElements();
-
-    workflowConfigManager = new WorkflowConfigManager(serverContext);
-    workflowConfigManager.initializeWorkflows();
-
-    if (networkGroupConfigManager == null)
-    {
-      networkGroupConfigManager = new NetworkGroupConfigManager(serverContext);
-      networkGroupConfigManager.initializeNetworkGroups();
-    }
-  }
-
-
-  /**
-   * Configures the workflows when configuration mode is auto.
-   *
-   * @throws  ConfigException  If there is a problem with the Directory Server
-   *                           configuration that prevents a critical component
-   *                           from being instantiated.
-   */
-  private void configureWorkflowsAuto() throws ConfigException
-  {
-    // Make sure that the network group config manager is finalized.
-    if (networkGroupConfigManager != null)
-    {
-      networkGroupConfigManager.finalizeNetworkGroups();
-      networkGroupConfigManager = null;
-    }
-
-    // First of all re-initialize the current workflow configuration
-    NetworkGroup.resetConfig();
-    WorkflowImpl.resetConfig();
-    directoryServer.workflowElements.clear();
-
-    // For each base DN in a backend create a workflow and register
-    // the workflow with the default network group
-    for (Backend<?> backend : getBackends().values())
-    {
-      for (DN baseDN: backend.getBaseDNs())
-      {
-        try
-        {
-          final WorkflowImpl workflowImpl = createWorkflow(baseDN, backend);
-          registerWorkflowWithInternalNetworkGroup(workflowImpl);
-          registerWorkflowWithAdminNetworkGroup(workflowImpl);
-          registerWorkflowWithDefaultNetworkGroup(workflowImpl);
-        }
-        catch (DirectoryException e)
-        {
-          throw new ConfigException(e.getMessageObject());
-        }
-      }
-    }
-
-    // We now need to complete the workflow creation for the
-    // config backend and rootDSE backend.
-    createAndRegisterRemainingWorkflows();
-  }
-
-
-  /**
    * Initializes the Directory Server group manager.
    *
    * @throws  ConfigException  If there is a configuration problem with any of
@@ -5612,7 +5356,7 @@
    * @return  The backend with the specified backend ID, or {@code null} if
    *          there is none.
    */
-  public static Backend getBackend(String backendID)
+  public static Backend<?> getBackend(String backendID)
   {
     return directoryServer.backends.get(backendID);
   }
@@ -5647,8 +5391,7 @@
    *                              conflicts with the backend ID of an existing
    *                              backend.
    */
-  public static void registerBackend(Backend<?> backend)
-         throws DirectoryException
+  public static void registerBackend(Backend<?> backend) throws DirectoryException
   {
     ifNull(backend);
 
@@ -5697,7 +5440,7 @@
    * @param  backend  The backend to deregister with the server.  It must not be
    *                  {@code null}.
    */
-  public static void deregisterBackend(Backend backend)
+  public static void deregisterBackend(Backend<?> backend)
   {
     ifNull(backend);
 
@@ -5709,14 +5452,8 @@
 
       directoryServer.backends = newBackends;
 
-      // Don't need anymore the local backend workflow element so we
-      // can remove it. We do remove the workflow element only when
-      // the workflow configuration mode is auto because in manual
-      // mode the config manager is doing the job.
-      if (workflowConfigurationModeIsAuto())
-      {
-        LocalBackendWorkflowElement.remove(backend.getBackendID());
-      }
+      // Don't need anymore the local backend workflow element so we can remove it
+      LocalBackendWorkflowElement.remove(backend.getBackendID());
 
 
       BackendMonitor monitor = backend.getBackendMonitor();
@@ -5785,7 +5522,7 @@
    * @return  The backend with the specified base DN, or {@code null} if there
    *          is no backend registered with the specified base DN.
    */
-  public static Backend getBackendWithBaseDN(DN baseDN)
+  public static Backend<?> getBackendWithBaseDN(DN baseDN)
   {
     return directoryServer.baseDnRegistry.getBaseDnMap().get(baseDN);
   }
@@ -5803,7 +5540,7 @@
    *          specified entry, or {@code null} if no appropriate backend is
    *          registered with the server.
    */
-  public static Backend getBackend(DN entryDN)
+  public static Backend<?> getBackend(DN entryDN)
   {
     if (entryDN.isRootDN())
     {
@@ -5811,7 +5548,7 @@
     }
 
     Map<DN,Backend> baseDNs = directoryServer.baseDnRegistry.getBaseDnMap();
-    Backend b = baseDNs.get(entryDN);
+    Backend<?> b = baseDNs.get(entryDN);
     while (b == null)
     {
       entryDN = entryDN.parent();
@@ -5857,8 +5594,7 @@
    * @throws  DirectoryException  If a problem occurs while attempting to
    *                              register the provided base DN.
    */
-  public static void registerBaseDN(DN baseDN, Backend backend,
-                                    boolean isPrivate)
+  public static void registerBaseDN(DN baseDN, Backend<?> backend, boolean isPrivate)
          throws DirectoryException
   {
     ifNull(baseDN, backend);
@@ -5878,20 +5614,14 @@
       }
 
       // When a new baseDN is registered with the server we have to create
-      // a new workflow to handle the base DN. We do not need to create
-      // the workflow in manual mode because in that case the workflows
-      // are created explicitly.
-      if (workflowConfigurationModeIsAuto()
-          && !baseDN.equals(DN.valueOf("cn=config")))
+      // a new workflow to handle the base DN.
+      if (!baseDN.equals(DN.valueOf("cn=config")))
       {
         // Now create a workflow for the registered baseDN and register
         // the workflow with the default network group, but don't register
         // the workflow if the backend happens to be the configuration
         // backend because it's too soon for the config backend.
-        WorkflowImpl workflowImpl = createWorkflow(baseDN, backend);
-        registerWorkflowWithInternalNetworkGroup(workflowImpl);
-        registerWorkflowWithAdminNetworkGroup(workflowImpl);
-        registerWorkflowWithDefaultNetworkGroup(workflowImpl);
+        createAndRegisterWorkflowWithDefaultNetworkGroup(baseDN, backend);
       }
     }
   }
@@ -5925,11 +5655,8 @@
         }
       }
 
-      // Now we need to deregister the workflow that was associated with
-      // the base DN but we can do it only when the workflow configuration
-      // mode is auto, because in manual mode the deregistration is done
-      // by the workflow config manager.
-      if (workflowConfigurationModeIsAuto())
+      // Now we need to deregister the workflow that was associated with the base DN
+      if (!baseDN.equals(DN.valueOf("cn=config")))
       {
         deregisterWorkflowWithAdminNetworkGroup(baseDN);
         deregisterWorkflowWithDefaultNetworkGroup(baseDN);
@@ -6050,22 +5777,17 @@
   public static Entry getEntry(DN entryDN)
          throws DirectoryException
   {
-    // If the entry is the root DSE, then get and return that.
     if (entryDN.isRootDN())
     {
       return directoryServer.rootDSEBackend.getRootDSE();
     }
 
-    // Figure out which backend should be used for the entry.  If it isn't
-    // appropriate for any backend, then return null.
-    Backend backend = getBackend(entryDN);
-    if (backend == null)
+    final Backend<?> backend = getBackend(entryDN);
+    if (backend != null)
     {
-      return null;
+      return backend.getEntry(entryDN);
     }
-
-    // Retrieve the requested entry from the backend.
-    return backend.getEntry(entryDN);
+    return null;
   }
 
 
@@ -6093,7 +5815,7 @@
 
     // Ask the appropriate backend if the entry exists.
     // If it is not appropriate for any backend, then return false.
-    Backend backend = getBackend(entryDN);
+    Backend<?> backend = getBackend(entryDN);
     return backend != null && backend.entryExists(entryDN);
   }
 
@@ -7109,7 +6831,7 @@
    * @param  backend  The backend in which the backup is to be performed.
    * @param  config   The configuration for the backup to be performed.
    */
-  public static void notifyBackupBeginning(Backend backend, BackupConfig config)
+  public static void notifyBackupBeginning(Backend<?> backend, BackupConfig config)
   {
     for (BackupTaskListener listener : directoryServer.backupTaskListeners)
     {
@@ -7134,8 +6856,7 @@
    * @param  config      The configuration for the backup that was performed.
    * @param  successful  Indicates whether the backup completed successfully.
    */
-  public static void notifyBackupEnded(Backend backend, BackupConfig config,
-                                       boolean successful)
+  public static void notifyBackupEnded(Backend<?> backend, BackupConfig config, boolean successful)
   {
     for (BackupTaskListener listener : directoryServer.backupTaskListeners)
     {
@@ -7185,8 +6906,7 @@
    * @param  backend  The backend in which the restore is to be performed.
    * @param  config   The configuration for the restore to be performed.
    */
-  public static void notifyRestoreBeginning(Backend backend,
-                                            RestoreConfig config)
+  public static void notifyRestoreBeginning(Backend<?> backend, RestoreConfig config)
   {
     for (RestoreTaskListener listener : directoryServer.restoreTaskListeners)
     {
@@ -7211,8 +6931,7 @@
    * @param  config      The configuration for the restore that was performed.
    * @param  successful  Indicates whether the restore completed successfully.
    */
-  public static void notifyRestoreEnded(Backend backend, RestoreConfig config,
-                                        boolean successful)
+  public static void notifyRestoreEnded(Backend<?> backend, RestoreConfig config, boolean successful)
   {
     for (RestoreTaskListener listener : directoryServer.restoreTaskListeners)
     {
@@ -7263,8 +6982,7 @@
    * @param  backend  The backend in which the export is to be performed.
    * @param  config   The configuration for the export to be performed.
    */
-  public static void notifyExportBeginning(Backend backend,
-                                           LDIFExportConfig config)
+  public static void notifyExportBeginning(Backend<?> backend, LDIFExportConfig config)
   {
     for (ExportTaskListener listener : directoryServer.exportTaskListeners)
     {
@@ -7289,8 +7007,7 @@
    * @param  config      The configuration for the export that was performed.
    * @param  successful  Indicates whether the export completed successfully.
    */
-  public static void notifyExportEnded(Backend backend, LDIFExportConfig config,
-                                       boolean successful)
+  public static void notifyExportEnded(Backend<?> backend, LDIFExportConfig config, boolean successful)
   {
     for (ExportTaskListener listener : directoryServer.exportTaskListeners)
     {
@@ -7341,8 +7058,7 @@
    * @param  backend  The backend in which the import is to be performed.
    * @param  config   The configuration for the import to be performed.
    */
-  public static void notifyImportBeginning(Backend backend,
-                                           LDIFImportConfig config)
+  public static void notifyImportBeginning(Backend<?> backend, LDIFImportConfig config)
   {
     for (ImportTaskListener listener : directoryServer.importTaskListeners)
     {
@@ -7367,8 +7083,7 @@
    * @param  config      The configuration for the import that was performed.
    * @param  successful  Indicates whether the import completed successfully.
    */
-  public static void notifyImportEnded(Backend backend, LDIFImportConfig config,
-                                       boolean successful)
+  public static void notifyImportEnded(Backend<?> backend, LDIFImportConfig config, boolean successful)
   {
     for (ImportTaskListener listener : directoryServer.importTaskListeners)
     {
@@ -7641,7 +7356,7 @@
 
 
     // Shut down the backends.
-    for (Backend backend : directoryServer.backends.values())
+    for (Backend<?> backend : directoryServer.backends.values())
     {
       try
       {
@@ -9080,99 +8795,7 @@
     return isRunningAsWindowsService;
   }
 
-
-  /**
-   * Specifies whether the workflows are configured automatically or manually.
-   * In auto configuration mode one workflow is created for each and every
-   * base DN in the local backends. In the auto configuration mode the
-   * workflows are created according to their description in the configuration
-   * file.
-   *
-   * @param  workflowConfigurationMode  Indicates whether the workflows are
-   *                                    configured automatically or manually
-   */
-  public static void setWorkflowConfigurationMode(
-      WorkflowConfigurationMode workflowConfigurationMode)
-  {
-    directoryServer.workflowConfigurationMode = workflowConfigurationMode;
-  }
-
-
-  /**
-   * Indicates whether the workflow configuration mode is 'auto' or not.
-   *
-   * @return the workflow configuration mode
-   */
-  private static boolean workflowConfigurationModeIsAuto()
-  {
-    return directoryServer.workflowConfigurationMode
-        == WorkflowConfigurationMode.AUTO;
-  }
-
-  /**
-   * Retrieves the workflow configuration mode.
-   *
-   * @return the workflow configuration mode
-   */
-  public static WorkflowConfigurationMode getWorkflowConfigurationMode()
-  {
-    return directoryServer.workflowConfigurationMode;
-  }
-
-  /**
-   * Return the WorkflowElement associated with a name.
-   *
-   * @param workflowElementID the name of the requested workflow element
-   * @return the associated workflow element or null
-   */
-  public static WorkflowElement getWorkflowElement(String workflowElementID) {
-    return directoryServer.workflowElements.get(workflowElementID);
-  }
-
-  /**
-   * Registers the provided workflow element from the Directory Server.
-   *
-   * @param  we  The workflow element to register. It must not be
-   *                  {@code null}.
-   * @throws  DirectoryException  If the workflow element ID for the
-   *              provided workflow element conflicts with the ID of
-   *              an existing workflow element.
-   */
-  public static void registerWorkflowElement(WorkflowElement we)
-    throws DirectoryException {
-    ifNull(we);
-
-    String workflowElementID = we.getWorkflowElementID();
-    ifNull(workflowElementID);
-
-    synchronized (directoryServer)
-    {
-      if (directoryServer.workflowElements.containsKey(workflowElementID)) {
-        ERR_REGISTER_WORKFLOW_ELEMENT_ALREADY_EXISTS.get(
-                workflowElementID);
-      } else {
-        directoryServer.workflowElements.put(workflowElementID, we);
-      }
-    }
-  }
-
-  /**
-   * Deregisters the provided workflow element from the Directory Server.
-   *
-   * @param  we  The workflow element to deregister. It must not be
-   *                  {@code null}.
-   */
-  public static void deregisterWorkflowElement(WorkflowElement we) {
-    ifNull(we);
-
-    String workflowElementID = we.getWorkflowElementID();
-    ifNull(workflowElementID);
-
-    synchronized (directoryServer)
-    {
-      directoryServer.workflowElements.remove(workflowElementID);
-    }
-  }
+  // TODO JNR remove error CoreMessages.ERR_REGISTER_WORKFLOW_ELEMENT_ALREADY_EXISTS
 
   /**
    * Print messages for start-ds "-F" option (full version information).
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/WorkflowConfigManager.java b/opendj3-server-dev/src/server/org/opends/server/core/WorkflowConfigManager.java
deleted file mode 100644
index 33b416e..0000000
--- a/opendj3-server-dev/src/server/org/opends/server/core/WorkflowConfigManager.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2007-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2014 ForgeRock AS
- */
-package org.opends.server.core;
-
-
-
-import static org.opends.messages.CoreMessages.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.server.ConfigurationAddListener;
-import org.opends.server.admin.server.ConfigurationChangeListener;
-import org.opends.server.admin.server.ConfigurationDeleteListener;
-import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.admin.std.server.RootCfg;
-import org.opends.server.admin.std.server.WorkflowCfg;
-import org.forgerock.opendj.config.server.ConfigException;
-import org.opends.server.core.networkgroups.NetworkGroup;
-import org.opends.server.types.ConfigChangeResult;
-import org.opends.server.types.DN;
-import org.opends.server.types.DirectoryException;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.opends.server.workflowelement.WorkflowElement;
-
-
-/**
- * This class defines a utility that will be used to manage the configuration
- * for the set of workflows defined in the Directory Server.  It will perform
- * the necessary initialization of those workflows when the server is first
- * started, and then will manage any changes to them while the server is
- * running.
- */
-public class WorkflowConfigManager
-       implements ConfigurationChangeListener<WorkflowCfg>,
-                  ConfigurationAddListener<WorkflowCfg>,
-                  ConfigurationDeleteListener<WorkflowCfg>
-
-{
-  /**
-   * A mapping between the DNs of the config entries and the associated
-   * workflows.
-   */
-  private final ConcurrentHashMap<DN, WorkflowImpl> workflows;
-
-  private final ServerContext serverContext;
-
-  /**
-   * Creates a new instance of this workflow config manager.
-   *
-   * @param serverContext
-   *            The server context.
-   */
-  public WorkflowConfigManager(ServerContext serverContext)
-  {
-    this.serverContext = serverContext;
-    workflows = new ConcurrentHashMap<DN, WorkflowImpl>();
-  }
-
-  /**
-   * Initializes all workflows currently defined in the Directory
-   * Server configuration.  This should only be called at Directory Server
-   * startup.
-   *
-   * @throws  ConfigException  If a configuration problem causes the workflow
-   *                           initialization process to fail.
-   */
-  public void initializeWorkflows()
-      throws ConfigException
-  {
-    // Get the root configuration object.
-    ServerManagementContext managementContext =
-         ServerManagementContext.getInstance();
-    RootCfg rootConfiguration =
-         managementContext.getRootConfiguration();
-
-
-    // Register as an add and delete listener with the root configuration so we
-    // can be notified if any workflow entries are added or removed.
-    rootConfiguration.addWorkflowAddListener(this);
-    rootConfiguration.addWorkflowDeleteListener(this);
-
-
-    //Initialize the existing workflows.
-    for (String workflowName : rootConfiguration.listWorkflows())
-    {
-      WorkflowCfg workflowConfiguration =
-        rootConfiguration.getWorkflow(workflowName);
-      workflowConfiguration.addChangeListener(this);
-
-      if (workflowConfiguration.isEnabled())
-      {
-        try
-        {
-          createAndRegisterWorkflow(workflowConfiguration);
-        }
-        catch (DirectoryException de)
-        {
-          throw new ConfigException(de.getMessageObject());
-        }
-      }
-    }
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public boolean isConfigurationAddAcceptable(
-      WorkflowCfg   configuration,
-      List<LocalizableMessage> unacceptableReasons)
-  {
-    // Nothing to check.
-    return true;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public ConfigChangeResult applyConfigurationAdd(
-      WorkflowCfg configuration)
-  {
-    ResultCode    resultCode          = ResultCode.SUCCESS;
-    boolean       adminActionRequired = false;
-    List<LocalizableMessage> messages            = new ArrayList<LocalizableMessage>();
-
-    configuration.addChangeListener(this);
-
-    // If the new network group is enabled then create it and register it.
-    if (configuration.isEnabled())
-    {
-      try
-      {
-        createAndRegisterWorkflow(configuration);
-      }
-      catch (DirectoryException de)
-      {
-        if (resultCode == ResultCode.SUCCESS)
-        {
-          resultCode = de.getResultCode();
-        }
-
-        messages.add(de.getMessageObject());
-      }
-    }
-
-    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public boolean isConfigurationDeleteAcceptable(
-      WorkflowCfg   configuration,
-      List<LocalizableMessage> unacceptableReasons)
-  {
-    boolean acceptable = true;
-    WorkflowImpl existingWorkflow = workflows.get(configuration.dn());
-    if (existingWorkflow != null)
-    {
-      // check whether we can delete the workflow
-      acceptable = checkReferenceCounter(
-        existingWorkflow, unacceptableReasons);
-    }
-
-    return acceptable;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public ConfigChangeResult applyConfigurationDelete(
-      WorkflowCfg configuration)
-  {
-    ResultCode    resultCode          = ResultCode.SUCCESS;
-    boolean       adminActionRequired = false;
-    List<LocalizableMessage> messages            = new ArrayList<LocalizableMessage>();
-
-    // check first whether we can remove the workflow
-    WorkflowImpl workflow = workflows.remove(configuration.dn());
-    if (workflow != null)
-    {
-      boolean acceptable = checkReferenceCounter(workflow, messages);
-      if (acceptable)
-      {
-        // The workflow is not used anymore, we can remove it
-        workflow.deregister();
-        workflow.finalizeWorkflow();
-
-        // Deregister the workflow with the internal network group
-        NetworkGroup.getInternalNetworkGroup().deregisterWorkflow(
-          workflow.getWorkflowId());
-
-        // Deregister the workflow with the admin network group
-        NetworkGroup.getAdminNetworkGroup().deregisterWorkflow(
-          workflow.getWorkflowId());
-      }
-      else
-      {
-        resultCode = ResultCode.UNWILLING_TO_PERFORM;
-      }
-    }
-
-    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public boolean isConfigurationChangeAcceptable(
-      WorkflowCfg   configuration,
-      List<LocalizableMessage> unacceptableReasons)
-  {
-    // Get the existing workflow if it's already enabled.
-    WorkflowImpl existingWorkflow = workflows.get(configuration.dn());
-
-    // Is this a request to disable the workflow?
-    boolean acceptable = true;
-    if (! configuration.isEnabled() && (existingWorkflow != null))
-    {
-      // check whether we can disable the workflow
-      acceptable = checkReferenceCounter(
-        existingWorkflow, unacceptableReasons);
-    }
-
-    return acceptable;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public ConfigChangeResult applyConfigurationChange(
-      WorkflowCfg configuration)
-  {
-    ResultCode    resultCode          = ResultCode.SUCCESS;
-    boolean       adminActionRequired = false;
-    List<LocalizableMessage> messages            = new ArrayList<LocalizableMessage>();
-
-    // Get the existing workflow if it's already enabled.
-    WorkflowImpl existingWorkflow = workflows.get(configuration.dn());
-
-    // If the new configuration has the workflow disabled, then disable it if
-    // it is enabled, or do nothing if it's already disabled.
-    if (! configuration.isEnabled())
-    {
-      if (existingWorkflow != null)
-      {
-        // check whether we can disable the workflow
-        boolean acceptable = checkReferenceCounter(existingWorkflow, messages);
-        if (acceptable)
-        {
-          // The workflow is not used anymore, we can remove it
-          workflows.remove(configuration.dn());
-          existingWorkflow.deregister();
-          existingWorkflow.finalizeWorkflow();
-
-          // Deregister the workflow with the internal network group
-          NetworkGroup.getInternalNetworkGroup().deregisterWorkflow(
-            existingWorkflow.getWorkflowId());
-
-          // Deregister the workflow with the admin network group
-          NetworkGroup.getAdminNetworkGroup().deregisterWorkflow(
-            existingWorkflow.getWorkflowId());
-        }
-        else
-        {
-          resultCode = ResultCode.UNWILLING_TO_PERFORM;
-        }
-      }
-
-      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
-    }
-
-    // If the workflow is disabled then create and register it.
-    if (existingWorkflow == null)
-    {
-      try
-      {
-        createAndRegisterWorkflow(configuration);
-      }
-      catch (DirectoryException de)
-      {
-        if (resultCode == ResultCode.SUCCESS)
-        {
-          resultCode = de.getResultCode();
-        }
-
-        messages.add(de.getMessageObject());
-      }
-    }
-    else
-    {
-      // The workflow already exist, just notify the changes to the workflow
-      existingWorkflow.updateConfig(configuration);
-    }
-
-    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
-  }
-
-
-  /**
-   * Creates a workflow, registers the workflow with the server
-   * and registers the workflow with the default network group.
-   *
-   * @param workflowCfg  the workflow configuration
-   *
-   * @throws DirectoryException If a problem occurs while trying to
-   *                            decode a provided string as a DN or if
-   *                            the workflow ID for a provided workflow
-   *                            conflicts with the workflow ID of an existing
-   *                            workflow during workflow registration.
-   */
-  private void createAndRegisterWorkflow(
-      WorkflowCfg workflowCfg
-      ) throws DirectoryException
-  {
-    // The ID of the workflow to create
-    String workflowId =
-        workflowCfg.dn().rdn().getAttributeValue(0).toString();
-
-    // Create the root workflow element to associate with the workflow
-    String rootWorkflowElementID = workflowCfg.getWorkflowElement();
-    WorkflowElement<?> rootWorkflowElement =
-      DirectoryServer.getWorkflowElement(rootWorkflowElementID);
-
-    // Get the base DN targeted by the workflow
-    DN baseDN = workflowCfg.getBaseDN();
-
-    // Create the workflow and register it with the server
-    WorkflowImpl workflowImpl =
-      new WorkflowImpl(
-        workflowId, baseDN, rootWorkflowElementID, rootWorkflowElement);
-    workflows.put(workflowCfg.dn(), workflowImpl);
-    workflowImpl.register();
-
-    // Register the workflow with the internal network group
-    NetworkGroup.getInternalNetworkGroup().registerWorkflow(workflowImpl);
-
-    // Register the workflow with the admin network group
-    NetworkGroup.getAdminNetworkGroup().registerWorkflow(workflowImpl);
-  }
-
-
-  /**
-   * Checks whether a workflow is no more used so that we can delete
-   * or disable it.
-   *
-   * @param workflow  the workflow to check
-   * @param messages  a list of reasons that prevent the workflow to be
-   *                  deleted or disabled
-   * @return <code>true</code> when the workflow can be deleted or disabled
-   */
-  private boolean checkReferenceCounter(
-      WorkflowImpl  workflow,
-      List<LocalizableMessage> messages
-      )
-  {
-    boolean acceptable = true;
-
-    int refCounter = workflow.getReferenceCounter();
-    if (refCounter != 0)
-    {
-      LocalizableMessage message = INFO_ERR_WORKFLOW_IN_USE.get(
-        workflow.getWorkflowId(), workflow.getReferenceCounter());
-      messages.add(message);
-      acceptable = false;
-    }
-
-    return acceptable;
-  }
-
-}
-
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/WorkflowImpl.java b/opendj3-server-dev/src/server/org/opends/server/core/WorkflowImpl.java
index a9c718d..9ed429e 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/WorkflowImpl.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/WorkflowImpl.java
@@ -26,21 +26,22 @@
  */
 package org.opends.server.core;
 
-import static org.opends.messages.CoreMessages.*;
-import static org.forgerock.util.Reject.ifNull;
-
 import java.util.Collection;
 import java.util.Observable;
 import java.util.Observer;
 import java.util.TreeMap;
 
 import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.opends.server.admin.std.server.WorkflowCfg;
-import org.opends.server.types.*;
 import org.forgerock.opendj.ldap.ResultCode;
-import org.opends.server.workflowelement.WorkflowElement;
+import org.opends.server.types.CanceledOperationException;
+import org.opends.server.types.DN;
+import org.opends.server.types.DirectoryException;
+import org.opends.server.types.Operation;
 import org.opends.server.workflowelement.ObservableWorkflowElementState;
+import org.opends.server.workflowelement.WorkflowElement;
 
+import static org.forgerock.util.Reject.*;
+import static org.opends.messages.CoreMessages.*;
 
 /**
  * This class implements the workflow interface. Each task in the workflow
@@ -57,7 +58,7 @@
   private final String workflowID;
 
   // The root of the workflow task tree.
-  private WorkflowElement<?> rootWorkflowElement = null;
+  private WorkflowElement rootWorkflowElement = null;
 
   // The root workflow element identifier.
   private String rootWorkflowElementID = null;
@@ -108,7 +109,7 @@
       String             workflowId,
       DN                 baseDN,
       String             rootWorkflowElementID,
-      WorkflowElement<?> rootWorkflowElement
+      WorkflowElement rootWorkflowElement
       )
   {
     this.workflowID = workflowId;
@@ -151,6 +152,7 @@
    *
    * @return the workflow base DN
    */
+  @Override
   public DN getBaseDN()
   {
     return baseDN;
@@ -190,6 +192,7 @@
    * @throws CanceledOperationException if this operation should
    * be canceled.
    */
+  @Override
   public void execute(Operation operation)
     throws CanceledOperationException
   {
@@ -247,7 +250,7 @@
 
     // Deregister the workflow with the list of objects to notify when
     // a workflow element is created or deleted.
-    WorkflowElement.deregistereForStateUpdate(
+    WorkflowElement.deregisterForStateUpdate(
       null, rootWorkflowElementID, this);
 
     // Deregister the workflow with the list of registered workflows.
@@ -331,71 +334,15 @@
    *
    * @return the root workflow element.
    */
-  WorkflowElement<?> getRootWorkflowElement()
+  WorkflowElement getRootWorkflowElement()
   {
     return rootWorkflowElement;
   }
 
-
-  /**
-   * Resets all the registered workflows.
-   */
-  public static void resetConfig()
-  {
-    synchronized (registeredWorkflowsLock)
-    {
-      registeredWorkflows = new TreeMap<String, Workflow>();
-    }
-  }
-
-
-  /**
-   * Updates the workflow configuration. This method should be invoked
-   * whenever an existing workflow is modified.
-   *
-   * @param configuration  the new workflow configuration
-   */
-  public void updateConfig(WorkflowCfg configuration)
-  {
-    // The only parameter that can be changed is the root workflow element.
-    String rootWorkflowElementID = configuration.getWorkflowElement();
-    WorkflowElement<?> rootWorkflowElement =
-      DirectoryServer.getWorkflowElement(rootWorkflowElementID);
-
-    // Update the ID of the new root workflow element
-    // and deregister the workflow with the list of objects to notify
-    // when the former root workflow element is created
-    String previousRootWorkflowElement = this.rootWorkflowElementID;
-    WorkflowElement.deregistereForStateUpdate(
-      null, previousRootWorkflowElement, this);
-    this.rootWorkflowElementID = rootWorkflowElementID;
-
-    // Does the new root workflow element exist?
-    if (rootWorkflowElement == null)
-    {
-      // The new root workflow element does not exist yet then do nothing
-      // but register with the list of object to notify when the workflow
-      // element is created (and deregister first in case the workflow
-      // was already registered)
-      WorkflowElement.registereForStateUpdate(
-        null, rootWorkflowElementID, this);
-      rootWorkflowElement = null;
-    }
-    else
-    {
-      // The new root workflow element exists, let's use it and don't forget
-      // to register with the list of objects to notify when the workflow
-      // element is deleted.
-      this.rootWorkflowElement = rootWorkflowElement;
-      WorkflowElement.registereForStateUpdate(
-        rootWorkflowElement, null, this);
-    }
-  }
-
-
   /**
    * {@inheritDoc}
    */
+  @Override
   public void update(Observable observable, Object arg)
   {
     if (observable instanceof ObservableWorkflowElementState)
@@ -411,10 +358,10 @@
    * Display the workflow object.
    * @return a string identifying the workflow.
    */
+  @Override
   public String toString()
   {
-    String id = "Workflow " + workflowID;
-    return id;
+    return "Workflow " + workflowID;
   }
 
 
@@ -440,36 +387,19 @@
   {
     // Check that the workflow element maps the root workflow element.
     // If not then ignore the workflow element.
-    WorkflowElement<?> we = weState.getObservedWorkflowElement();
+    WorkflowElement we = weState.getObservedWorkflowElement();
     String newWorkflowElementID = we.getWorkflowElementID();
     if (! rootWorkflowElementID.equalsIgnoreCase(newWorkflowElementID))
     {
       return;
     }
 
-    // The workflow element maps the root workflow element, let's process it.
-    if (weState.workflowElementIsEnabled())
-    {
-      // The root workflow element is enabled, let's use it
-      // and don't forget to register the workflow with the list
-      // of objects to notify when the root workflow element
-      // is disabled...
-      rootWorkflowElement = weState.getObservedWorkflowElement();
-      WorkflowElement.registereForStateUpdate(
-        rootWorkflowElement, null, this);
-      WorkflowElement.deregistereForStateUpdate(
-        null, rootWorkflowElementID, this);
-    }
-    else
-    {
-      // The root workflow element has been disabled. Reset the current
-      // reference to the root workflow element and register the workflow
-      // with the list of objects to notify when new workflow elements
-      // are created.
-      WorkflowElement.registereForStateUpdate(
-        null, rootWorkflowElement.getWorkflowElementID(), this);
-      rootWorkflowElement = null;
-    }
+    // The workflow element maps the root workflow element
+    // don't forget to register the workflow with the list of objects to notify
+    // when the root workflow element is disabled...
+    rootWorkflowElement = weState.getObservedWorkflowElement();
+    WorkflowElement.registereForStateUpdate(rootWorkflowElement, null, this);
+    WorkflowElement.deregisterForStateUpdate(null, rootWorkflowElementID, this);
   }
 
 
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/WorkflowTopologyNode.java b/opendj3-server-dev/src/server/org/opends/server/core/WorkflowTopologyNode.java
index 7a3d420..1722481 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/WorkflowTopologyNode.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/WorkflowTopologyNode.java
@@ -33,7 +33,6 @@
 import org.opends.server.types.DN;
 import org.opends.server.types.Operation;
 import org.opends.server.types.OperationType;
-import org.opends.server.workflowelement.WorkflowElement;
 
 /**
  * This class implements a workflow node. A workflow node is used
@@ -72,16 +71,8 @@
    * elements are not used.
    *
    * @param workflowImpl          the real processing attached to the node
-   * @param preWorkflowElements   the list of tasks to be executed before
-   *                              the real processing
-   * @param postWorkflowElements  the list of tasks to be executed after
-   *                              the real processing
    */
-  public WorkflowTopologyNode(
-      WorkflowImpl workflowImpl,
-      WorkflowElement<?>[] preWorkflowElements,
-      WorkflowElement<?>[] postWorkflowElements
-      )
+  public WorkflowTopologyNode(WorkflowImpl workflowImpl)
   {
     super(workflowImpl);
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroup.java b/opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
index bf05f4f..2a8c5e9 100644
--- a/opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
+++ b/opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
@@ -29,12 +29,9 @@
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
-import java.util.SortedSet;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -63,7 +60,6 @@
 import org.opends.server.types.DirectoryException;
 import org.opends.server.types.InitializationException;
 import org.opends.server.types.operation.PreParseOperation;
-import org.opends.server.workflowelement.WorkflowElement;
 
 import static org.forgerock.util.Reject.*;
 import static org.opends.messages.ConfigMessages.*;
@@ -103,39 +99,6 @@
       // Update the priority.
       setNetworkGroupPriority(configuration.getPriority());
 
-      // Deregister any workflows that have been removed.
-      SortedSet<String> configWorkflows = configuration.getWorkflow();
-      for (String id : getRegisteredWorkflows())
-      {
-        if (!configWorkflows.contains(id))
-        {
-          deregisterWorkflow(id);
-        }
-      }
-
-      // Register any workflows that have been added.
-      List<String> ngWorkflows = getRegisteredWorkflows();
-      for (String id : configuration.getWorkflow())
-      {
-        if (!ngWorkflows.contains(id))
-        {
-          WorkflowImpl workflowImpl =
-              (WorkflowImpl) WorkflowImpl.getWorkflow(id);
-          try
-          {
-            registerWorkflow(workflowImpl);
-          }
-          catch (DirectoryException e)
-          {
-            if (resultCode == ResultCode.SUCCESS)
-            {
-              resultCode = e.getResultCode();
-            }
-            messages.add(e.getMessageObject());
-          }
-        }
-      }
-
       try
       {
         criteria = decodeConnectionCriteriaConfiguration(configuration);
@@ -149,8 +112,7 @@
       // Update the configuration.
       NetworkGroup.this.configuration = configuration;
 
-      return new ConfigChangeResult(resultCode, adminActionRequired,
-          messages);
+      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
     }
 
 
@@ -439,26 +401,6 @@
 
 
   /**
-   * Resets the configuration of all the registered network groups.
-   */
-  public static void resetConfig()
-  {
-    // Reset the default network group
-    defaultNetworkGroup.reset();
-    adminNetworkGroup.reset();
-    internalNetworkGroup.reset();
-
-    // Reset all the registered network group
-    synchronized (registeredNetworkGroupsLock)
-    {
-      registeredNetworkGroups = new TreeMap<String, NetworkGroup>();
-      orderedNetworkGroups = new ArrayList<NetworkGroup>();
-    }
-  }
-
-
-
-  /**
    * Initializes this network group as a user network group using the
    * provided configuration. The network group will monitor the
    * configuration and update its configuration when necessary.
@@ -504,24 +446,7 @@
           (WorkflowImpl) WorkflowImpl.getWorkflow("__root.dse__#");
       networkGroup.registerWorkflow(rootDSEworkflow);
 
-      // Register the workflows with the network group.
-      for (String workflowID : configuration.getWorkflow())
-      {
-        WorkflowImpl workflowImpl =
-            (WorkflowImpl) WorkflowImpl.getWorkflow(workflowID);
-
-        if (workflowImpl == null)
-        {
-          // The workflow does not exist, log an error message
-          // and skip the workflow.
-          logger.debug(INFO_ERR_WORKFLOW_DOES_NOT_EXIST, workflowID,
-                  networkGroup.getID());
-        }
-        else
-        {
-          networkGroup.registerWorkflow(workflowImpl);
-        }
-      }
+      // TODO JNR remove CoreMessages.INFO_ERR_WORKFLOW_DOES_NOT_EXIST
 
       // Register all configuration change listeners.
       configuration.addChangeListener(networkGroup.changeListener);
@@ -580,28 +505,6 @@
     // different base DN.
     boolean isAcceptable = true;
 
-    Set<String> allBaseDNs = new HashSet<String>();
-    for (String workflowId : configuration.getWorkflow())
-    {
-      WorkflowImpl workflow =
-          (WorkflowImpl) WorkflowImpl.getWorkflow(workflowId);
-      String baseDN = workflow.getBaseDN().toNormalizedString();
-      if (allBaseDNs.contains(baseDN))
-      {
-        // This baseDN is duplicated
-        LocalizableMessage message =
-            ERR_WORKFLOW_BASE_DN_DUPLICATED_IN_NG.get(baseDN,
-                getNameFromConfiguration(configuration));
-        unacceptableReasons.add(message);
-        isAcceptable = false;
-        break;
-      }
-      else
-      {
-        allBaseDNs.add(baseDN);
-      }
-    }
-
     // Validate any policy configurations.
     for (String policyName : configuration
         .listNetworkGroupQOSPolicies())
@@ -757,9 +660,7 @@
   private ConnectionCriteria criteria = ConnectionCriteria.TRUE;
 
   private final boolean isAdminNetworkGroup;
-
   private final boolean isDefaultNetworkGroup;
-
   private final boolean isInternalNetworkGroup;
 
   // List of naming contexts handled by the network group.
@@ -935,8 +836,7 @@
       // deregister a workflow node
       synchronized (registeredWorkflowNodesLock)
       {
-        for (WorkflowTopologyNode node : registeredWorkflowNodes
-            .values())
+        for (WorkflowTopologyNode node : registeredWorkflowNodes.values())
         {
           DN curDN = node.getBaseDN();
           if (curDN.equals(baseDN))
@@ -957,8 +857,7 @@
 
     // Now that the workflow node has been deregistered with the network
     // group, update the reference counter of the workflow.
-    if ((workflow != null) && !isAdminNetworkGroup
-        && !isInternalNetworkGroup && !isDefaultNetworkGroup)
+    if (workflow != null && !isAdminNetworkGroup && !isInternalNetworkGroup && !isDefaultNetworkGroup)
     {
       WorkflowImpl workflowImpl = (WorkflowImpl) workflow;
       workflowImpl.decrementReferenceCounter();
@@ -999,8 +898,7 @@
       // deregister a workflow node
       synchronized (registeredWorkflowNodesLock)
       {
-        for (WorkflowTopologyNode node : registeredWorkflowNodes
-            .values())
+        for (WorkflowTopologyNode node : registeredWorkflowNodes.values())
         {
           String curID = node.getWorkflowImpl().getWorkflowId();
           if (curID.equals(workflowID))
@@ -1236,24 +1134,6 @@
 
 
   /**
-   * Registers a workflow with the network group.
-   *
-   * @param workflow
-   *          the workflow to register
-   * @throws DirectoryException
-   *           If the workflow ID for the provided workflow conflicts
-   *           with the workflow ID of an existing workflow.
-   */
-  public void registerWorkflow(WorkflowImpl workflow)
-      throws DirectoryException
-  {
-    // The workflow is registered with no pre/post workflow element.
-    registerWorkflow(workflow, null, null);
-  }
-
-
-
-  /**
    * Removes a connection from the group.
    *
    * @param connection
@@ -1424,18 +1304,10 @@
     String workflowID = workflowNode.getWorkflowImpl().getWorkflowId();
     ifNull(workflowID);
 
-    // If the network group is the "internal" network group then bypass
-    // the check because the internal network group may contain
+    // If the network group is the "internal" or the "admin" network group
+    // then bypass the check because the internal network group may contain
     // duplicates of base DNs.
-    if (isInternalNetworkGroup)
-    {
-      return;
-    }
-
-    // If the network group is the "admin" network group then bypass
-    // the check because the internal network group may contain
-    // duplicates of base DNs.
-    if (isAdminNetworkGroup)
+    if (isInternalNetworkGroup || isAdminNetworkGroup)
     {
       return;
     }
@@ -1545,8 +1417,7 @@
     else
     {
       // Deregister the workflow with the network group.
-      WorkflowTopologyNode workflowNode =
-          (WorkflowTopologyNode) workflow;
+      WorkflowTopologyNode workflowNode = (WorkflowTopologyNode) workflow;
       deregisterWorkflowNode(workflowNode);
       deregistered = true;
 
@@ -1574,10 +1445,8 @@
     synchronized (registeredWorkflowNodesLock)
     {
       TreeMap<String, WorkflowTopologyNode> newWorkflowNodes =
-          new TreeMap<String, WorkflowTopologyNode>(
-              registeredWorkflowNodes);
-      newWorkflowNodes.remove(workflowNode.getWorkflowImpl()
-          .getWorkflowId());
+          new TreeMap<String, WorkflowTopologyNode>(registeredWorkflowNodes);
+      newWorkflowNodes.remove(workflowNode.getWorkflowImpl().getWorkflowId());
       registeredWorkflowNodes = newWorkflowNodes;
     }
   }
@@ -1585,26 +1454,6 @@
 
 
   /**
-   * Retrieves the list of registered workflows.
-   *
-   * @return a list of workflow ids
-   */
-  private List<String> getRegisteredWorkflows()
-  {
-    List<String> workflowIDs = new ArrayList<String>();
-    synchronized (registeredWorkflowNodesLock)
-    {
-      for (WorkflowTopologyNode node : registeredWorkflowNodes.values())
-      {
-        workflowIDs.add(node.getWorkflowImpl().getWorkflowId());
-      }
-    }
-    return workflowIDs;
-  }
-
-
-
-  /**
    * We've seen parts of the server hold references to a NetworkGroup
    * during an in-core server restart. To help detect when this happens,
    * we null out the member variables, so we will fail fast with an NPE
@@ -1682,8 +1531,7 @@
     namingContexts.resetLists();
 
     // a registered workflow with no parent is a naming context
-    for (WorkflowTopologyNode workflowNode : registeredWorkflowNodes
-        .values())
+    for (WorkflowTopologyNode workflowNode : registeredWorkflowNodes.values())
     {
       WorkflowTopologyNode parent = workflowNode.getParent();
       if (parent == null)
@@ -1696,25 +1544,17 @@
 
 
   /**
-   * Registers a workflow with the network group and the workflow may
-   * have pre and post workflow element.
+   * Registers a workflow with the network group.
    *
    * @param workflow
    *          the workflow to register
-   * @param preWorkflowElements
-   *          the tasks to execute before the workflow
-   * @param postWorkflowElements
-   *          the tasks to execute after the workflow
    * @throws DirectoryException
    *           If the workflow ID for the provided workflow conflicts
    *           with the workflow ID of an existing workflow or if the
    *           base DN of the workflow is the same than the base DN of
    *           another workflow already registered
    */
-  private void registerWorkflow(WorkflowImpl workflow,
-      WorkflowElement<?>[] preWorkflowElements,
-      WorkflowElement<?>[] postWorkflowElements)
-      throws DirectoryException
+  public void registerWorkflow(WorkflowImpl workflow) throws DirectoryException
   {
     // Is it the rootDSE workflow?
     DN baseDN = workflow.getBaseDN();
@@ -1729,9 +1569,7 @@
     {
       // This workflow is not the rootDSE workflow. Try to insert it in
       // the workflow topology.
-      WorkflowTopologyNode workflowNode =
-          new WorkflowTopologyNode(workflow, preWorkflowElements,
-              postWorkflowElements);
+      WorkflowTopologyNode workflowNode = new WorkflowTopologyNode(workflow);
 
       // Register the workflow node with the network group. If the
       // workflow ID is already existing then an exception is raised.
@@ -1741,16 +1579,11 @@
       for (WorkflowTopologyNode curNode : registeredWorkflowNodes
           .values())
       {
-        // Try to insert the new workflow under an existing workflow...
-        if (curNode.insertSubordinate(workflowNode))
-        {
-          // new workflow has been inserted in the topology
-          continue;
-        }
-
-        // ... or try to insert the existing workflow below the new
-        // workflow
-        if (workflowNode.insertSubordinate(curNode))
+        if (
+            // Try to insert the new workflow under an existing workflow...
+            curNode.insertSubordinate(workflowNode)
+            // ... or try to insert the existing workflow below the new workflow
+            || workflowNode.insertSubordinate(curNode))
         {
           // new workflow has been inserted in the topology
           continue;
@@ -1815,19 +1648,4 @@
     }
   }
 
-
-
-  /**
-   * Resets the configuration of the current network group.
-   */
-  private void reset()
-  {
-    synchronized (registeredWorkflowNodesLock)
-    {
-      registeredWorkflowNodes =
-          new TreeMap<String, WorkflowTopologyNode>();
-      rootDSEWorkflowNode = null;
-      namingContexts = new NetworkGroupNamingContexts();
-    }
-  }
 }
diff --git a/opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroupConfigManager.java b/opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroupConfigManager.java
deleted file mode 100644
index 394790b..0000000
--- a/opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroupConfigManager.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2008-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2014 ForgeRock AS
- */
-package org.opends.server.core.networkgroups;
-
-import static org.opends.messages.ConfigMessages.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.admin.server.ConfigurationAddListener;
-import org.opends.server.admin.server.ConfigurationChangeListener;
-import org.opends.server.admin.server.ConfigurationDeleteListener;
-import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.admin.std.server.NetworkGroupCfg;
-import org.opends.server.admin.std.server.RootCfg;
-import org.forgerock.opendj.config.server.ConfigException;
-import org.opends.server.core.DirectoryServer;
-import org.opends.server.core.ServerContext;
-import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.forgerock.util.Utils;
-import org.opends.server.types.ConfigChangeResult;
-import org.opends.server.types.DN;
-import org.opends.server.types.InitializationException;
-import org.forgerock.opendj.ldap.ResultCode;
-
-/**
- * This class defines a utility that will be used to manage the
- * configuration for the set of network groups defined in the Directory
- * Server. It will perform the necessary initialization of those network
- * groups when the server is first started, and then will manage any
- * changes to them while the server is running.
- */
-public class NetworkGroupConfigManager implements
-    ConfigurationChangeListener<NetworkGroupCfg>,
-    ConfigurationAddListener<NetworkGroupCfg>,
-    ConfigurationDeleteListener<NetworkGroupCfg>
-
-{
-  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
-
-  /**
-   * A mapping between the DNs of the config entries and the associated
-   * network groups.
-   */
-  private final ConcurrentHashMap<DN, NetworkGroup> networkGroups;
-
-  private final ServerContext serverContext;
-
-  /**
-   * Creates a new instance of this network group config manager.
-   *
-   * @param serverContext
-   *            The server context.
-   */
-  public NetworkGroupConfigManager(ServerContext serverContext)
-  {
-    this.serverContext = serverContext;
-    networkGroups = new ConcurrentHashMap<DN, NetworkGroup>();
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  public ConfigChangeResult applyConfigurationAdd(
-      NetworkGroupCfg configuration)
-  {
-    ResultCode resultCode = ResultCode.SUCCESS;
-    boolean adminActionRequired = false;
-    List<LocalizableMessage> messages = new ArrayList<LocalizableMessage>();
-
-    // Register to be notified of changes to the new network group.
-    configuration.addChangeListener(this);
-
-    // If the new network group is enabled then create it and register
-    // it.
-    if (configuration.isEnabled())
-    {
-      try
-      {
-        NetworkGroup networkGroup =
-            NetworkGroup.createUserNetworkGroup(configuration);
-        networkGroups.put(configuration.dn(), networkGroup);
-      }
-      catch (InitializationException e)
-      {
-        logger.traceException(e);
-
-        messages.add(e.getMessageObject());
-        resultCode = DirectoryServer.getServerErrorResultCode();
-      }
-      catch (ConfigException e)
-      {
-        logger.traceException(e);
-
-        messages.add(e.getMessageObject());
-        resultCode = DirectoryServer.getServerErrorResultCode();
-      }
-    }
-
-    return new ConfigChangeResult(resultCode, adminActionRequired,
-        messages);
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public ConfigChangeResult applyConfigurationChange(
-      NetworkGroupCfg configuration)
-  {
-    ResultCode resultCode = ResultCode.SUCCESS;
-    boolean adminActionRequired = false;
-    List<LocalizableMessage> messages = new ArrayList<LocalizableMessage>();
-
-    // Enable / disable the network group as required.
-    NetworkGroup networkGroup = networkGroups.get(configuration.dn());
-
-    if (networkGroup != null && !configuration.isEnabled())
-    {
-      // The network group has been disabled.
-      networkGroups.remove(configuration.dn());
-      networkGroup.finalizeNetworkGroup();
-    }
-    else if (networkGroup == null && configuration.isEnabled())
-    {
-      // The network group has been enabled.
-      try
-      {
-        networkGroup =
-            NetworkGroup.createUserNetworkGroup(configuration);
-        networkGroups.put(configuration.dn(), networkGroup);
-      }
-      catch (InitializationException e)
-      {
-        logger.traceException(e);
-
-        messages.add(e.getMessageObject());
-        resultCode = DirectoryServer.getServerErrorResultCode();
-      }
-      catch (ConfigException e)
-      {
-        logger.traceException(e);
-
-        messages.add(e.getMessageObject());
-        resultCode = DirectoryServer.getServerErrorResultCode();
-      }
-    }
-
-    return new ConfigChangeResult(resultCode, adminActionRequired,
-        messages);
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public ConfigChangeResult applyConfigurationDelete(
-      NetworkGroupCfg configuration)
-  {
-    ResultCode resultCode = ResultCode.SUCCESS;
-    boolean adminActionRequired = false;
-    List<LocalizableMessage> messages = new ArrayList<LocalizableMessage>();
-
-    NetworkGroup networkGroup =
-        networkGroups.remove(configuration.dn());
-    if (networkGroup != null)
-    {
-      networkGroup.finalizeNetworkGroup();
-    }
-
-    return new ConfigChangeResult(resultCode, adminActionRequired,
-        messages);
-  }
-
-
-
-  /**
-   * Finalizes all network groups currently defined in the Directory
-   * Server configuration. This should only be called at Directory
-   * Server shutdown.
-   */
-  public void finalizeNetworkGroups()
-  {
-    // Get the root configuration object.
-    ServerManagementContext managementContext =
-        ServerManagementContext.getInstance();
-    RootCfg rootConfiguration =
-        managementContext.getRootConfiguration();
-
-    // Remove add / delete listeners.
-    rootConfiguration.removeNetworkGroupAddListener(this);
-    rootConfiguration.removeNetworkGroupDeleteListener(this);
-
-    // Finalize the existing network groups.
-    for (NetworkGroup networkGroup : networkGroups.values())
-    {
-      networkGroup.finalizeNetworkGroup();
-    }
-
-    // Clean up remaining state so that it is possible to reinitialize.
-    networkGroups.clear();
-  }
-
-
-
-  /**
-   * Initializes all network groups currently defined in the Directory
-   * Server configuration. This should only be called at Directory
-   * Server startup.
-   *
-   * @throws ConfigException
-   *           If a critical configuration problem prevents the network
-   *           group initialization from succeeding.
-   * @throws InitializationException
-   *           If a problem occurs while initializing the network groups
-   *           that is not related to the server configuration.
-   */
-  public void initializeNetworkGroups() throws ConfigException,
-      InitializationException
-  {
-    // Get the root configuration object.
-    ServerManagementContext managementContext =
-        ServerManagementContext.getInstance();
-    RootCfg rootConfiguration =
-        managementContext.getRootConfiguration();
-
-    // Register as an add and delete listener with the root
-    // configuration so we can be notified if any network group entries
-    // are added or removed.
-    rootConfiguration.addNetworkGroupAddListener(this);
-    rootConfiguration.addNetworkGroupDeleteListener(this);
-
-    // Initialize the existing network groups.
-    for (String networkGroupName : rootConfiguration
-        .listNetworkGroups())
-    {
-      NetworkGroupCfg configuration =
-          rootConfiguration.getNetworkGroup(networkGroupName);
-      configuration.addChangeListener(this);
-
-      List<LocalizableMessage> unacceptableReasons = new ArrayList<LocalizableMessage>();
-      if (!NetworkGroup.isConfigurationAcceptable(configuration,
-          unacceptableReasons))
-      {
-        throw new InitializationException(ERR_CONFIG_NETWORK_GROUP_CONFIG_NOT_ACCEPTABLE.get(
-            configuration.dn(), Utils.joinAsString(". ", unacceptableReasons)));
-      }
-
-      if (configuration.isEnabled())
-      {
-        NetworkGroup networkGroup =
-            NetworkGroup.createUserNetworkGroup(configuration);
-        networkGroups.put(configuration.dn(), networkGroup);
-      }
-    }
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public boolean isConfigurationAddAcceptable(
-      NetworkGroupCfg configuration, List<LocalizableMessage> unacceptableReasons)
-  {
-    return NetworkGroup.isConfigurationAcceptable(configuration,
-        unacceptableReasons);
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public boolean isConfigurationChangeAcceptable(
-      NetworkGroupCfg configuration, List<LocalizableMessage> unacceptableReasons)
-  {
-    return NetworkGroup.isConfigurationAcceptable(configuration,
-        unacceptableReasons);
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public boolean isConfigurationDeleteAcceptable(
-      NetworkGroupCfg configuration, List<LocalizableMessage> unacceptableReasons)
-  {
-    // Always ok.
-    return true;
-  }
-
-}
diff --git a/opendj3-server-dev/src/server/org/opends/server/workflowelement/ObservableWorkflowElementState.java b/opendj3-server-dev/src/server/org/opends/server/workflowelement/ObservableWorkflowElementState.java
index 1da432c..aa9114f 100644
--- a/opendj3-server-dev/src/server/org/opends/server/workflowelement/ObservableWorkflowElementState.java
+++ b/opendj3-server-dev/src/server/org/opends/server/workflowelement/ObservableWorkflowElementState.java
@@ -36,12 +36,7 @@
  */
 public class ObservableWorkflowElementState extends Observable
 {
-  // The "enabled" state of the observed workflow element.
-  // By default, a workflow element is enabled (otherwise this
-  // instance of workflow element state would not exist).
-  private boolean enabled = true;
-  private final WorkflowElement<?> observedWorkflowElement;
-
+  private final WorkflowElement observedWorkflowElement;
 
   /**
    * Creates an instance of an observable object for a given workflow
@@ -50,45 +45,17 @@
    * @param  observedWorkflowElement
    *         The workflow element to observe.
    */
-  ObservableWorkflowElementState(WorkflowElement<?> observedWorkflowElement)
+  ObservableWorkflowElementState(WorkflowElement observedWorkflowElement)
   {
     this.observedWorkflowElement = observedWorkflowElement;
   }
 
-
-  /**
-   * Allows the observed workflow element to indicate its new state
-   * (enabled or disabled).
-   *
-   * @param enabled  the new "enabled" state of the observed workflow element
-   */
-  public void setWorkflowElementEnabled(boolean enabled)
-  {
-    if (this.enabled != enabled)
-    {
-      setChanged();
-      this.enabled = enabled;
-    }
-  }
-
-
-  /**
-   * Indicates whether the observed workflow element is enabled or not.
-   *
-   * @return <code>true</code> if the observed workflow element is enabled.
-   */
-  public boolean workflowElementIsEnabled()
-  {
-    return enabled;
-  }
-
-
   /**
    * Gets the observed workflow element.
    *
    * @return the observed workflow element.
    */
-  public WorkflowElement<?> getObservedWorkflowElement()
+  public WorkflowElement getObservedWorkflowElement()
   {
     return observedWorkflowElement;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElement.java b/opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElement.java
index e9abf18..5a8aae9 100644
--- a/opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElement.java
+++ b/opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElement.java
@@ -33,7 +33,6 @@
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-import org.opends.server.admin.std.server.WorkflowElementCfg;
 import org.opends.server.types.CanceledOperationException;
 import org.opends.server.types.Operation;
 
@@ -45,11 +44,8 @@
  * case for load balancing and distribution. And workflow element can be used
  * in a virtual environment to transform data (DN and attribute renaming,
  * attribute value renaming...).
- *
- * @param  <T>  The type of configuration handled by this workflow element.
  */
-public abstract class WorkflowElement <T extends WorkflowElementCfg>
-    implements Observer
+public abstract class WorkflowElement implements Observer
 {
 
   /** The observable state of the workflow element. */
@@ -101,11 +97,7 @@
    * @param observer  the observer to notify when the workflow element state
    *                  has been modified
    */
-  public static void registereForStateUpdate(
-      WorkflowElement<?> we,
-      String weid,
-      Observer observer
-      )
+  public static void registereForStateUpdate(WorkflowElement we, String weid, Observer observer)
   {
     // If the workflow element "we" exists then register the observer with "we"
     // else register the observer with a static list of workflow element
@@ -158,19 +150,14 @@
    *                  is useless when <code>we</code> is not <code>null</code>
    * @param observer  the observer to deregister
    */
-  public static void deregistereForStateUpdate(
-      WorkflowElement<?> we,
-      String weid,
-      Observer observer
-      )
+  public static void deregisterForStateUpdate(WorkflowElement we, String weid, Observer observer)
   {
     // If the workflow element "we" exists then deregister the observer
     // with "we" else deregister the observer with a static list of
     // workflow element identifiers
     if (we != null)
     {
-      ObservableWorkflowElementState westate = we.getObservableState();
-      westate.deleteObserver(observer);
+      we.getObservableState().deleteObserver(observer);
     }
 
     if (weid != null)
@@ -190,31 +177,6 @@
     // By default, do nothing when notification hits the workflow element.
   }
 
-
-  /**
-   * Indicates whether the provided configuration is acceptable for
-   * this workflow element.
-   *
-   * @param  configuration        The workflow element configuration for
-   *                              which to make the determination.
-   * @param  unacceptableReasons  A list that may be used to hold the
-   *                              reasons that the provided
-   *                              configuration is not acceptable.
-   *
-   * @return  {@code true} if the provided configuration is acceptable
-   *          for this workflow element, or {@code false} if not.
-   */
-  public final boolean isConfigurationAcceptable(
-      T configuration,
-      List<String> unacceptableReasons)
-  {
-    // This default implementation does not perform any special
-    // validation.  It should be overridden by workflow element
-    // implementations that wish to perform more detailed validation.
-    return true;
-  }
-
-
   /**
    * Performs any finalization that might be required when this
    * workflow element is unloaded.  No action is taken in the default
diff --git a/opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElementConfigManager.java b/opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElementConfigManager.java
deleted file mode 100644
index 99d49a5..0000000
--- a/opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElementConfigManager.java
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2007-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2014 ForgeRock AS
- */
-package org.opends.server.workflowelement;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.opendj.config.server.ConfigException;
-import org.forgerock.opendj.ldap.ResultCode;
-import org.forgerock.util.Utils;
-import org.opends.server.admin.ClassPropertyDefinition;
-import org.opends.server.admin.server.ConfigurationAddListener;
-import org.opends.server.admin.server.ConfigurationChangeListener;
-import org.opends.server.admin.server.ConfigurationDeleteListener;
-import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.admin.std.meta.WorkflowElementCfgDefn;
-import org.opends.server.admin.std.server.RootCfg;
-import org.opends.server.admin.std.server.WorkflowElementCfg;
-import org.opends.server.core.DirectoryServer;
-import org.opends.server.core.ServerContext;
-import org.opends.server.types.ConfigChangeResult;
-import org.opends.server.types.DirectoryException;
-import org.opends.server.types.InitializationException;
-
-import static org.opends.messages.ConfigMessages.*;
-
-/**
- * This class defines a utility that will be used to manage the configuration
- * for the set of workflow elements defined in the Directory Server.
- * It will perform the necessary initialization of those backends when the
- * server is first started, and then will manage any changes to them while
- * the server is running.
- */
-public class WorkflowElementConfigManager
-       implements ConfigurationChangeListener<WorkflowElementCfg>,
-                  ConfigurationAddListener   <WorkflowElementCfg>,
-                  ConfigurationDeleteListener<WorkflowElementCfg>
-
-{
-
-  /**
-   * Creates a new instance of this workflow config manager.
-   *
-   * @param serverContext
-   *            The server context.
-   */
-  public WorkflowElementConfigManager(ServerContext serverContext)
-  {
-  }
-
-  /**
-   * Initializes all workflow elements currently defined in the Directory
-   * Server configuration.  This should only be called at Directory Server
-   * startup.
-   *
-   * @throws  ConfigException  If a configuration problem causes the workflow
-   *                           element initialization process to fail.
-   * @throws InitializationException If a problem occurs while the workflow
-   *                                 element is loaded and registered with
-   *                                 the server
-   */
-  public void initializeWorkflowElements()
-      throws ConfigException, InitializationException
-  {
-    // Get the root configuration object.
-    ServerManagementContext managementContext =
-         ServerManagementContext.getInstance();
-    RootCfg rootConfiguration =
-         managementContext.getRootConfiguration();
-
-
-    // Register as an add and delete listener with the root configuration so we
-    // can be notified if any workflow element entries are added or removed.
-    rootConfiguration.addWorkflowElementAddListener(this);
-    rootConfiguration.addWorkflowElementDeleteListener(this);
-
-
-    //Initialize the existing workflows.
-    for (String workflowName : rootConfiguration.listWorkflowElements())
-    {
-      loadAndRegisterWorkflowElement(workflowName);
-    }
-  }
-
-  /**
-   * Return the associated workflowElement is enabled if the
-   * workflow is enabled.
-   *
-   * @param workflowName workflow identifier
-   * @return workflowelement associated with the workflowName of null
-   * @throws ConfigException Exception will reading
-   *         the config
-   * @throws InitializationException Exception while
-   *         initializing the workflow element
-   */
-  public WorkflowElement<?> loadAndRegisterWorkflowElement(String workflowName)
-          throws ConfigException, InitializationException {
-    ServerManagementContext managementContext =
-         ServerManagementContext.getInstance();
-    RootCfg rootConfiguration =
-         managementContext.getRootConfiguration();
-    WorkflowElementCfg workflowConfiguration =
-        rootConfiguration.getWorkflowElement(workflowName);
-    workflowConfiguration.addChangeListener(this);
-
-    if (workflowConfiguration.isEnabled())
-    {
-      return (loadAndRegisterWorkflowElement(workflowConfiguration));
-    }
-
-    return (null);
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public boolean isConfigurationAddAcceptable(
-      WorkflowElementCfg configuration,
-      List<LocalizableMessage> unacceptableReasons)
-  {
-    boolean isAcceptable = true;
-
-    if (configuration.isEnabled())
-    {
-      // Get the name of the class and make sure we can instantiate it as
-      // a workflow element.
-      String className = configuration.getJavaClass();
-      try
-      {
-        // Load the class but don't initialize it.
-        loadWorkflowElement(className, configuration, false);
-      }
-      catch (InitializationException ie)
-      {
-        unacceptableReasons.add (ie.getMessageObject());
-        isAcceptable = false;
-      }
-    }
-
-    return isAcceptable;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public ConfigChangeResult applyConfigurationAdd(
-      WorkflowElementCfg configuration)
-  {
-    // Returned result.
-    ConfigChangeResult changeResult = new ConfigChangeResult(
-        ResultCode.SUCCESS, false, new ArrayList<LocalizableMessage>()
-        );
-
-    configuration.addChangeListener(this);
-
-    // If the new workflow element is enabled then create it and register it.
-    if (configuration.isEnabled())
-    {
-      try
-      {
-        loadAndRegisterWorkflowElement(configuration);
-      }
-      catch (InitializationException de)
-      {
-        if (changeResult.getResultCode() == ResultCode.SUCCESS)
-        {
-          changeResult.setResultCode(
-              DirectoryServer.getServerErrorResultCode());
-        }
-        changeResult.addMessage(de.getMessageObject());
-      }
-    }
-
-    return changeResult;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public boolean isConfigurationDeleteAcceptable(
-      WorkflowElementCfg configuration,
-      List<LocalizableMessage> unacceptableReasons)
-  {
-    // FIXME -- We should try to perform some check to determine whether the
-    // workflow element is in use.
-    return true;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public ConfigChangeResult applyConfigurationDelete(
-      WorkflowElementCfg configuration)
-  {
-    // Returned result.
-    ConfigChangeResult changeResult = new ConfigChangeResult(
-        ResultCode.SUCCESS, false, new ArrayList<LocalizableMessage>()
-        );
-
-
-    WorkflowElement<?> workflowElement =
-            DirectoryServer.getWorkflowElement(
-            configuration.dn().rdn().getAttributeValue(0).toString());
-    if (workflowElement != null)
-    {
-      // Notify to observers that the workflow element is now disabled
-      ObservableWorkflowElementState observableState =
-        workflowElement.getObservableState();
-      observableState.setWorkflowElementEnabled(false);
-      observableState.notifyObservers();
-
-      // Remove the workflow element
-      DirectoryServer.deregisterWorkflowElement(workflowElement);
-      workflowElement.finalizeWorkflowElement();
-    }
-
-
-    return changeResult;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public boolean isConfigurationChangeAcceptable(
-      WorkflowElementCfg configuration,
-      List<LocalizableMessage> unacceptableReasons)
-  {
-    boolean isAcceptable = true;
-
-    if (configuration.isEnabled())
-    {
-      // Get the name of the class and make sure we can instantiate it as
-      // a workflow element.
-      String className = configuration.getJavaClass();
-      try
-      {
-        // Load the class but don't initialize it.
-        loadWorkflowElement(className, configuration, false);
-      }
-      catch (InitializationException ie)
-      {
-        unacceptableReasons.add (ie.getMessageObject());
-        isAcceptable = false;
-      }
-    }
-
-    return isAcceptable;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public ConfigChangeResult applyConfigurationChange(
-      WorkflowElementCfg configuration)
-  {
-    // Returned result.
-    ConfigChangeResult changeResult = new ConfigChangeResult(
-        ResultCode.SUCCESS, false, new ArrayList<LocalizableMessage>()
-        );
-
-
-    // Get the existing workflow element if it's already enabled.
-    WorkflowElement<?> existingWorkflowElement =
-      DirectoryServer.getWorkflowElement(
-      configuration.dn().rdn().getAttributeValue(0).toString());
-
-    // If the new configuration has the workflow element disabled,
-    // then disable it if it is enabled, or do nothing if it's already disabled.
-    if (! configuration.isEnabled())
-    {
-      if (existingWorkflowElement != null)
-      {
-        // Notify to observers that the workflow element is now disabled
-        ObservableWorkflowElementState observableState =
-          existingWorkflowElement.getObservableState();
-        observableState.setWorkflowElementEnabled(false);
-        observableState.notifyObservers();
-
-        // Remove the workflow element
-        DirectoryServer.deregisterWorkflowElement(existingWorkflowElement);
-        existingWorkflowElement.finalizeWorkflowElement();
-      }
-
-      return changeResult;
-    }
-
-    // If the workflow element is disabled then create it and register it.
-    if (existingWorkflowElement == null)
-    {
-      try
-      {
-        loadAndRegisterWorkflowElement(configuration);
-      }
-      catch (InitializationException de)
-      {
-        if (changeResult.getResultCode() == ResultCode.SUCCESS)
-        {
-          changeResult.setResultCode(
-              DirectoryServer.getServerErrorResultCode());
-        }
-        changeResult.addMessage(de.getMessageObject());
-      }
-    }
-
-    return changeResult;
-  }
-
-
-  /**
-   * Loads a class and instanciates it as a workflow element. The workflow
-   * element is initialized and registered with the server.
-   *
-   * @param workflowElementCfg  the workflow element configuration
-   * @return WorkflowElement
-   * @throws InitializationException If a problem occurs while trying to
-   *                            decode a provided string as a DN or if
-   *                            the workflow element ID for a provided
-   *                            workflow element conflicts with the workflow
-   *                            ID of an existing workflow during workflow
-   *                            registration.
-   */
-  WorkflowElement<?> loadAndRegisterWorkflowElement(
-      WorkflowElementCfg workflowElementCfg
-      ) throws InitializationException
-  {
-    // Load the workflow element class
-    String className = workflowElementCfg.getJavaClass();
-    WorkflowElement<?> workflowElement =
-      loadWorkflowElement(className, workflowElementCfg, true);
-
-    try
-    {
-      // register the workflow element
-      DirectoryServer.registerWorkflowElement(workflowElement);
-    }
-    catch (DirectoryException de)
-    {
-      throw new InitializationException(de.getMessageObject());
-    }
-    return (workflowElement);
-  }
-
-
-  /**
-   * Loads a class and instanciates it as a workflow element. If requested
-   * initializes the newly created instance.
-   *
-   * @param  className      The fully-qualified name of the workflow element
-   *                        class to load, instantiate, and initialize.
-   * @param  configuration  The configuration to use to initialize the workflow
-   *                        element.  It must not be {@code null}.
-   * @param  initialize     Indicates whether the workflow element instance
-   *                        should be initialized.
-   *
-   * @return  The possibly initialized workflow element.
-   *
-   * @throws  InitializationException  If a problem occurred while attempting
-   *                                   to initialize the workflow element.
-   */
-  private WorkflowElement<?> loadWorkflowElement(
-      String className,
-      WorkflowElementCfg configuration,
-      boolean initialize
-      ) throws InitializationException
-  {
-    try
-    {
-      WorkflowElementCfgDefn              definition;
-      ClassPropertyDefinition             propertyDefinition;
-      // I cannot use the parameterized type WorflowElement<?>
-      // because it would break the line WorkflowElement.class below.
-      // Use SuppressWarning because we know the cast is safe.
-      Class<? extends WorkflowElement>    workflowElementClass;
-
-      definition = WorkflowElementCfgDefn.getInstance();
-      propertyDefinition =
-        definition.getJavaClassPropertyDefinition();
-      workflowElementClass =
-        propertyDefinition.loadClass(className, WorkflowElement.class);
-      // Again, use SuppressWarning because we know the cast is safe
-      @SuppressWarnings("unchecked")
-      WorkflowElement<? extends WorkflowElementCfg> workflowElement =
-        workflowElementClass.newInstance();
-
-      if (initialize)
-      {
-        Method method = workflowElement.getClass().getMethod(
-            "initializeWorkflowElement", configuration.configurationClass());
-        method.invoke(workflowElement, configuration);
-      }
-      else
-      {
-        Method method = workflowElement.getClass().getMethod(
-            "isConfigurationAcceptable",
-            WorkflowElementCfg.class,
-            List.class);
-
-        List<String> unacceptableReasons = new ArrayList<String>();
-        Boolean acceptable = (Boolean) method.invoke(
-            workflowElement, configuration, unacceptableReasons);
-
-        if (! acceptable)
-        {
-          String buffer = Utils.joinAsString(".  ", unacceptableReasons);
-          throw new InitializationException(
-              ERR_CONFIG_WORKFLOW_ELEMENT_CONFIG_NOT_ACCEPTABLE.get(configuration.dn(), buffer));
-        }
-      }
-
-      return workflowElement;
-    }
-    catch (Exception e)
-    {
-      Throwable t = e;
-      if (e instanceof InvocationTargetException && e.getCause() != null) {
-        t = e.getCause();
-      }
-
-      throw new InitializationException(
-          ERR_CONFIG_WORKFLOW_ELEMENT_CANNOT_INITIALIZE.get(
-              className, configuration.dn(), t.getMessage()));
-    }
-  }
-
-}
-
diff --git a/opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java b/opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
index 6822bcf..2ef9bf3 100644
--- a/opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
+++ b/opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
@@ -34,13 +34,7 @@
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.i18n.LocalizableMessageDescriptor;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
-import org.forgerock.opendj.config.server.ConfigException;
 import org.forgerock.opendj.ldap.ResultCode;
-import org.opends.server.admin.server.ConfigurationChangeListener;
-import org.opends.server.admin.server.ServerManagementContext;
-import org.opends.server.admin.std.server.BackendCfg;
-import org.opends.server.admin.std.server.LocalBackendWorkflowElementCfg;
-import org.opends.server.admin.std.server.RootCfg;
 import org.opends.server.api.Backend;
 import org.opends.server.controls.LDAPPostReadRequestControl;
 import org.opends.server.controls.LDAPPostReadResponseControl;
@@ -51,15 +45,12 @@
 import org.opends.server.workflowelement.WorkflowElement;
 
 import static org.opends.messages.CoreMessages.*;
-import static org.opends.server.config.ConfigConstants.*;
 
 /**
  * This class defines a local backend workflow element; e-g an entity that
  * handle the processing of an operation against a local backend.
  */
-public class LocalBackendWorkflowElement extends
-    WorkflowElement<LocalBackendWorkflowElementCfg>
-    implements ConfigurationChangeListener<LocalBackendWorkflowElementCfg>
+public class LocalBackendWorkflowElement extends WorkflowElement
 {
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
@@ -124,34 +115,6 @@
     return this.backend != null && this.backend.isPrivateBackend();
   }
 
-  /**
-   * Initializes a new instance of the local backend workflow element.
-   * This method is intended to be called by DirectoryServer when
-   * workflow configuration mode is manual as opposed to
-   * initialize(String,Backend) which is invoked when workflow
-   * configuration mode is auto.
-   *
-   * @param  configuration  The configuration for this local backend
-   *                        workflow element.
-   *
-   * @throws  ConfigException  If there is a problem with the provided
-   *                           configuration.
-   *
-   * @throws  InitializationException  If an error occurs while trying
-   *                                   to initialize this workflow
-   *                                   element that is not related to
-   *                                   the provided configuration.
-   */
-  public void initializeWorkflowElement(
-      LocalBackendWorkflowElementCfg configuration
-      ) throws ConfigException, InitializationException
-  {
-    configuration.addLocalBackendChangeListener(this);
-
-    // Read configuration and apply changes.
-    processWorkflowElementConfig(configuration, true);
-  }
-
   /** {@inheritDoc} */
   @Override
   public void finalizeWorkflowElement()
@@ -159,86 +122,9 @@
     // null all fields so that any use of the finalized object will raise a NPE
     this.workflowElementID = null;
     this.workflowElementTypeInfo = null;
-    backend = null;
+    this.backend = null;
   }
 
-  /** {@inheritDoc} */
-  @Override
-  public boolean isConfigurationChangeAcceptable(
-      LocalBackendWorkflowElementCfg configuration,
-      List<LocalizableMessage>                  unacceptableReasons
-      )
-  {
-    return processWorkflowElementConfig(configuration, false);
-  }
-
-  /** {@inheritDoc} */
-  @Override
-  public ConfigChangeResult applyConfigurationChange(
-      LocalBackendWorkflowElementCfg configuration
-      )
-  {
-    processWorkflowElementConfig(configuration, true);
-
-    return new ConfigChangeResult(ResultCode.SUCCESS, false,
-        new ArrayList<LocalizableMessage>());
-  }
-
-
-  /**
-   * Parses the provided configuration and configure the workflow element.
-   *
-   * @param configuration  The new configuration containing the changes.
-   * @param applyChanges   If true then take into account the new configuration.
-   *
-   * @return  <code>true</code> if the configuration is acceptable.
-   */
-  private boolean processWorkflowElementConfig(
-      LocalBackendWorkflowElementCfg configuration,
-      boolean                        applyChanges
-      )
-  {
-    // returned status
-    boolean isAcceptable = true;
-
-    // If the workflow element is disabled then do nothing. Note that the
-    // configuration manager could have finalized the object right before.
-    if (configuration.isEnabled())
-    {
-      // Read configuration.
-      String newBackendID = configuration.getBackend();
-      Backend<?> newBackend = DirectoryServer.getBackend(newBackendID);
-
-      // If the backend is null (i.e. not found in the list of
-      // registered backends, this is probably because we are looking
-      // for the config backend
-      if (newBackend == null) {
-        ServerManagementContext context = ServerManagementContext.getInstance();
-        RootCfg root = context.getRootConfiguration();
-        try {
-          BackendCfg backendCfg = root.getBackend(newBackendID);
-          if (backendCfg.getBaseDN().contains(DN.valueOf(DN_CONFIG_ROOT))) {
-            newBackend = DirectoryServer.getConfigHandler();
-          }
-        } catch (Exception ex) {
-          // Unable to find the backend
-          newBackend = null;
-        }
-      }
-
-      // Get the new configuration
-      if (applyChanges)
-      {
-        initialize(
-            configuration.dn().rdn().getAttributeValue(0).toString(),
-            newBackend);
-      }
-    }
-
-    return isAcceptable;
-  }
-
-
   /**
    * Creates and registers a local backend with the server.
    *
@@ -707,8 +593,7 @@
    *                               operation
    */
   @SuppressWarnings("unchecked")
-  public static <O extends Operation,L> void
-              attachLocalOperation (O globalOperation, L currentLocalOperation)
+  static <O extends Operation, L> void attachLocalOperation(O globalOperation, L currentLocalOperation)
   {
     List<?> existingAttachment =
       (List<?>) globalOperation.getAttachment(Operation.LOCALBACKENDOPERATIONS);
diff --git a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java
index 0d0cef1..00c75ac 100644
--- a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java
+++ b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java
@@ -73,17 +73,14 @@
     TestCaseUtils.startServer();
     TestCaseUtils.clearJEBackend(true,"userRoot","dc=example,dc=com");
 
-
-    // Add the suffix entry.
     DN suffixDN = DN.valueOf(SUFFIX);
-    if (DirectoryServer.getEntry(suffixDN) == null)
+    if (!DirectoryServer.entryExists(suffixDN))
     {
       processAdd(StaticUtils.createEntry(suffixDN));
     }
 
-    // Add a search base entry.
     DN baseDN = DN.valueOf(BASE);
-    if (DirectoryServer.getEntry(baseDN) == null)
+    if (!DirectoryServer.entryExists(baseDN))
     {
       processAdd(StaticUtils.createEntry(baseDN));
     }
diff --git a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowConfigurationTest.java b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowConfigurationTest.java
index 11f9cab..2e95eb9 100644
--- a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowConfigurationTest.java
+++ b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowConfigurationTest.java
@@ -68,10 +68,7 @@
 @SuppressWarnings("javadoc")
 public class WorkflowConfigurationTest extends UtilTestCase
 {
-  // The base DN of the config backend
   private static final String configBaseDN = ConfigConstants.DN_CONFIG_ROOT;
-
-  // The base DN of the rootDSE backend
   private static final String rootDSEBaseDN = "";
 
   // The workflow configuration mode attribute
@@ -79,12 +76,8 @@
       "ds-cfg-workflow-configuration-mode";
 
   // The suffix attribute in a backend
-  private static final String suffixAttributeType =
-      "ds-cfg-base-dn";
-
-  // The auto/manual modes
+  private static final String suffixAttributeType = "ds-cfg-base-dn";
   private static final String workflowConfigModeAuto   = "auto";
-  private static final String workflowConfigModeManual = "manual";
 
 
 
@@ -177,39 +170,6 @@
     doSearch(baseDN, SearchScope.BASE_OBJECT, ResultCode.NO_SUCH_OBJECT);
   }
 
-
-  /**
-   * Sets the ds-cfg-workflow-configuration-mode attribute to 'auto'
-   */
-  private void setModeAuto() throws Exception
-  {
-    ModifyOperationBasis modifyOperation = getModifyOperation(
-        configBaseDN,
-        ModificationType.REPLACE,
-        workflowModeAttributeType,
-        workflowConfigModeAuto);
-
-    modifyOperation.run();
-    assertEquals(modifyOperation.getResultCode(), ResultCode.SUCCESS);
-  }
-
-
-  /**
-   * Sets the ds-cfg-workflow-configuration-mode attribute to 'auto'
-   */
-  private void setModeManual() throws Exception
-  {
-    ModifyOperationBasis modifyOperation = getModifyOperation(
-        configBaseDN,
-        ModificationType.REPLACE,
-        workflowModeAttributeType,
-        workflowConfigModeManual);
-
-    modifyOperation.run();
-    assertEquals(modifyOperation.getResultCode(), ResultCode.SUCCESS);
-  }
-
-
   /**
    * Performs a search on a provided base DN.
    *
@@ -316,8 +276,7 @@
     NetworkGroup.getInternalNetworkGroup().deregisterWorkflow(workflowID);
 
     // Deregister the workflow with the server
-    Workflow workflow = WorkflowImpl.getWorkflow(workflowID);
-    WorkflowImpl workflowImpl = (WorkflowImpl) workflow;
+    WorkflowImpl workflowImpl = (WorkflowImpl) WorkflowImpl.getWorkflow(workflowID);
     workflowImpl.deregister();
   }
 
@@ -474,76 +433,6 @@
   //===========================================================================
 
   /**
-   * This test checks the transition from mode 'auto' to 'manual' and
-   * 'manual' back to 'auto'. In this test there is no configuration for
-   * network group, workflow and workflow element.
-   */
-  @Test
-  public void transitionAutoManualAuto() throws Exception
-  {
-    // Settings
-    String testBaseDN = "o=test";
-
-    // The ds-cfg-workflow-configuration-mode attribute value is "auto"
-    // (default value), let's put the same value again. Putting the same
-    // value should have no impact and we should be able to perform a search
-    // on the test backend.
-    setModeAuto();
-    checkBackendIsAccessible(testBaseDN);
-
-    // Change the ds-cfg-workflow-configuration-mode attribute value
-    // to "manual". The workflows should be fully reconfigured. But as
-    // there is no configuration for the workflows, only cn=config and
-    // rootDSE should be accessible.
-    setModeManual();
-    checkBackendIsNotAccessible(testBaseDN);
-
-    // Change the ds-cfg-workflow-configuration-mode attribute value
-    // back to "auto". All the local backends should be accessible again.
-    setModeAuto();
-    checkBackendIsAccessible(testBaseDN);
-  }
-
-
-  /**
-   * This test checks the basic operation routing when configuration
-   * mode is 'manual'. Few workflows are configured for the test.
-   */
-  @Test
-  public void basicRoutingManualMode() throws Exception
-  {
-    // Settings
-    String testBaseDN    = "o=test";
-    String testBackendID = "test";
-
-    // Workflow configuration mode is auto, so test backend should
-    // be accessible
-    setModeAuto();
-    checkBackendIsAccessible(testBaseDN);
-
-    // Set the workflow configuration mode to manual. In this mode
-    // no there is no workflow by default (but the config and rootDSE
-    // workflows) so searches on the test backend should fail.
-    setModeManual();
-    checkBackendIsNotAccessible(testBaseDN);
-
-    // Create a workflow to handle o=test backend then check that test
-    // backend is now accessible
-    createWorkflow(testBaseDN, testBackendID);
-    checkBackendIsAccessible(testBaseDN);
-
-    // Remove the workflow and check that searches are failing.
-    removeWorkflow(testBaseDN, testBackendID);
-    checkBackendIsNotAccessible(testBaseDN);
-
-    // Change workflow configuration mode back to auto and check that
-    // test backend is still accessible
-    setModeAuto();
-    checkBackendIsAccessible(testBaseDN);
-  }
-
-
-  /**
    * This test checks the add/remove of suffix in a backend in manual
    * configuration mode.
    */
@@ -557,7 +446,6 @@
 
     // make sure we are in auto mode and check that the new suffixes are
     // not already defined on the server.
-    setModeAuto();
     checkBackendIsNotAccessible(testBaseDN2);
     checkBackendIsNotAccessible(testBaseDN3);
 
@@ -572,9 +460,6 @@
     removeSuffix(testBaseDN2, testBackendID2);
     checkBackendIsNotAccessible(testBaseDN2);
 
-    // Now move to the manual mode.
-    setModeManual();
-
     // Add a new suffix and configure a workflow to route operation
     // to this new suffix, then check that the new suffix is accessible.
     // Note that before we can create a base entry we need to configure
@@ -591,9 +476,6 @@
     removeWorkflow(testBaseDN3, testBackendID2);
     removeSuffix(testBaseDN3, testBackendID2);
     checkBackendIsNotAccessible(testBaseDN3);
-
-    // Back to the original configuration mode
-    setModeAuto();
   }
 
 
@@ -611,7 +493,6 @@
     String baseDN2    = "o=addRemoveBackendBaseDN_2";
 
     // Make sure we are in auto mode and check the suffix is not accessible
-    setModeAuto();
     checkBackendIsNotAccessible(baseDN1);
 
     // Create a backend and check that the base entry is accessible.
@@ -622,8 +503,6 @@
     dsconfigRemoveMemoryBackend(backendID1);
     checkBackendIsNotAccessible(baseDN1);
 
-    // Now move to the manual mode
-    setModeManual();
     checkBackendIsNotAccessible(baseDN2);
 
     // Create a backend and create a workflow to route operations to that
@@ -637,9 +516,6 @@
     removeWorkflow(baseDN2, backendID2);
     dsconfigRemoveMemoryBackend(backendID2);
     checkBackendIsNotAccessible(baseDN2);
-
-    // Back to the original configuration mode
-    setModeAuto();
   }
 
 
@@ -654,9 +530,6 @@
     String backendID = "test";
     String baseDN    = "o=test";
 
-    // Move to the manual mode
-    setModeManual();
-
     // Create a route for o=test suffix in the internal network group.
     // Search on o=test should succeed.
     WorkflowImpl workflowImpl = createWorkflow(baseDN, backendID);
@@ -684,8 +557,5 @@
     clientConnection.setNetworkGroup(NetworkGroup.getInternalNetworkGroup());
     searchOperation.run();
     assertEquals(searchOperation.getResultCode(), ResultCode.SUCCESS);
-
-    // Back to the original configuration mode
-    setModeAuto();
   }
 }
diff --git a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowTopologyTest.java b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowTopologyTest.java
index 7af034b..edab473 100644
--- a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowTopologyTest.java
+++ b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowTopologyTest.java
@@ -26,21 +26,13 @@
  */
 package org.opends.server.core;
 
-
-import static org.opends.messages.CoreMessages.*;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertNull;
-
 import java.util.ArrayList;
 
+import org.forgerock.i18n.LocalizableMessageBuilder;
+import org.forgerock.opendj.ldap.ResultCode;
 import org.opends.server.TestCaseUtils;
 import org.opends.server.types.DN;
 import org.opends.server.types.DirectoryException;
-import org.forgerock.opendj.ldap.ResultCode;
 import org.opends.server.util.StaticUtils;
 import org.opends.server.util.UtilTestCase;
 import org.opends.server.workflowelement.WorkflowElement;
@@ -48,6 +40,8 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
+import static org.opends.messages.CoreMessages.*;
+import static org.testng.Assert.*;
 
 /**
  * This set of tests checks that workflow topology is properly created.
@@ -424,8 +418,7 @@
       new WorkflowImpl (baseDN.toString(), baseDN, null, nullWE);
 
     // Create a worflow with the dit, no pre/post-workflow element.
-    WorkflowTopologyNode workflowNode =
-      new WorkflowTopologyNode (workflow, null, null);
+    WorkflowTopologyNode workflowNode = new WorkflowTopologyNode(workflow);
 
     // The base DN in the workflow should match baseDN parameter
     DN workflowBaseDN = workflowNode.getBaseDN();
@@ -495,14 +488,14 @@
     }
 
     // Create a worflow for each dit, no pre/post-workflow element
-    WorkflowTopologyNode w1    = new WorkflowTopologyNode(workflow, null, null);
-    WorkflowTopologyNode w1bis = new WorkflowTopologyNode(workflow, null, null);
-    WorkflowTopologyNode w2    = new WorkflowTopologyNode(subWorkflow, null, null);
+    WorkflowTopologyNode w1    = new WorkflowTopologyNode(workflow);
+    WorkflowTopologyNode w1bis = new WorkflowTopologyNode(workflow);
+    WorkflowTopologyNode w2    = new WorkflowTopologyNode(subWorkflow);
 
     WorkflowTopologyNode w3 = null;
     if (unrelatedWorkflow != null)
     {
-       w3 = new WorkflowTopologyNode (unrelatedWorkflow, null, null);
+      w3 = new WorkflowTopologyNode(unrelatedWorkflow);
     }
 
     // insert status
@@ -636,9 +629,9 @@
         workflow3 = new WorkflowImpl(baseDN3.toString(), baseDN3, null, nullWE);
       }
 
-      w1 = new WorkflowTopologyNode (workflow1, null, null);
-      w2 = new WorkflowTopologyNode (workflow2, null, null);
-      w3 = new WorkflowTopologyNode (workflow3, null, null);
+      w1 = new WorkflowTopologyNode(workflow1);
+      w2 = new WorkflowTopologyNode(workflow2);
+      w3 = new WorkflowTopologyNode(workflow3);
     }
 
     // insert status
@@ -818,9 +811,9 @@
         workflow3 = new WorkflowImpl(baseDN3.toString(), baseDN3, null, nullWE);
       }
 
-      w1 = new WorkflowTopologyNode (workflow1, null, null);
-      w2 = new WorkflowTopologyNode (workflow2, null, null);
-      w3 = new WorkflowTopologyNode (workflow3, null, null);
+      w1 = new WorkflowTopologyNode(workflow1);
+      w2 = new WorkflowTopologyNode(workflow2);
+      w3 = new WorkflowTopologyNode(workflow3);
     }
 
     // Put all the workflows in a pool
diff --git a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/NetworkGroupTest.java b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/NetworkGroupTest.java
index d839587..0f6c922 100644
--- a/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/NetworkGroupTest.java
+++ b/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/NetworkGroupTest.java
@@ -334,22 +334,20 @@
 
     // Register again the network group with the server and catch the
     // expected DirectoryServer exception.
-    boolean exceptionRaised = false;
     try
     {
       networkGroup.register();
+      fail("InitializationException sjhould have been thrown");
     }
     catch (InitializationException e)
     {
-      exceptionRaised = true;
       assertTrue(StaticUtils.hasDescriptor(e.getMessageObject(),
           ERR_REGISTER_NETWORK_GROUP_ALREADY_EXISTS));
     }
-    assertEquals(exceptionRaised, true);
 
     // Create a workflow -- the workflow ID is the string representation
     // of the workflow base DN.
-    WorkflowElement<?> nullWE = null;
+    WorkflowElement nullWE = null;
     WorkflowImpl workflow = new WorkflowImpl(
         workflowBaseDN.toString(), workflowBaseDN, null, nullWE);
 
@@ -358,18 +356,16 @@
 
     // Register again the workflow with the network group and catch the
     // expected DirectoryServer exception.
-    exceptionRaised = false;
     try
     {
       networkGroup.registerWorkflow(workflow);
+      fail("DirectoryException sjhould have been thrown");
     }
     catch (DirectoryException de)
     {
-      exceptionRaised = true;
       assertTrue(StaticUtils.hasDescriptor(de.getMessageObject(),
           ERR_REGISTER_WORKFLOW_NODE_ALREADY_EXISTS));
     }
-    assertEquals(exceptionRaised, true);
 
     // Clean the network group
     networkGroup.deregisterWorkflow(workflow.getWorkflowId());
@@ -400,26 +396,21 @@
     assertNotNull(defaultNG);
 
     // let's check the routing through the network group
-    doCheckNetworkGroup(defaultNG, dnToSearch, dnSubordinate, null,
-            existsInDefault);
-
+    doCheckNetworkGroup(defaultNG, dnToSearch, dnSubordinate, null, existsInDefault);
 
     // let's get the admin network group -- it should always exist
     NetworkGroup adminNG = NetworkGroup.getAdminNetworkGroup();
     assertNotNull(adminNG);
 
     // let's check the routing through the network group
-    doCheckNetworkGroup(adminNG, dnToSearch, dnSubordinate, null,
-            existsInAdmin);
-
+    doCheckNetworkGroup(adminNG, dnToSearch, dnSubordinate, null, existsInAdmin);
 
     // let's get the internal network group -- it should always exist
     NetworkGroup internalNG = NetworkGroup.getInternalNetworkGroup();
     assertNotNull(internalNG);
 
     // let's check the routing through the network group
-    doCheckNetworkGroup(internalNG, dnToSearch, dnSubordinate, null,
-            existsInInternal);
+    doCheckNetworkGroup(internalNG, dnToSearch, dnSubordinate, null, existsInInternal);
   }
 
 
@@ -491,12 +482,9 @@
     doCheckNetworkGroup(networkGroup, dn3, subordinate3, unrelatedDN, false);
 
     // Now create again the workflow 1, 2 and 3...
-    WorkflowImpl w1;
-    WorkflowImpl w2;
-    WorkflowImpl w3;
-    w1 = createAndRegisterWorkflow(networkGroup, dn1);
-    w2 = createAndRegisterWorkflow(networkGroup, dn2);
-    w3 = createAndRegisterWorkflow(networkGroup, dn3);
+    WorkflowImpl w1 = createAndRegisterWorkflow(networkGroup, dn1);
+    WorkflowImpl w2 = createAndRegisterWorkflow(networkGroup, dn2);
+    WorkflowImpl w3 = createAndRegisterWorkflow(networkGroup, dn3);
 
     // ... and deregister the workflows using their workflowID
     // instead of their baseDN
@@ -783,7 +771,7 @@
 
     // Create a workflow -- the workflow ID is the string representation
     // of the workflow base DN.
-    WorkflowElement<?> nullWE = null;
+    WorkflowElement nullWE = null;
     WorkflowImpl workflow1 = new WorkflowImpl(
         dn1.toString(), dn1, null, nullWE);
     WorkflowImpl workflow2 = new WorkflowImpl(
@@ -800,11 +788,7 @@
     // As the network groups define no criteria, the highest priority
     // must be chosen
     NetworkGroup ng = NetworkGroup.findMatchingNetworkGroup(connection);
-    if (prio1 < prio2) {
-      assertEquals(ng, networkGroup1);
-    } else {
-      assertEquals(ng, networkGroup2);
-    }
+    assertEquals(ng, prio1 < prio2 ? networkGroup1 : networkGroup2);
 
     // Clean the network group
     networkGroup1.deregisterWorkflow(workflow1.getWorkflowId());
@@ -1157,9 +1141,7 @@
     // Check that the unrelatedDN is not handled by any workflow
     if (unrelatedDN != null)
     {
-      Workflow unrelatedWorkflow =
-        networkGroup.getWorkflowCandidate(unrelatedDN);
-      assertNull(unrelatedWorkflow);
+      assertNull(networkGroup.getWorkflowCandidate(unrelatedDN));
     }
   }
 
@@ -1188,7 +1170,7 @@
 
     // Create a workflow with no task inside. The workflow identifier
     // is the a string representation of the workflow base DN.
-    WorkflowElement<?> rootWE = null;
+    WorkflowElement rootWE = null;
     String workflowId = workflowBaseDN.toString();
     WorkflowImpl workflow = new WorkflowImpl(
         workflowId, workflowBaseDN, null, rootWE);
@@ -1200,13 +1182,4 @@
     return workflow;
   }
 
-
-  /**
-   * Prints a text to System.out.
-   */
-  private void write(String msg)
-  {
-    System.out.print(msg);
-  }
-
 }

--
Gitblit v1.10.0