{
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);
}