public void AddActdef(string actdefID, string actdefName, ActdefType actdefType, bool actdefEnabled, int xPos, int yPos) { Actdef actdef = new Actdef(); actdef.Id = actdefID; actdef.Name = actdefName; actdef.Type = actdefType; actdef.Status = actdefEnabled; actdef.Description = string.Empty; actdef.Prodef = this.Prodef; actdef.IsDefaultInit = actdefType == ActdefType.INITIAL; actdef.IsSubflowSync = false; actdef.PassNeedInteraction = actdefType == ActdefType.INTERACTION; actdef.MNMergeNum = 0; actdef.XPos = xPos; actdef.YPos = yPos; actdef.Froms = new List<Transition>(); actdef.Tos = new List<Transition>(); this.CurrentUnitOfWork.RegisterNew(actdef); this.Prodef.Actdefs.Add(actdefID, actdef); }
private NodeType GetNodeType(ActdefType t) { switch (t) { case ActdefType.INITIAL: return NodeType.Start; case ActdefType.INTERACTION: case ActdefType.DUMMY: case ActdefType.SUBFLOW: return NodeType.Normal; case ActdefType.COMPLETION: return NodeType.End; case ActdefType.AND_BRANCH: case ActdefType.OR_BRANCH: return NodeType.Split; case ActdefType.AND_MERGE: case ActdefType.OR_MERGE: case ActdefType.MN_MERGE: return NodeType.Merge; } return NodeType.Unknown; }