public object GetConditions(string ElementId, Guid ProcessId) { using (GatewayService gatewayService = new GatewayService()) { sysBpmsGateway sysBpmsGateway = gatewayService.GetInfo(ElementId, ProcessId); using (SequenceFlowService sequenceFlowService = new SequenceFlowService()) { using (ElementService elementService = new ElementService()) { using (ConditionService conditionService = new ConditionService()) { List <sysBpmsSequenceFlow> SequenceFlows = sequenceFlowService.GetList(ProcessId, "", ElementId, ""); List <sysBpmsElement> Elements = elementService.GetList(SequenceFlows.Select(c => c.TargetElementID).ToArray(), ProcessId); using (ProcessService processService = new ProcessService()) return new { SequenceFlows = SequenceFlows.Select(c => new { c.ID, Elements.FirstOrDefault(d => d.ID == c.TargetElementID).Name, }).ToList(), AllowEdit = processService.GetInfo(ProcessId).AllowEdit(), GatewayID = sysBpmsGateway.ID, GetList = conditionService.GetList(sysBpmsGateway.ID, null, null).Select(c => new ConditionDTO(c)).ToList(), }; } } } } }