Index: trunk/workflow/inc/class.ui_adminactivities.inc.php
===================================================================
--- trunk/workflow/inc/class.ui_adminactivities.inc.php	(revision 2591)
+++ trunk/workflow/inc/class.ui_adminactivities.inc.php	(revision 3056)
@@ -1035,35 +1035,54 @@
 		$image_name = $proc_info['wf_normalized_name'] . SEP . 'graph' . SEP . $proc_info['wf_normalized_name'] . '.png';
 		$image = GALAXIA_PROCESSES . SEP . $image_name;
-		if (Factory::getInstance('BrowserInfo')->isOpera())
-			$maximumDimension = 1000000;
+		if (file_exists($image))
+		{
+			if (Factory::getInstance('BrowserInfo')->isOpera())
+				$maximumDimension = 1000000;
+			else
+				$maximumDimension = 2500;
+
+			$dims = getimagesize($image);
+			list($originalWidth, $originalHeight) = $dims;
+
+			/* the image must be resized */
+			if (max($originalWidth, $originalHeight) > $maximumDimension)
+			{
+				/* define the new width and height */
+				$newWidth = $newHeight = $maximumDimension;
+				if ($originalWidth > $originalHeight)
+					$newHeight = $maximumDimension * ($originalHeight / $originalWidth);
+				else
+					$newWidth = $maximumDimension * ($originalWidth / $originalHeight);
+
+				/* create the new image and send to the browser */
+				$smallerImage = imagecreatetruecolor($newWidth, $newHeight);
+				imagecopyresampled($smallerImage, imagecreatefrompng($image), 0, 0, 0, 0, $newWidth, $newHeight, $originalWidth, $originalHeight);
+				header('content-disposition: inline; filename=' . $image_name);
+				header('content-type: ' . $dims['mime']);
+				imagepng($smallerImage);
+			}
+			else
+			{
+				header('content-disposition: inline; filename=' . $image_name);
+				header('content-type: ' . $dims['mime']);
+				header('content-length: ' . filesize($image));
+				readfile($image);
+			}
+		}
+		// if there is no graph, show "graph not found" message
 		else
-			$maximumDimension = 2500;
-
-		$dims = getimagesize($image);
-		list($originalWidth, $originalHeight) = $dims;
-
-		/* the image must be resized */
-		if (max($originalWidth, $originalHeight) > $maximumDimension)
-		{
-			/* define the new width and height */
-			$newWidth = $newHeight = $maximumDimension;
-			if ($originalWidth > $originalHeight)
-				$newHeight = $maximumDimension * ($originalHeight / $originalWidth);
-			else
-				$newWidth = $maximumDimension * ($originalWidth / $originalHeight);
-
-			/* create the new image and send to the browser */
-			$smallerImage = imagecreatetruecolor($newWidth, $newHeight);
-			imagecopyresampled($smallerImage, imagecreatefrompng($image), 0, 0, 0, 0, $newWidth, $newHeight, $originalWidth, $originalHeight);
-			header('content-disposition: inline; filename=' . $image_name);
-			header('content-type: ' . $dims['mime']);
-			imagepng($smallerImage);
-		}
-		else
-		{
-			header('content-disposition: inline; filename=' . $image_name);
-			header('content-type: ' . $dims['mime']);
-			header('content-length: ' . filesize($image));
-			readfile($image);
+		{
+			header ('Content-type: image/png');
+			$text = 'GRAFICO NAO ENCONTRADO';
+			$font_size = 5;
+			$width = imagefontwidth($font_size) * strlen($text);
+			$height = imagefontheight($font_size);
+			$im = imagecreate($width, $height);
+			$text_color = imagecolorallocate($im, 0, 0, 0);		// black
+			$bg_color = imagecolorallocate($im, 255, 255, 255);	// white
+			imagefill($im, 0, 0, $bg_color);
+			imagestring($im, $font_size, 0, 0, $text, $text_color);
+			imagepng($im);
+			imagedestroy($im);
 		}
 	}
Index: trunk/workflow/inc/class.bo_userinterface.inc.php
===================================================================
--- trunk/workflow/inc/class.bo_userinterface.inc.php	(revision 2591)
+++ trunk/workflow/inc/class.bo_userinterface.inc.php	(revision 3056)
@@ -91,10 +91,17 @@
 					$recset[$procname_ver]['useHTTPS'] = 0;
 			}
-			$recset[$procname_ver][] = array('wf_activity_id' 	=> $line['wf_activity_id'],
-										'wf_name' 			=> $line['wf_name'],
-										'wf_menu_path' 		=> $line['wf_menu_path'],
-										'wf_type' 			=> $line['wf_type'],
-										'wf_is_autorouted' 	=> $line['wf_is_autorouted'],
-										'wf_is_interactive' => $line['wf_is_interactive']);
+			if (!is_dir(GALAXIA_PROCESSES . '/' . $line['wf_normalized_name']))
+			{
+				$recset[$procname_ver]['wf_iconfile'] = $templateServer->generateImageLink('navbar_nocode.png');
+			}
+			else
+			{
+				$recset[$procname_ver][] = array('wf_activity_id' 	=> $line['wf_activity_id'],
+												'wf_name' 			=> $line['wf_name'],
+												'wf_menu_path' 		=> $line['wf_menu_path'],
+												'wf_type' 			=> $line['wf_type'],
+												'wf_is_autorouted' 	=> $line['wf_is_autorouted'],
+												'wf_is_interactive' => $line['wf_is_interactive']);
+			}
 		}
 
