Example #1
0
 /// <summary>
 /// Get the process execution statuses corresponding to the specified state.
 /// </summary>
 /// <param name="state">The state to consider.</param>
 public static List <ProcessExecutionStatus> GetStatuses(ProcessExecutionState state)
 {
     return(state switch
     {
         ProcessExecutionState.Ended => new List <ProcessExecutionStatus>()
         {
             ProcessExecutionStatus.Completed,
             ProcessExecutionStatus.NothingDone,
             ProcessExecutionStatus.Stopped,
             ProcessExecutionStatus.Stopped_Error,
             ProcessExecutionStatus.Stopped_Exception,
             ProcessExecutionStatus.Stopped_User
         },
         ProcessExecutionState.Pending => new List <ProcessExecutionStatus>()
         {
             ProcessExecutionStatus.Processing,
             ProcessExecutionStatus.Queueing,
             ProcessExecutionStatus.Waiting
         },
         _ => new List <ProcessExecutionStatus>(),
     });
Example #2
0
		/// <summary>
		/// Thread safe method for setting the execution state by a child.
		/// </summary>
		/// <param name="state"></param>
		protected void SetExecutionState(ProcessExecutionState state)
		{
			lock (executionStateSyncObj)
			{
				this.executionState = state;
			}
		}