public static string[] FindAllActionNameByTypeAndSourceState( OAdEntityDef entityDef, string srcState, int matchingActionDefType) { List <string> retVal = new List <string>(); // find all possible destination state object[] allStateObjs = CQWrapper.GetStateDefNames(entityDef) as object[]; if (null != allStateObjs) { foreach (object destStateObj in allStateObjs) { string destState = destStateObj as string; if (!string.IsNullOrEmpty(destState)) { object[] transitions = CQWrapper.DoesTransitionExist(entityDef, srcState, destState) as object[]; string[] actionDefNames = FindActionNameByType(entityDef, transitions, matchingActionDefType); retVal.AddRange(actionDefNames.AsEnumerable()); } } } return(retVal.ToArray()); }