public static void ShowExampleWorkflow(string activityName, IEnvironmentModel environment, IPopupController popupController)
{
var resourceID = GetExampleID(activityName);
var resource = environment.ResourceRepository
.FindSingle(r => r.ID.Equals(resourceID));
if(resource == null)
{
if(popupController == null)
{
var message =
string.Format(
StringResources.ExampleWorkflowNotFound,
GetExampleName(activityName));
MessageBox.Show(message, "Information", MessageBoxButton.OK, MessageBoxImage.Information);
}
else
{
popupController.Buttons = MessageBoxButton.OK;
popupController.Description = string.Format(StringResources.ExampleWorkflowNotFound, resourceID);
popupController.Header = "Example Workflow Not Found";
popupController.ImageType = MessageBoxImage.Information;
popupController.Show();
}
}
else
{
resource.ResourceType = ResourceType.WorkflowService;
EditResource(resource, EventPublishers.Aggregator);
}
}