상속: INotifyPropertyChanging, INotifyPropertyChanged
예제 #1
0
 public static int RegisterWait(int nodeID, Guid wfInstanceId, string bookMarkName, string wfContentPath)
 {
     try
     {
         WriteDebug("**************** RegisterWait: " + wfInstanceId);
         using (var dbContext = GetDataContext())
         {
             var notification = new WorkflowNotification()
             {
                 BookmarkName       = bookMarkName,
                 NodeId             = nodeID,
                 WorkflowInstanceId = wfInstanceId,
                 WorkflowNodePath   = wfContentPath
             };
             dbContext.WorkflowNotifications.InsertOnSubmit(notification);
             dbContext.SubmitChanges();
             return(notification.NotificationId);
         }
     }
     catch (Exception e)
     {
         WriteError("RegisterWait", e);
         throw;
     }
 }
예제 #2
0
 public static void FireNotification(WorkflowNotification notification, WorkflowNotificationEventArgs eventArgs)
 {
     try
     {
         var wfInstance = Node.Load <WorkflowHandlerBase>(notification.WorkflowNodePath);
         var wfApp      = CreateWorkflowApplication(wfInstance, WorkflowApplicationCreationPurpose.Resume, null);
         wfApp.Load(notification.WorkflowInstanceId);
         //wfApp.ResumeBookmark(notification.BookmarkName, notification.NodeId);
         if (ValidWakedUpWorkflow(wfApp))
         {
             Debug.WriteLine(String.Format("##WF> FireNotification: ResumeBookmark: {0}|{1}", notification.NodeId, notification.WorkflowInstanceId));
             wfApp.ResumeBookmark(notification.BookmarkName, eventArgs);
         }
         else
         {
             Debug.WriteLine(String.Format("##WF> FireNotification: Cancel: {0}|{1}", notification.NodeId, notification.WorkflowInstanceId));
             wfApp.Cancel();
         }
     }
     catch (Exception e)
     {
         WriteError("FireNotification", e);
         throw;
     }
 }
예제 #3
0
 public static int RegisterWait(int nodeID, Guid wfInstanceId, string bookMarkName, string wfContentPath)
 {
     using (var dbContext = GetDataContext())
     {
         var notification = new WorkflowNotification()
         {
             BookmarkName       = bookMarkName,
             NodeId             = nodeID,
             WorkflowInstanceId = wfInstanceId,
             WorkflowNodePath   = wfContentPath
         };
         dbContext.WorkflowNotifications.InsertOnSubmit(notification);
         dbContext.SubmitChanges();
         return(notification.NotificationId);
     }
 }
예제 #4
0
        public static void FireNotification(WorkflowNotification notification, WorkflowNotificationEventArgs eventArgs)
        {
            var wfInstance = Node.Load <WorkflowHandlerBase>(notification.WorkflowNodePath);
            var wfApp      = CreateWorkflowApplication(wfInstance, WorkflowApplicationCreationPurpose.Resume, null);

            wfApp.Load(notification.WorkflowInstanceId);
            //wfApp.ResumeBookmark(notification.BookmarkName, notification.NodeId);
            if (ValidWakedUpWorkflow(wfApp))
            {
                wfApp.ResumeBookmark(notification.BookmarkName, eventArgs);
                Debug.WriteLine("##WF> FireNotification: EXECUTING");
            }
            else
            {
                wfApp.Abort();
                Debug.WriteLine("##WF> FireNotification: ABORT from FireNotification");
            }
        }
 partial void DeleteWorkflowNotification(WorkflowNotification instance);
 partial void UpdateWorkflowNotification(WorkflowNotification instance);
 partial void InsertWorkflowNotification(WorkflowNotification instance);
 partial void DeleteWorkflowNotification(WorkflowNotification instance);
 partial void UpdateWorkflowNotification(WorkflowNotification instance);
 partial void InsertWorkflowNotification(WorkflowNotification instance);
예제 #11
0
 public static int RegisterWait(int nodeID, Guid wfInstanceId, string bookMarkName, string wfContentPath)
 {
     using (var dbContext = GetDataContext())
     {
         var notification = new WorkflowNotification()
         {
             BookmarkName = bookMarkName,
             NodeId = nodeID,
             WorkflowInstanceId = wfInstanceId,
             WorkflowNodePath = wfContentPath
         };
         dbContext.WorkflowNotifications.InsertOnSubmit(notification);
         dbContext.SubmitChanges();
         return notification.NotificationId;
     }
 }
예제 #12
0
        public static void FireNotification(WorkflowNotification notification, WorkflowNotificationEventArgs eventArgs)
        {
            var wfInstance = Node.Load<WorkflowHandlerBase>(notification.WorkflowNodePath);
            var wfApp = CreateWorkflowApplication(wfInstance, WorkflowApplicationCreationPurpose.Resume, null);
            wfApp.Load(notification.WorkflowInstanceId);
            //wfApp.ResumeBookmark(notification.BookmarkName, notification.NodeId);
            if (ValidWakedUpWorkflow(wfApp))
            {
                wfApp.ResumeBookmark(notification.BookmarkName, eventArgs);
Debug.WriteLine("##WF> FireNotification: EXECUTING");
            }
            else
            {
                wfApp.Abort();
Debug.WriteLine("##WF> FireNotification: ABORT from FireNotification");
            }
        }