public static string CheckExecutionAliases(ExecutionDefination defination) { var alias = defination.Alias; if (string.IsNullOrWhiteSpace(alias)) throw new ArgumentException("Alias should not be empty"); var at = alias.IndexOf("/"); if (at < 0) throw new ArgumentException("Alias[" + alias + "] is invalid. It should has / at least once."); if (++at == alias.Length) throw new ArgumentException("Alias[" + alias + "] is invalid. It should contains proccess part."); var at1 = alias.IndexOf("/",at); if (at1 < 0) throw new ArgumentException("Alias[" + alias + "] is invalid. It should has / at least twice."); if (++at1 == alias.Length) throw new ArgumentException("Alias[" + alias + "] is invalid. It should contains execution part."); var proccessAlias1 = alias.Substring(0,at1-1); var proccessAlias = defination.ProccessAlias; if (proccessAlias == null) { defination.ProccessAlias = proccessAlias1; } else { if(defination.ProccessAlias!= proccessAlias1) throw new ArgumentException("Alias[" + alias + "] is invalid. It's proccess alias["+proccessAlias1+"] is not match the execution alias."); } var at0 = alias.LastIndexOf('/'); if (++at0==alias.Length) throw new ArgumentException("Alias[" + alias + "] is invalid. It should contains execution part."); return alias.Substring(at0); }
public ExecutionDefination(ExecutionDefination other) : base(other) { this.ProccessAlias = other.ProccessAlias; this.InstanceType = other.InstanceType; }
public void SaveExecutionDefination(ExecutionDefination executionDefination) { var activityDefination = executionDefination as ActivityDefination; if (activityDefination != null) this.SaveActivityDefination(activityDefination); var transactionDefination = executionDefination as TransactionDefination; if (activityDefination != null) this.SaveTransactionDefination(transactionDefination); }
public ExecutionInfo(Guid proccessId, ExecutionDefination defination) : base(proccessId, defination) { this.State = ActivityStates.Initial; this.ExecutionState = ExecutionStates.Inactive; }