{
message = generateTaskMessage(taskPrincipal);
}
else
{
ManagementConnectionPrincipal managementConnection = getPrincipal(subject,ManagementConnectionPrincipal.class);
if(managementConnection != null)
{
message = generateManagementConnectionMessage(managementConnection, getPrincipal(subject, AuthenticatedPrincipal.class));
}
else