/// <summary> /// </summary> /// <param name="context"/> public void OnAction_ProcessStep(Mozart.Task.Execution.Persists.IPersistContext context) { try { InputMart.Instance.ProcessStep.DefaultView.Sort = "SEQUENCE ASC"; foreach (ProcessStep processStep in InputMart.Instance.ProcessStep.DefaultView) { MicronBEAssyProcess process; Tuple <string, string> key = Tuple.Create(processStep.LINE_ID, processStep.PROCESS_ID); if (InputMart.Instance.MicronBEAssyProcess.TryGetValue(key, out process) == false) { process = NewHelper.NewProcess(processStep.LINE_ID, processStep.PROCESS_ID); InputMart.Instance.MicronBEAssyProcess.Add(key, process); } MicronBEAssyBEStep step = CreateHelper.CreateStep(processStep); if (Constants.DieAttach == step.StepGroup) { process.DieAttachSteps.Add(step); } if (Constants.DieAttach == step.StepGroup || Constants.WireBond == step.StepGroup) { if (step.StepID.Length > 0) { process.BottleneckSteps += step.StepID[0]; } process.CR2OutStep = step; } step.DaThroughCount = process.DieAttachSteps.Count; process.Steps.Add(step); } foreach (MicronBEAssyProcess process in InputMart.Instance.MicronBEAssyProcess.Values) { process.LinkSteps(); if (process.DieAttachSteps.Count > 0 && process.CR2OutStep.StepGroup == Constants.DieAttach && process.CR2OutStep.StepID != "CONTRL SUB ATTACH") { WriteHelper.WriteMasterDataErrorLog(MasterDataErrorEventType.PROCESS, process.LineID, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, 0, string.Empty, "CR2 out step is not WIRE BOND", string.Format("PROCESS ID : {0}, BottleneckSteps : {1}", process.ProcessID, process.BottleneckSteps), "ProcessStep"); } } } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }