From 0e47fcf59332b96c43f4737143025e07f8202638 Mon Sep 17 00:00:00 2001
From: jdemendi <jdemendi@localhost>
Date: Fri, 31 Oct 2008 11:12:52 +0000
Subject: [PATCH] fix 35353, Workflows are not notified when their root workflow elements are disabled
---
opends/src/server/org/opends/server/core/WorkflowConfigManager.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/WorkflowConfigManager.java b/opends/src/server/org/opends/server/core/WorkflowConfigManager.java
index b51ce36..a0d79a6 100644
--- a/opends/src/server/org/opends/server/core/WorkflowConfigManager.java
+++ b/opends/src/server/org/opends/server/core/WorkflowConfigManager.java
@@ -234,10 +234,10 @@
new ConfigChangeResult(resultCode, adminActionRequired, messages);
- // Get the existing network group if it's already enabled.
+ // Get the existing workflow if it's already enabled.
WorkflowImpl existingWorkflow = workflows.get(configuration.dn());
- // If the new configuration has the validator disabled, then disable it if
+ // 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())
{
@@ -251,7 +251,7 @@
return configChangeResult;
}
- // If the network group is disabled then create and register it.
+ // If the workflow is disabled then create and register it.
if (existingWorkflow == null)
{
try
@@ -268,6 +268,11 @@
messages.add(de.getMessageObject());
}
}
+ else
+ {
+ // The workflow already exist, just notify the changes to the workflow
+ existingWorkflow.updateConfig(configuration);
+ }
return configChangeResult;
}
@@ -302,7 +307,8 @@
// Create the workflow and register it with the server
WorkflowImpl workflowImpl =
- new WorkflowImpl(workflowId, baseDN, rootWorkflowElement);
+ new WorkflowImpl(
+ workflowId, baseDN, rootWorkflowElementID, rootWorkflowElement);
workflows.put(workflowCfg.dn(), workflowImpl);
workflowImpl.register();
--
Gitblit v1.10.0