Ejemplo n.º 1
0
        private static string GetAbortMessage(WorkflowApplicationAbortReason reason, WorkflowHandlerBase workflow)
        {
            try
            {
                switch (reason)
                {
                case WorkflowApplicationAbortReason.ManuallyAborted:
                    return(String.Concat(ABORTEDBYUSERMESSAGE, AccessProvider.Current.GetCurrentUser().Username));

                case WorkflowApplicationAbortReason.StateContentDeleted:
                    return("Workflow deleted" + (workflow == null ? "." : (": " + workflow.Path)));

                case WorkflowApplicationAbortReason.RelatedContentChanged:
                    return("Aborted because the related content was changed.");

                case WorkflowApplicationAbortReason.RelatedContentDeleted:
                    return("Aborted because the related content was moved or deleted.");

                default:
                    return(reason.ToString());
                }
            }
            catch (Exception e)
            {
                WriteError("GetAbortMessage", e);
                throw;
            }
        }
Ejemplo n.º 2
0
 private static string GetAbortMessage(WorkflowApplicationAbortReason reason, WorkflowHandlerBase workflow)
 {
     switch (reason)
     {
         case WorkflowApplicationAbortReason.ManuallyAborted:
             return String.Concat(ABORTEDBYUSERMESSAGE, AccessProvider.Current.GetCurrentUser().Username);
         case WorkflowApplicationAbortReason.StateContentDeleted:
             return "Workflow deleted" + (workflow == null ? "." : (": " + workflow.Path));
         case WorkflowApplicationAbortReason.RelatedContentChanged:
             return "Aborted because the related content was changed.";
         case WorkflowApplicationAbortReason.RelatedContentDeleted:
             return "Aborted because the related content was moved or deleted.";
         default:
             return reason.ToString();
     }
 }