Esempio n. 1
0
        /// <summary>
        /// Finds pending steps for the current revision
        /// </summary>
        /// <returns></returns>
        public static List <DBWorkView2> GetNextWork(this DBRevisionWork rw, DB db, DBLane lane, DBHost host, DBRevision revision, bool multiple_work)
        {
            List <DBWorkView2> result = new List <DBWorkView2> ();;

            if (revision == null)
            {
                throw new ArgumentNullException("revision");
            }

            if (lane == null)
            {
                throw new ArgumentNullException("lane");
            }

            if (host == null)
            {
                throw new ArgumentNullException("host");
            }

            rw.FilterPendingWork(db, db.GetWork(rw), result, multiple_work);

            if (result.Count == 0 && !rw.completed)
            {
                rw.completed = true;
                rw.UpdateState(db);
            }

            return(result);
        }
Esempio n. 2
0
		public static void UpdateRevisionWorkState (this DBWork w, DB db)
		{
			DBRevisionWork rw = w.GetRevisionWork (db);

			if (rw != null)
				rw.UpdateState (db);
		}