| | |
| | | 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()) |
| | | { |
| | |
| | | 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 |
| | |
| | | messages.add(de.getMessageObject()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // The workflow already exist, just notify the changes to the workflow |
| | | existingWorkflow.updateConfig(configuration); |
| | | } |
| | | |
| | | return configChangeResult; |
| | | } |
| | |
| | | |
| | | // 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(); |
| | | |